Beispiel #1
0
 /// <summary>
 /// gridfill function
 /// </summary>
 public void GridFill()
 {
     DataTable dtblSupplier = new DataTable();
     AccountLedgerSP spAccountledger = new AccountLedgerSP();
     decimal decAreaId = 0;
     decimal decRouteId = 0;
     try
     {
         if (cmbAreaSearch.Text == "All")
         {
             decAreaId = 0;
         }
         else
         {
             decAreaId = Convert.ToDecimal(cmbAreaSearch.SelectedValue.ToString());
         }
         if (cmbRouteSearch.Text == "All")
         {
             decRouteId = 0;
         }
         else
         {
             decRouteId = Convert.ToDecimal(cmbRouteSearch.SelectedValue.ToString());
         }
         dtblSupplier = spAccountledger.SupplierSearchAll(decAreaId, decRouteId, txtSupplierNameSearch.Text);
         dgvSupplier.DataSource = dtblSupplier;
     }
     catch (Exception ex)
     {
         MessageBox.Show("SUP7" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }