コード例 #1
0
        private void btnAjouterAssistant_Click(object sender, EventArgs e)
        {
            var             nouveauAssistant = bD5B6TP1_ConstantinBrassardLaheyDataSet.Assistant.NewAssistantRow();
            FrmAddAssistant frmAjout         = new FrmAddAssistant(nouveauAssistant);

            nouveauAssistant.NoAssistant = TrouverNoAssistant();

            DialogResult resultat = frmAjout.ShowDialog();

            if (resultat == DialogResult.Cancel)
            {
                return;
            }

            bD5B6TP1_ConstantinBrassardLaheyDataSet.Assistant.AddAssistantRow(nouveauAssistant);
            assistantBindingSource.MoveLast();
            BaseFormGestion.estSavegarder = false;
        }
コード例 #2
0
        private void btnModifier_Click(object sender, EventArgs e)
        {
            int noAssistantSelectionne = (int)((DataRowView)assistantBindingSource.Current)["NoAssistant"];

            BD5B6TP1_ConstantinBrassardLaheyDataSet.AssistantRow rowModifier = bD5B6TP1_ConstantinBrassardLaheyDataSet.Assistant.FindByNoAssistant(noAssistantSelectionne);
            FrmAddAssistant frmAjout = new FrmAddAssistant(rowModifier, true);

            DialogResult resultat = frmAjout.ShowDialog();

            if (resultat == DialogResult.Cancel)
            {
                return;
            }
            else
            {
                BaseFormGestion.estSavegarder = false;
            }
        }