public List <DataTable> ReceiptMasterSearch(DateTime dtpFromDate, DateTime dtpToDate, decimal decledgerId, string strvoucherNo)
        {
            List <DataTable> listobj = new List <DataTable>();

            try
            {
                ReceiptMasterSP spReceiptMaster = new ReceiptMasterSP();
                listobj = spReceiptMaster.ReceiptMasterSearch(dtpFromDate, dtpToDate, decledgerId, strvoucherNo);
            }
            catch (Exception ex)
            {
                MessageBox.Show("RD15:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(listobj);
        }
Esempio n. 2
0
 /// <summary>
 /// Function to fill datagridview
 /// </summary>
 public void gridfill()
 {
     try
     {
         ReceiptMasterSP   SpReceiptMaster   = new ReceiptMasterSP();
         ReceiptMasterInfo InfoReceiptMaster = new ReceiptMasterInfo();
         DataTable         dtbl = new DataTable();
         if (cmbAccountLedger.SelectedValue.ToString() != "System.Data.DataRowView")
         {
             if (txtFromDate.Text.Trim() != string.Empty && txtToDate.Text.Trim() != string.Empty)
             {
                 dtbl = SpReceiptMaster.ReceiptMasterSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), Convert.ToDecimal(cmbAccountLedger.SelectedValue), txtVoucherNo.Text);
                 dgvReceiptRegister.DataSource = dtbl;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("RR4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }