Esempio n. 1
0
 private void toolStripDropDownButton1_Click(object sender, EventArgs e)
 {
     if (doctor_id != "1")
     {
         string id;
         id = this.cntrl.doctr_privillage_for_addnewPatient(doctor_id);
         if (int.Parse(id) > 0)
         {
             MessageBox.Show("There is No Privilege to Add Patient", "Security Role", MessageBoxButtons.OK, MessageBoxIcon.Stop);
         }
         else
         {
             var form2 = new Add_New_Patients();
             form2.doctor_id = doctor_id;
             form2.Closed   += (sender1, args) => this.Close();
             this.Hide();
             form2.Show();
         }
     }
     else
     {
         var form2 = new Add_New_Patients();
         form2.doctor_id = doctor_id;
         form2.Closed   += (sender1, args) => this.Close();
         this.Hide();
         form2.Show();
     }
 }
Esempio n. 2
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     try
     {
         if (btnOk.Text == "OK")
         {
             id = dgvPatient.CurrentRow.Cells["colid"].Value.ToString();
             string name = dgvPatient.CurrentRow.Cells["coldoctName"].Value.ToString();
             string dtb  = mdl.Get_DoctorId(name);
             drctId = dtb.ToString();
             if (id != "")
             {
                 var form2 = new Patient_Profile_Details();
                 form2.patient_id = id;
                 form2.doctor_id  = drctId;
                 form2.MdiParent  = this.MdiParent;
                 form2.Show();
                 form2.Closed += (sender1, args) => this.Close();
                 this.Close();
                 bool SetFlag = true;
                 var  form1   = new Add_New_Patients(SetFlag);
             }
         }
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 3
0
 public void doctr_privillage_for_addnewPatient(string doctrid)
 {
     try
     {
         if (doctor_id != "1")
         {
             string id;
             id = doctrid;
             if (int.Parse(id) > 0)
             {
                 var form2 = new Add_New_Patients();
                 form2.doctor_id = doctor_id;
                 form2.Closed   += (sender1, args) => this.Close();
                 this.Hide();
                 form2.Show();;
             }
             else
             {
                 MessageBox.Show("There is No Privilege to Add Patient", "Security Role", MessageBoxButtons.OK, MessageBoxIcon.Stop);
             }
         }
         else
         {
             var form2 = new Add_New_Patients();
             form2.doctor_id = doctor_id;
             form2.Closed   += (sender1, args) => this.Close();
             this.Hide();
             form2.Show();
         }
     }
     catch (Exception ex)
     { MessageBox.Show("Error!..", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); }
 }
Esempio n. 4
0
 public void doctr_privillage_for_addnewPatient(string patnt)
 {
     if (patnt != "")
     {
         string id = patnt;
         if (int.Parse(id) > 0)
         {
             MessageBox.Show("There is No Privilege to Add Patient", "Security Role", MessageBoxButtons.OK, MessageBoxIcon.Stop);
         }
         else
         {
             var form2 = new Add_New_Patients();
             form2.doctor_id = doctor_id;
             form2.Closed   += (sender1, args) => this.Close();
             this.Hide();
             form2.Show();;
         }
     }
 }