Beispiel #1
0
        private void btnAjouter_Click(object sender, EventArgs e)
        {
            var nouveauSoinPlanifie   = bD5B6TP1_ConstantinBrassardLaheyDataSet.PlanifSoin.NewPlanifSoinRow();
            FrmPlanifierSoin frmAjout = new FrmPlanifierSoin(nouveauSoinPlanifie, bD5B6TP1_ConstantinBrassardLaheyDataSet.PlanifSoin);

            DialogResult resultat = frmAjout.ShowDialog();

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

            bD5B6TP1_ConstantinBrassardLaheyDataSet.PlanifSoin.AddPlanifSoinRow(nouveauSoinPlanifie);
            planifSoinBindingSource.MoveLast();
            BaseFormGestion.estSavegarder = false;
        }
Beispiel #2
0
        private void btnModifier_Click(object sender, EventArgs e)
        {
            DateTime dateHeureSelec   = (DateTime)((DataRowView)planifSoinBindingSource.Current)["DateHeure"];
            int      noAssistantSelec = (int)((DataRowView)planifSoinBindingSource.Current)["NoAssistant"];
            int      noPersonneSelec  = (int)((DataRowView)planifSoinBindingSource.Current)["NoPersonne"];

            BD5B6TP1_ConstantinBrassardLaheyDataSet.PlanifSoinRow rowSelec =
                bD5B6TP1_ConstantinBrassardLaheyDataSet.PlanifSoin.FindByNoPersonneNoAssistantDateHeure(noPersonneSelec, noAssistantSelec, dateHeureSelec);

            FrmPlanifierSoin frmAjout = new FrmPlanifierSoin(rowSelec, bD5B6TP1_ConstantinBrassardLaheyDataSet.PlanifSoin, true);

            DialogResult resultat = frmAjout.ShowDialog();

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