/// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void RegisterGridFill()
 {
     RejectionInMasterSP SpRejectionInMaster = new RejectionInMasterSP();
     try
     {
         decimal decvouchertypeId = 0;
         decimal decLedgerId = 0;
         string strInvoiceNo = string.Empty;
         strInvoiceNo = (txtRejectionInNo.Text.Trim() == string.Empty) ? string.Empty : txtRejectionInNo.Text;
         decLedgerId = (cmbCashorParty.SelectedIndex == 0 || cmbCashorParty.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbCashorParty.SelectedValue.ToString());
         decvouchertypeId = (cmbVoucherType.SelectedIndex == 0 || cmbVoucherType.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
         DateTime FromDate = this.dtpFromDate.Value;
         DateTime ToDate = this.dtpToDate.Value;
         DataTable dtbl = new DataTable();
         dgvRejectionInRegister.DataSource = SpRejectionInMaster.RejectionInRegisterFill(FromDate, ToDate, decLedgerId, strInvoiceNo, decvouchertypeId);
     }
     catch (Exception ex)
     {
         MessageBox.Show("RIRgstr:01" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemple #2
0
        /// <summary>
        /// Function to fill Datagridview
        /// </summary>
        public void RegisterGridFill()
        {
            RejectionInMasterSP SpRejectionInMaster = new RejectionInMasterSP();

            try
            {
                decimal decvouchertypeId = 0;
                decimal decLedgerId      = 0;
                string  strInvoiceNo     = string.Empty;
                strInvoiceNo     = (txtRejectionInNo.Text.Trim() == string.Empty) ? string.Empty : txtRejectionInNo.Text;
                decLedgerId      = (cmbCashorParty.SelectedIndex == 0 || cmbCashorParty.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbCashorParty.SelectedValue.ToString());
                decvouchertypeId = (cmbVoucherType.SelectedIndex == 0 || cmbVoucherType.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
                DateTime  FromDate = this.dtpFromDate.Value;
                DateTime  ToDate   = this.dtpToDate.Value;
                DataTable dtbl     = new DataTable();
                dgvRejectionInRegister.DataSource = SpRejectionInMaster.RejectionInRegisterFill(FromDate, ToDate, decLedgerId, strInvoiceNo, decvouchertypeId);
            }
            catch (Exception ex)
            {
                formMDI.infoError.ErrorString = "RIREG1:" + ex.Message;
            }
        }
        /// <summary>
        /// Function to fill Datagridview
        /// </summary>
        public void RegisterGridFill()
        {
            RejectionInMasterSP SpRejectionInMaster = new RejectionInMasterSP();

            try
            {
                decimal decvouchertypeId = 0;
                decimal decLedgerId      = 0;
                string  strInvoiceNo     = string.Empty;
                strInvoiceNo     = (txtRejectionInNo.Text.Trim() == string.Empty) ? string.Empty : txtRejectionInNo.Text;
                decLedgerId      = (cmbCashorParty.SelectedIndex == 0 || cmbCashorParty.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbCashorParty.SelectedValue.ToString());
                decvouchertypeId = (cmbVoucherType.SelectedIndex == 0 || cmbVoucherType.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
                DateTime  FromDate = this.dtpFromDate.Value;
                DateTime  ToDate   = this.dtpToDate.Value;
                DataTable dtbl     = new DataTable();
                dgvRejectionInRegister.DataSource = SpRejectionInMaster.RejectionInRegisterFill(FromDate, ToDate, decLedgerId, strInvoiceNo, decvouchertypeId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("RIRgstr:01" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }