Ejemplo n.º 1
0
 private void frmConsultationHistory_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         frmConsultationDetails frm = new frmConsultationDetails(1, 2);
         frm.MdiParent   = this.Owner;
         frm.WindowState = FormWindowState.Maximized;
         frm.Show();
     }
     catch (Exception ex)
     {
         CommonLogger.Info("frmConsultationDetails\r\n" + ex.ToString());
     }
 }
Ejemplo n.º 2
0
 private void ViewDetails(int app_id, int pat_id)
 {
     try
     {
         if (Application.OpenForms.OfType <frmConsultationDetails>().Count() == 1)
         {
             Application.OpenForms.OfType <frmConsultationDetails>().First().Close();
         }
         frmConsultationDetails frm = new frmConsultationDetails(app_id, pat_id);
         frm.MdiParent = this.ParentForm;
         frm.Show();
     }
     catch (Exception ex)
     {
         CommonLogger.Info(ex.ToString());
     }
 }
Ejemplo n.º 3
0
        private void dgvApptHistory_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                switch (dgvApptHistory.Columns[e.ColumnIndex].Name)
                {
                case "btnHistSelect":
                    ShowProceduresHistory(e.RowIndex);
                    ShowInvestigationsHistory(e.RowIndex);
                    break;

                case "btnDetails":
                    int aptid = Convert.ToInt32(dgvApptHistory.Rows[Convert.ToInt32(e.RowIndex)].Cells["colHistID"].Value);
                    int patid = Convert.ToInt32(txtPatientID.Text.Trim());
                    frmConsultationDetails frm = new frmConsultationDetails(aptid, patid);
                    if (Application.OpenForms.OfType <frmConsultationDetails>().Count() == 1)
                    {
                        Application.OpenForms.OfType <frmConsultationDetails>().First().BringToFront();
                    }
                    else
                    {
                        frm.MdiParent   = this.Owner;
                        frm.WindowState = FormWindowState.Normal;     // Change to maximized when issue fixed
                        frm.Show();
                        frm.BringToFront();
                    }
                    this.Close();

                    break;
                }
            }
            catch (Exception ex)
            {
                CommonLogger.Info(ex.ToString());
            }
        }