Exemplo n.º 1
0
        private void btnAjouterSoin_Click(object sender, EventArgs e)
        {
            var          nouveauSoin = bD5B6TP1_ConstantinBrassardLaheyDataSet.Soin.NewSoinRow();
            FrmAjoutSoin frmAjout    = new FrmAjoutSoin(nouveauSoin);

            nouveauSoin.NoSoin = TrouverNoSoin();
            nouveauSoin.Duree  = new TimeSpan(0, 1, 0, 0);

            DialogResult resultat = frmAjout.ShowDialog();

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

            bD5B6TP1_ConstantinBrassardLaheyDataSet.Soin.AddSoinRow(nouveauSoin);
            soinBindingSource.MoveLast();
            BaseFormGestion.estSavegarder = false;
        }
Exemplo n.º 2
0
        private void btnModifier_Click(object sender, EventArgs e)
        {
            int noSoinSelec = (int)((DataRowView)soinBindingSource.Current)["NoSoin"];

            BD5B6TP1_ConstantinBrassardLaheyDataSet.SoinRow rowSelec =
                bD5B6TP1_ConstantinBrassardLaheyDataSet.Soin.FindByNoSoin(noSoinSelec);

            FrmAjoutSoin frmAjout = new FrmAjoutSoin(rowSelec, true);

            DialogResult resultat = frmAjout.ShowDialog();

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