private void dgvSalesView_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.ColumnIndex.Equals(0))
         {
             frmSalesMaster objSalesEditMode = new frmSalesMaster(Convert.ToInt32(dgvSalesView.Rows[e.RowIndex].Cells[15].Value), rollFKey, cId);
             objSalesEditMode.MdiParent = this.MdiParent;
             objSalesEditMode.Show();
             this.Close();
             objSalesEditMode.WindowState = FormWindowState.Minimized;
             objSalesEditMode.WindowState = FormWindowState.Maximized;
         }
         if (e.ColumnIndex.Equals(1))
         {
             frmReportSelection objReportSelection = new frmReportSelection(Convert.ToInt32(dgvSalesView.Rows[e.RowIndex].Cells[15].Value), String.Empty, 1, rollFKey, cId);
             objReportSelection.MdiParent = this.MdiParent;
             this.Close();
             objReportSelection.Show();
             objReportSelection.WindowState = FormWindowState.Minimized;
             objReportSelection.WindowState = FormWindowState.Maximized;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString(), "dgvSalesView_CellContentClick", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void salesMasterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CloseAllOpenedChildForm();
            frmSalesMaster objform = new frmSalesMaster(0, rollFKey, cId);

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