Ejemplo n.º 1
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridSearchRegister()
 {
     try
     {
         if (txtDate.Text != string.Empty && txtToDate.Text != string.Empty)
         {
             if (Convert.ToDateTime(txtToDate.Text) < Convert.ToDateTime(txtDate.Text))
             {
                 MessageBox.Show("Todate should be greater than fromdate", "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 SetDate();
             }
         }
         else if (txtDate.Text == string.Empty)
         {
             SetDate();
         }
         if (cmbAccountLedger.Text.Trim() == string.Empty)
         {
             cmbAccountLedger.Text = "ALL";
         }
         DataTable             dtbl            = new DataTable();
         PDCReceivableMasterSP spPdcreceivable = new PDCReceivableMasterSP();
         dtbl = spPdcreceivable.PDCReceivableRegisterSearch(Convert.ToDateTime(dtpDate.Value.ToString()), Convert.ToDateTime(dtpTodate.Value.ToString()), txtvoucherNo.Text.Trim(), cmbAccountLedger.Text.ToString());
         DgvPdCreceivable.DataSource = dtbl;
         if (cmbAccountLedger.Text == "ALL")
         {
             cmbAccountLedger.Text = string.Empty;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PRREG5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dtFromdate"></param>
        /// <param name="dtTodate"></param>
        /// <param name="strVoucherNo"></param>
        /// <param name="strLedgerName"></param>
        /// <returns></returns>
        public List <DataTable> PDCReceivableRegisterSearch(DateTime dtFromdate, DateTime dtTodate, string strVoucherNo, string strLedgerName)
        {
            List <DataTable> ListObj = new List <DataTable>();

            try
            {
                ListObj = spPdcRecievebleMaster.PDCReceivableRegisterSearch(dtFromdate, dtTodate, strVoucherNo, strLedgerName);
            }
            catch (Exception ex)
            {
                MessageBox.Show("PDCR:15" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(ListObj);
        }