private void btnAjoutCli_Click(object sender, EventArgs e) { var nouveauClient = bD5B6TP1_ConstantinBrassardLaheyDataSet.Client.NewClientRow(); nouveauClient.NoClient = DeterminerNoNouveauClient(); FrmAjoutClient frmAjout = new FrmAjoutClient(nouveauClient); DialogResult resultat = frmAjout.ShowDialog(); if (resultat == DialogResult.Cancel) { return; } bD5B6TP1_ConstantinBrassardLaheyDataSet.Client.AddClientRow(nouveauClient); clientBindingSource.MoveLast(); BaseFormGestion.estSavegarder = false; }
private void btnModifierClient_Click(object sender, EventArgs e) { int noClientSelec = (int)((DataRowView)clientBindingSource.Current)["NoClient"]; BD5B6TP1_ConstantinBrassardLaheyDataSet.ClientRow rowSelec = bD5B6TP1_ConstantinBrassardLaheyDataSet.Client.FindByNoClient(noClientSelec); FrmAjoutClient frmAjout = new FrmAjoutClient(rowSelec, true); DialogResult resultat = frmAjout.ShowDialog(); if (resultat == DialogResult.Cancel) { rowSelec.CancelEdit(); } else { BaseFormGestion.estSavegarder = false; } }