O
olrt
Hello !
I'm writing a very simple Windows App in C# with Visual Studio 2005.
I have a DataSet composed like this :
DataTable CLIENT
DataTable COMMANDE
DataTable ARTICLE
Relation FK_CLIENT_COMMANDE : 1 CLIENT to many COMMANDE
Relation FK_COMMANDE_ARTICLE : 1 COMMANDE to many ARTICLE
I have implemented 3 DataGridViews :
DataGridView : DgCLIENT bound to CLIENT
DataGridView : DgCOMMAND (detail of DgCLIENT) bound to
FK_CLIENT_COMMANDE
DataGridView : DgARTICLE (detail of DgCOMMAND) bound to
FK_COMMANDE_ARTICLE
My problem :
BidonDataSetPoub ds = (BidonDataSetPoub)bidonDataSetPoub.GetChanges();
aRTICLETableAdapter.Update(ds.ARTICLE.Select("","",DataViewRowState.Deleted));
cOMMANDETableAdapter.Update(ds.COMMANDE.Select("","",DataViewRowState.Deleted));
cLIENTTableAdapter.Update(ds.CLIENT.Select("", "",
DataViewRowState.Deleted));
cLIENTTableAdapter.Update(ds.CLIENT.Select("","",DataViewRowState.ModifiedCurrent));
cOMMANDETableAdapter.Update(ds.COMMANDE.Select("","",DataViewRowState.ModifiedCurrent));
aRTICLETableAdapter.Update(ds.ARTICLE.Select("","",DataViewRowState.ModifiedCurrent));
cLIENTTableAdapter.Update(ds.CLIENT.Select("", "",
DataViewRowState.Added));
cOMMANDETableAdapter.Update(ds.COMMANDE.Select("", "",
DataViewRowState.Added));
aRTICLETableAdapter.Update(ds.ARTICLE.Select("", "",
DataViewRowState.Added));
bidonDataSetPoub.Merge(ds, false);
bidonDataSetPoub.AcceptChanges();
------------------------------------------------------
I'm writing a very simple Windows App in C# with Visual Studio 2005.
I have a DataSet composed like this :
DataTable CLIENT
DataTable COMMANDE
DataTable ARTICLE
Relation FK_CLIENT_COMMANDE : 1 CLIENT to many COMMANDE
Relation FK_COMMANDE_ARTICLE : 1 COMMANDE to many ARTICLE
I have implemented 3 DataGridViews :
DataGridView : DgCLIENT bound to CLIENT
DataGridView : DgCOMMAND (detail of DgCLIENT) bound to
FK_CLIENT_COMMANDE
DataGridView : DgARTICLE (detail of DgCOMMAND) bound to
FK_COMMANDE_ARTICLE
My problem :
BidonDataSetPoub ds = (BidonDataSetPoub)bidonDataSetPoub.GetChanges();
aRTICLETableAdapter.Update(ds.ARTICLE.Select("","",DataViewRowState.Deleted));
cOMMANDETableAdapter.Update(ds.COMMANDE.Select("","",DataViewRowState.Deleted));
cLIENTTableAdapter.Update(ds.CLIENT.Select("", "",
DataViewRowState.Deleted));
cLIENTTableAdapter.Update(ds.CLIENT.Select("","",DataViewRowState.ModifiedCurrent));
cOMMANDETableAdapter.Update(ds.COMMANDE.Select("","",DataViewRowState.ModifiedCurrent));
aRTICLETableAdapter.Update(ds.ARTICLE.Select("","",DataViewRowState.ModifiedCurrent));
cLIENTTableAdapter.Update(ds.CLIENT.Select("", "",
DataViewRowState.Added));
cOMMANDETableAdapter.Update(ds.COMMANDE.Select("", "",
DataViewRowState.Added));
aRTICLETableAdapter.Update(ds.ARTICLE.Select("", "",
DataViewRowState.Added));
bidonDataSetPoub.Merge(ds, false);
bidonDataSetPoub.AcceptChanges();
------------------------------------------------------