Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGridView
Message
From
07/11/2007 16:16:43
 
 
To
07/11/2007 15:33:50
General information
Forum:
ASP.NET
Category:
Forms
Title:
Environment versions
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01267049
Message ID:
01267435
Views:
14
Thanks!. Now it is working perfect.

Bonnie my next step is to save the changed row back to the database.
I am confused (nothing new!!)on how to save the row back to the database.

Here is my logic:

On my producer form I have OK(save) button and close button, see code :
 private void btnClose_Click(object sender, EventArgs e)
 {
   m_Row.RejectChanges();
   this.Close();
 }

  private void btnOK_Click(object sender, EventArgs e)
   {
      m_Row.Table.AcceptChanges();
      this.Close();
   }
Now when I get back to my Agency form,I call an update method on my Bussiness layer to update ONLY the DataRow.

Agency has many producers, that is why I have a DataGridView on my Agency form.
Here is the code :
  private void btnProducerEdit_Click(object sender, EventArgs e)
  {
    int i = grdProducers.CurrentRow.Index;
    DataRow row = dsProducers.Tables["Producers"].DefaultView[i].Row;
    Producer frmProducers = new Producer(row,i);
    frmProducers.Text = "Producers";
    frmProducers.ShowDialog();
    
    // Bonnie here is where I would call my Update method in my 
    // business layer



  }
Does it make sense??. I just want to go back and only save the DataRow that was changed on the producer form. Since there might be another changes on the Agency form that the user still has not commit.

Maybe I should do the update on the producer form? But if I do it there I guess I would need to pass the DataSet.



Sergio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform