/// <summary>
 /// Fills Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         if (cmbCashOrParty.Text.Trim() == string.Empty)
         {
             cmbCashOrParty.Text = "All";
         }
         ServiceMasterSP spServiceMaster = new ServiceMasterSP();
         DataTable       dtbl            = new DataTable();
         dtbl = spServiceMaster.ServiceVoucherRegisterSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), txtVoucherNo.Text.Trim(), cmbCashOrParty.Text.ToString());
         dgvServiceVoucherRegister.DataSource = dtbl;
         if (cmbCashOrParty.Text == "All")
         {
             cmbCashOrParty.Text = string.Empty;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SVR 2 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Fills Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         if (cmbCashOrParty.Text.Trim() == string.Empty)
         {
             cmbCashOrParty.Text = "All";
         }
         ServiceMasterSP spServiceMaster = new ServiceMasterSP();
         DataTable dtbl = new DataTable();
         dtbl = spServiceMaster.ServiceVoucherRegisterSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), txtVoucherNo.Text.Trim(), cmbCashOrParty.Text.ToString());
         dgvServiceVoucherRegister.DataSource = dtbl;
         if (cmbCashOrParty.Text == "All")
         {
             cmbCashOrParty.Text = string.Empty;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SVR 2 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #3
0
 /// <summary>
 /// Fills Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         if (cmbCashOrParty.Text.Trim() == string.Empty)
         {
             cmbCashOrParty.Text = "All";
         }
         ServiceMasterSP spServiceMaster = new ServiceMasterSP();
         DataTable       dtbl            = new DataTable();
         dtbl = spServiceMaster.ServiceVoucherRegisterSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), txtVoucherNo.Text.Trim(), cmbCashOrParty.Text.ToString());
         dgvServiceVoucherRegister.DataSource = dtbl;
         if (cmbCashOrParty.Text == "All")
         {
             cmbCashOrParty.Text = string.Empty;
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SVREG2:" + ex.Message;
     }
 }