Exemple #1
0
 public static ViewPatientDetailsForm Instance(int pateintID)
 {
     if (_Instance != null)
     {
         _Instance.Dispose();
     }
     return(_Instance = new ViewPatientDetailsForm(pateintID));
 }
        private void dataGridPatients_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                lblStatus.Text = "Loading form for details";
                int PatID = Convert.ToInt32(dataGridPatients[0, e.RowIndex].Value);

                ViewPatientDetailsForm.Instance(PatID).ShowDialog();
                lblStatus.Text = "Loading Completed";
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #3
0
        private void dataGridPatDetails_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            var senderGrid = (DataGridView)sender;

            if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn)
            {
                var action = senderGrid.Rows[e.RowIndex].Cells[e.ColumnIndex].ColumnIndex;
                switch (action)
                {
                case 5:
                    var ID = Convert.ToInt32(senderGrid.Rows[e.RowIndex].Cells[0].Value);
                    ViewPendingBillsDetailsForm.Instance(ID).ShowDialog();
                    break;

                case 6:
                    ID = Convert.ToInt32(senderGrid.Rows[e.RowIndex].Cells[0].Value);
                    ViewPatientDetailsForm.Instance(ID).ShowDialog();
                    break;

                default:
                    break;
                }
            }
        }