private void toolStripMenuItem4_Click(object sender, EventArgs e)
        {
            CloseAllOpenedChildForm();
            frmSearchPurchaseMaster objform = new frmSearchPurchaseMaster(rollFKey, cId);

            objform.MdiParent = this;
            objform.Show();
            objform.WindowState = FormWindowState.Minimized;
            objform.WindowState = FormWindowState.Maximized;
        }
 private void searchPurchaseMenu_Click(object sender, EventArgs e)
 {
     try
     {
         CloseAllOpenedChildForm();
         frmSearchPurchaseMaster objform = new frmSearchPurchaseMaster(rollFKey, cId);
         objform.MdiParent = this;
         objform.Show();
         objform.WindowState = FormWindowState.Minimized;
         objform.WindowState = FormWindowState.Maximized;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString(), "searchPurchaseMenu_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }