Exemplo n.º 1
0
 /// <summary>
 /// calls corresponding SalesQuotationvoucher on cell double click for updation
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvSalesQuotationReport_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.ColumnIndex > -1 && e.RowIndex > -1)
         {
             frmSalesQuotation frmSalesQuotationObj = new frmSalesQuotation();
             frmSalesQuotationObj.MdiParent = formMDI.MDIObj;
             frmSalesQuotation frmSalesQuotationOpen = Application.OpenForms["frmSalesQuotation"] as frmSalesQuotation;
             if (frmSalesQuotationOpen == null)
             {
                 frmSalesQuotationObj.WindowState = FormWindowState.Normal;
                 frmSalesQuotationObj.CallFRomSalesQuotationReport(this, Convert.ToDecimal(dgvSalesQuotationReport.CurrentRow.Cells["dgvtxtQuotationMasterId"].Value));
             }
             else
             {
                 frmSalesQuotationOpen.CallFRomSalesQuotationReport(this, Convert.ToDecimal(dgvSalesQuotationReport.CurrentRow.Cells["dgvtxtQuotationMasterId"].Value));
                 frmSalesQuotationOpen.BringToFront();
                 if (frmSalesQuotationOpen.WindowState == FormWindowState.Minimized)
                 {
                     frmSalesQuotationOpen.WindowState = FormWindowState.Normal;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SQRT13:" + ex.Message;
     }
 }
Exemplo n.º 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 (dgvSalesQuotationRegister.CurrentRow != null)
         {
             frmSalesQuotation frmSalesQuotationObj  = new frmSalesQuotation();
             frmSalesQuotation frmSalesQuotationOpen = Application.OpenForms["frmSalesQuotation"] as frmSalesQuotation;
             if (frmSalesQuotationOpen == null)
             {
                 frmSalesQuotationObj.MdiParent   = formMDI.MDIObj;
                 frmSalesQuotationObj.WindowState = FormWindowState.Normal;
                 frmSalesQuotationObj.CallFRomSalesQuotationRegister(this, Convert.ToDecimal(dgvSalesQuotationRegister.CurrentRow.Cells["dgvtxtquotationMasterId"].Value));
             }
             else
             {
                 frmSalesQuotationOpen.CallFRomSalesQuotationRegister(this, Convert.ToDecimal(dgvSalesQuotationRegister.CurrentRow.Cells["dgvtxtquotationMasterId"].Value));
                 frmSalesQuotationOpen.BringToFront();
                 if (frmSalesQuotationOpen.WindowState == FormWindowState.Minimized)
                 {
                     frmSalesQuotationOpen.WindowState = FormWindowState.Normal;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SQREG10:" + ex.Message;
     }
 }