示例#1
0
 /// <summary>
 /// Function to fill the grid based on the search catogeries
 /// </summary>
 public void GridFill()
 {
     try
     {
         PaymentMasterSP SpPaymentMaster = new PaymentMasterSP();
         DataTable       dtbl            = new DataTable();
         if (cmbLedger.Items.Count != 0 && cmbVoucherType.Items.Count != 0 && cmbBankOrCash.Items.Count != 0)
         {
             if ((cmbLedger.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbVoucherType.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbBankOrCash.SelectedValue.ToString() != "System.Data.DataRowView"))
             {
                 if (txtFromDate.Text.Trim() != string.Empty && txtToDate.Text.Trim() != string.Empty)
                 {
                     dtbl = SpPaymentMaster.PaymentReportSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), Convert.ToDecimal(cmbLedger.SelectedValue), Convert.ToDecimal(cmbVoucherType.SelectedValue), Convert.ToDecimal(cmbBankOrCash.SelectedValue));
                     dgvPaymentReport.DataSource = dtbl;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PREP5:" + ex.Message;
     }
 }
示例#2
0
 /// <summary>
 /// Function to fill the grid based on the search catogeries
 /// </summary>
 public void GridFill()
 {
     try
     {
         PaymentMasterSP SpPaymentMaster = new PaymentMasterSP();
         DataTable       dtbl            = new DataTable();
         if (cmbLedger.Items.Count != 0 && cmbVoucherType.Items.Count != 0 && cmbBankOrCash.Items.Count != 0)
         {
             if ((cmbLedger.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbVoucherType.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbBankOrCash.SelectedValue.ToString() != "System.Data.DataRowView"))
             {
                 if (txtFromDate.Text.Trim() != string.Empty && txtToDate.Text.Trim() != string.Empty)
                 {
                     dtbl = SpPaymentMaster.PaymentReportSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), Convert.ToDecimal(cmbLedger.SelectedValue), Convert.ToDecimal(cmbVoucherType.SelectedValue), Convert.ToDecimal(cmbBankOrCash.SelectedValue));
                     dgvPaymentReport.DataSource = dtbl;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PRP5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
示例#3
0
 /// <summary>
 /// Function to fill the grid based on the search catogeries
 /// </summary>
 public void GridFill()
 {
     try
     {
         PaymentMasterSP SpPaymentMaster = new PaymentMasterSP();
         DataTable dtbl = new DataTable();
         if (cmbLedger.Items.Count != 0 && cmbVoucherType.Items.Count != 0 && cmbBankOrCash.Items.Count != 0)
         {
             if ((cmbLedger.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbVoucherType.SelectedValue.ToString() != "System.Data.DataRowView" ) && (cmbBankOrCash.SelectedValue.ToString() != "System.Data.DataRowView"))
             {
                 if (txtFromDate.Text.Trim() != string.Empty && txtToDate.Text.Trim() != string.Empty)
                 {
                     dtbl = SpPaymentMaster.PaymentReportSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), Convert.ToDecimal(cmbLedger.SelectedValue), Convert.ToDecimal(cmbVoucherType.SelectedValue), Convert.ToDecimal(cmbBankOrCash.SelectedValue));
                     dgvPaymentReport.DataSource = dtbl;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PRP5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }