public List <DataTable> PDCpayableRegisterSearch(DateTime dtFromdate, DateTime dtTodate, string strVoucherNo, string strLedgerName) { List <DataTable> ListObj = new List <DataTable>(); try { ListObj = spPdcPayableMaster.PDCpayableRegisterSearch(dtFromdate, dtTodate, strVoucherNo, strLedgerName); } catch (Exception ex) { MessageBox.Show("PDCP12:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(ListObj); }
/// <summary> /// Function to fill Datagridview /// </summary> public void GridSearchRegister() { try { if (cmbAccountLedger.Text.Trim() == string.Empty) { cmbAccountLedger.Text = "ALL"; } DataTable dtbl = new DataTable(); PDCPayableMasterSP spPdcpayable = new PDCPayableMasterSP(); dtbl = spPdcpayable.PDCpayableRegisterSearch(Convert.ToDateTime(dtpfromDate.Value.ToString()), Convert.ToDateTime(dtpTodate.Value.ToString()), txtvoucherNo.Text.Trim(), cmbAccountLedger.Text.ToString()); dgvpdcPayableRegister.DataSource = dtbl; } catch (Exception ex) { MessageBox.Show("PPREG1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }