Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataGridView
Message
De
07/11/2007 16:16:43
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
 
 
À
07/11/2007 15:33:50
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Versions des environnements
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01267049
Message ID:
01267435
Vues:
15
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform