Example #1
0
        /// <summary>
        /// Cell double click for Updation in selected item frmRejectionOut
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvRejectionOutReport_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex > -1 && e.ColumnIndex > -1)
                {
                    frmRejectionOut frmRejectionOutObj = new frmRejectionOut();
                    frmRejectionOutObj.MdiParent = formMDI.MDIObj;


                    frmRejectionOut frmRejectionOutOpen = Application.OpenForms["frmRejectionOut"] as frmRejectionOut;
                    if (frmRejectionOutOpen == null)
                    {
                        frmRejectionOutObj.MdiParent = formMDI.MDIObj;
                        frmRejectionOutObj.CallFromRejectionOutReport(this, Convert.ToDecimal(dgvRejectionOutReport.CurrentRow.Cells["rejectionOutMasterId"].Value));
                    }
                    else
                    {
                        frmRejectionOutOpen.CallFromRejectionOutReport(this, Convert.ToDecimal(dgvRejectionOutReport.CurrentRow.Cells["rejectionOutMasterId"].Value));
                        frmRejectionOutOpen.BringToFront();
                        if (frmRejectionOutOpen.WindowState == FormWindowState.Minimized)
                        {
                            frmRejectionOutOpen.WindowState = FormWindowState.Normal;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                formMDI.infoError.ErrorString = "ROREP30:" + ex.Message;
            }
        }
Example #2
0
 /// <summary>
 /// Calls corresponding voucher on ViewDetails button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnViewDetails_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvRejectionOutRegister.CurrentRow != null)
         {
             frmRejectionOut frmRejectionOutObj  = new frmRejectionOut();
             frmRejectionOut frmRejectionOutOpen = Application.OpenForms["frmRejectionOut"] as frmRejectionOut;
             if (frmRejectionOutOpen == null)
             {
                 frmRejectionOutObj.MdiParent = formMDI.MDIObj;
                 frmRejectionOutObj.CallFromRejectionOutRegister(this, Convert.ToDecimal(dgvRejectionOutRegister.CurrentRow.Cells["dgvtxtRejectionOutMasterId"].Value.ToString()));
             }
             else
             {
                 frmRejectionOutOpen.CallFromRejectionOutRegister(this, Convert.ToDecimal(dgvRejectionOutRegister.CurrentRow.Cells["dgvtxtRejectionOutMasterId"].Value.ToString()));
                 frmRejectionOutOpen.MdiParent = formMDI.MDIObj;
                 frmRejectionOutOpen.BringToFront();
                 if (frmRejectionOutOpen.WindowState == FormWindowState.Minimized)
                 {
                     frmRejectionOutOpen.WindowState = FormWindowState.Normal;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "ROREG11:" + ex.Message;
     }
 }