Example #1
0
 /// <summary>
 /// Function toprint
 /// </summary>
 public void ReportPrint()
 {
     try
     {
         RejectionOutMasterSP spRejectionOutMaster = new RejectionOutMasterSP();
         decimal decMaterialReceiptNo = 0;
         if (cmbMaterialReceiptNo.SelectedIndex != -1)
         {
             decMaterialReceiptNo = Convert.ToDecimal(cmbMaterialReceiptNo.SelectedValue.ToString());
         }
         strVoucherNo   = txtVoucherNo.Text;
         strProductCode = txtProductCode.Text;
         DataSet   dsRejectionOut = spRejectionOutMaster.RejectionOutReportPrinting(decmaterialReceiptMasterId, 1, Convert.ToDateTime(txtFromDate.Text), Convert.ToDateTime(txtToDate.Text), Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()), strVoucherNo, Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), strProductCode, strProductName);
         frmReport frmReport      = new frmReport();
         frmReport.MdiParent = formMDI.MDIObj;
         frmReport.RejectionOutReportPrinting(dsRejectionOut);
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "ROREP3:" + ex.Message;
     }
 }
Example #2
0
 /// <summary>
 /// Function to fill the grid based on conditions
 /// </summary>
 public void GridFill()
 {
     try
     {
         RejectionOutMasterSP spRejectionOutMaster = new RejectionOutMasterSP();
         if (txtVoucherNo.Text.Trim() == string.Empty)
         {
             strVoucherNo = string.Empty;
         }
         else
         {
             strVoucherNo = txtVoucherNo.Text;
         }
         if (cmbCashOrParty.SelectedIndex == 0 || cmbCashOrParty.SelectedIndex == -1)
         {
             decLedgerId = 0;
         }
         else
         {
             decLedgerId = Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString());
         }
         if (cmbVoucherType.SelectedIndex == 0 || cmbVoucherType.SelectedIndex == -1)
         {
             decVoucherTypeId = 0;
         }
         else
         {
             decVoucherTypeId = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
         }
         if (cmbMaterialReceiptNo.SelectedIndex == 0 || cmbMaterialReceiptNo.SelectedIndex == -1)
         {
             decReceiptMasterId = 0;
         }
         else
         {
             decReceiptMasterId = Convert.ToDecimal(cmbMaterialReceiptNo.SelectedValue.ToString());
         }
         if (txtProductCode.Text.Trim() == string.Empty)
         {
             strProductCode = string.Empty;
         }
         else
         {
             strProductCode = txtProductCode.Text;
         }
         if (txtProductName.Text.Trim() == string.Empty)
         {
             strProductName = string.Empty;
         }
         else
         {
             strProductName = txtProductName.Text;
         }
         DateTime  FromDate = this.dtpFromDate.Value;
         DateTime  ToDate   = this.dtpToDate.Value;
         DataTable dtbl     = spRejectionOutMaster.RejectionOutReportFill(strinvoiceNo, strProductCode, strProductName, decLedgerId, FromDate, ToDate, decReceiptMasterId, decVoucherTypeId);
         dgvRejectionOutReport.DataSource = dtbl;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "ROREP7:" + ex.Message;
     }
 }