/// <summary> /// TO serch the datas and fill the grid /// </summary> public void Search() { try { if (cmbVoucherType.Items.Count != 0 && cmbAccountLedger.Items.Count != 0) { if ((cmbAccountLedger.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbVoucherType.SelectedValue.ToString() != "System.Data.DataRowView")) { if (txtFromDate.Text.Trim() != string.Empty && txtToDate.Text.Trim() != string.Empty) { string strFromDate = txtFromDate.Text; string strToDate = txtToDate.Text; decimal decVoucherTypeId = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()); decimal decLedgerId = Convert.ToDecimal(cmbAccountLedger.SelectedValue.ToString()); DataTable dtblDebitNoteReport = new DataTable(); DebitNoteMasterSP spDebitNoteMaster = new DebitNoteMasterSP(); dtblDebitNoteReport = spDebitNoteMaster.DebitNoteReportSearch(strFromDate, strToDate, decVoucherTypeId, decLedgerId); dgvDebitNoteReport.DataSource = dtblDebitNoteReport; } } } } catch (Exception ex) { MessageBox.Show("DRNTREP5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public List <DataTable> DebitNoteReportSearch(string strFromDate, string strToDate, decimal decVoucherTypeId, decimal decLedgerId) { List <DataTable> listObj = new List <DataTable>(); try { listObj = spDebitNoteMaster.DebitNoteReportSearch(strFromDate, strToDate, decVoucherTypeId, decLedgerId); } catch (Exception ex) { MessageBox.Show("DNBLL:15" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(listObj); }