private void settingsToolStripMenuItem_Click(object sender, EventArgs e) { try { if (doctor_id != "1") { string id; id = this.cntrl.permission_for_settings(doctor_id); if (int.Parse(id) > 0) { var form2 = new PappyjoeMVC.View.Practice_Details(); form2.doctor_id = doctor_id; form2.Show(); } else { MessageBox.Show("There is No Privilege to Clinic Settings", "Security Role", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } else { var form2 = new PappyjoeMVC.View.Practice_Details(); form2.doctor_id = doctor_id; form2.Show(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error !...", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void settingsToolStripMenuItem_Click(object sender, EventArgs e) { var form2 = new PappyjoeMVC.View.Practice_Details(); form2.doctor_id = doctor_id; form2.Closed += (sender1, args) => this.Close(); this.Hide(); form2.Show(); }