Ejemplo n.º 1
0
 /// <summary>
 /// Function to search the details
 /// </summary>
 public void Search()
 {
     try
     {
         if (cmbAccountLedger.Text.Trim() == string.Empty)
         {
             cmbAccountLedger.Text = "All";
         }
         else if (cmbVoucherType.Text.Trim() == string.Empty)
         {
             cmbVoucherType.Text = "All";
         }
         else if (cmbStatus.Text.Trim() == string.Empty)
         {
             cmbStatus.Text = "All";
         }
         DataTable          dtblPDCReport = new DataTable();
         PDCPayableMasterSP sppdcpayable  = new PDCPayableMasterSP();
         dtblPDCReport = sppdcpayable.PdcPayableReportSearch(Convert.ToDateTime(dtpFrmDate.Value.ToString()), Convert.ToDateTime(dtpTodate.Value.ToString()), cmbVoucherType.Text.ToString(), cmbAccountLedger.Text.ToString(), Convert.ToDateTime(dtpCheckDateFrom.Value.ToString()), Convert.ToDateTime(dtpCheckdateTo.Value.ToString()), txtcheckNo.Text.Trim(), txtVoucherNo.Text.Trim(), cmbStatus.Text.Trim());
         dgvPDCPayableReport.DataSource = dtblPDCReport;
     }
     catch (Exception ex)
     {
         MessageBox.Show("PPREP5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        public List <DataTable> PdcPayableReportSearch(DateTime dtFromdate, DateTime dtToDate, string strVoucherType, string strLedgerName, DateTime dtcheckfromdate, DateTime dtCheckdateto, string strchequeNo, string strvoucherNo, string strstatus)
        {
            List <DataTable> ListObj = new List <DataTable>();

            try
            {
                ListObj = spPdcPayableMaster.PdcPayableReportSearch(dtFromdate, dtToDate, strVoucherType, strLedgerName, dtcheckfromdate, dtCheckdateto, strchequeNo, strvoucherNo, strstatus);
            }
            catch (Exception ex)
            {
                MessageBox.Show("PDCP17:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(ListObj);
        }