Пример #1
0
        private void btnDetails_Click(object sender, EventArgs e)
        {
            int  id_rdv = GetID_Dossier();
            long id_pat = rdvDao.Find(id_rdv).id_patient;

            var frm = new Consultation_Patient(id_rdv, id_pat);

            frm.ShowDialog();
        }
Пример #2
0
        private void btnComboVisit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            int id_RDV = GetID_SalleTr();

            if (e.Button.Index == 1)
            {
                try
                {
                    var rdv = rdvDao.Find(id_RDV);

                    long id_pat = rdv.id_patient;

                    var Frm = new Consultation_Patient(id_RDV, id_pat);
                    Frm.ShowDialog();
                }
                catch (Exception ex)
                {
                    XtraMessageBox.Show(DevExpress.LookAndFeel.UserLookAndFeel.Default, ex.Message);
                }
            }

            else if (e.Button.Index == 2)
            {
                try
                {
                    string msg = "Ce patient a-t-il mis fin à la visite ?";

                    var Dialog = XtraMessageBox.Show(msg, "Validation", MessageBoxButtons.YesNo);

                    if (Dialog == DialogResult.Yes)
                    {
                        var rdv = rdvDao.Find(id_RDV);
                        rdv.terminer = 1;
                        rdvDao.Update(rdv);
                        toast.ShowNotification(toastID[3]);
                        GetAll();
                    }
                }
                catch (Exception ex)
                {
                    XtraMessageBox.Show(DevExpress.LookAndFeel.UserLookAndFeel.Default, ex.Message);
                }
            }
        }