private void btnToday_Click(object sender, EventArgs e) { if (!ClsBLL.CheckFormIsOpen("frmBooking")) { frmBooking fcsb = new frmBooking(); fcsb.Show(); } else { Form frm = Application.OpenForms["frmBooking"]; frm.Focus(); } }
private void button1_Click(object sender, EventArgs e) { try { if (!ClsBLL.CheckFormIsOpen("frmBooking")) { frmBooking fw = new frmBooking(); fw.Show(); } else { Form frm = Application.OpenForms["frmBooking"]; frm.Focus(); } } catch (Exception Err) { MessageBox.Show(Err.Source + "/" + Err.TargetSite.Attributes.ToString() + "/" + Err.Message); } }