public List <DataTable> ReceiptReportSearch(DateTime dtpFromDate, DateTime dtpToDate, decimal decLedgerId, decimal decVoucherTypeId, decimal decCashOrBankId) { List <DataTable> listobj = new List <DataTable>(); try { ReceiptMasterSP spReceiptMaster = new ReceiptMasterSP(); listobj = spReceiptMaster.ReceiptReportSearch(dtpFromDate, dtpToDate, decLedgerId, decVoucherTypeId, decCashOrBankId); } catch (Exception ex) { MessageBox.Show("RD13:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(listobj); }
/// <summary> /// Function to fill the grid based on the Search condition /// </summary> public void GridFill() { try { ReceiptMasterSP SpPaymentMaster = new ReceiptMasterSP(); DataTable dtbl = new DataTable(); if (cmbLedger.Items.Count != 0 && cmbVoucherType.Items.Count != 0 && cmbCashOrBank.Items.Count != 0) { if ((cmbLedger.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbVoucherType.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbCashOrBank.SelectedValue.ToString() != "System.Data.DataRowView")) { if (txtFromDate.Text.Trim() != string.Empty && txtToDate.Text.Trim() != string.Empty) { dtbl = SpPaymentMaster.ReceiptReportSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), Convert.ToDecimal(cmbLedger.SelectedValue), Convert.ToDecimal(cmbVoucherType.SelectedValue), Convert.ToDecimal(cmbCashOrBank.SelectedValue)); dgvReceiptReport.DataSource = dtbl; } } } } catch (Exception ex) { MessageBox.Show("RRP5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }