Beispiel #1
0
 /// <summary>
 /// Function to fill the grid based on the Search condition
 /// </summary>
 public void GridFill()
 {
     try
     {
         ReceiptMasterSP SpPaymentMaster = new ReceiptMasterSP();
         DataTable       dtbl            = new DataTable();
         if (cmbLedger.Items.Count != 0 && cmbVoucherType.Items.Count != 0 && cmbCashOrBank.Items.Count != 0)
         {
             if ((cmbLedger.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbVoucherType.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbCashOrBank.SelectedValue.ToString() != "System.Data.DataRowView"))
             {
                 if (txtFromDate.Text.Trim() != string.Empty && txtToDate.Text.Trim() != string.Empty)
                 {
                     dtbl = SpPaymentMaster.ReceiptReportSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), Convert.ToDecimal(cmbLedger.SelectedValue), Convert.ToDecimal(cmbVoucherType.SelectedValue), Convert.ToDecimal(cmbCashOrBank.SelectedValue));
                     dgvReceiptReport.DataSource = dtbl;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "RRP5:" + ex.Message;
     }
 }
 /// <summary>
 /// Function to fill the grid based on the Search condition
 /// </summary>
 public void GridFill()
 {
     try
     {
         ReceiptMasterSP SpPaymentMaster = new ReceiptMasterSP();
         DataTable dtbl = new DataTable();
         if (cmbLedger.Items.Count != 0 && cmbVoucherType.Items.Count != 0 && cmbCashOrBank.Items.Count != 0)
         {
             if ((cmbLedger.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbVoucherType.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbCashOrBank.SelectedValue.ToString() != "System.Data.DataRowView"))
             {
                 if (txtFromDate.Text.Trim() != string.Empty && txtToDate.Text.Trim() != string.Empty)
                 {
                     dtbl = SpPaymentMaster.ReceiptReportSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), Convert.ToDecimal(cmbLedger.SelectedValue), Convert.ToDecimal(cmbVoucherType.SelectedValue), Convert.ToDecimal(cmbCashOrBank.SelectedValue));
                     dgvReceiptReport.DataSource = dtbl;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("RRP5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }