예제 #1
0
        public FrmPlanifierSoin(BD5B6TP1_ConstantinBrassardLaheyDataSet.PlanifSoinRow planifSoin, BD5B6TP1_ConstantinBrassardLaheyDataSet.PlanifSoinDataTable dataTable, bool modifMode = false)
        {
            InitializeComponent();
            this.planifSoin = planifSoin;

            this.assistantSoinTableAdapter = new AssistantSoinTableAdapter();

            this.modifMode = modifMode;

            controlesAValider = new Control[]
            {
                dtpDateHeure,
                cboAssistant,
                cboPatient,
                cboSoin,
            };

            if (modifMode)
            {
                ancienneDateHeure = this.planifSoin.DateHeure;
                ancienNoPersonne  = this.planifSoin.NoPersonne;
                ancienNoAssistant = this.planifSoin.NoAssistant;
            }

            foreach (DataRow planifSoinRow in dataTable)
            {
                bD5B6TP1_ConstantinBrassardLaheyDataSet.PlanifSoin.ImportRow(planifSoinRow);
            }
        }
예제 #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;
            }
        }