/// <summary> /// Function to fill Datagridview /// </summary> public void GridFill() { try { decimal decAreaId = 0; decimal decRouteId = 0; DataTable dtbl = new DataTable(); AccountLedgerSP spAccountledger = new AccountLedgerSP(); if (cmbAreaSearch.Text == "All") { decAreaId = 0; } else { decAreaId = Convert.ToDecimal(cmbAreaSearch.SelectedValue.ToString()); } if (cmbRoutSearch.Text == "All") { decRouteId = 0; } else { decRouteId = Convert.ToDecimal(cmbRoutSearch.SelectedValue.ToString()); } dtbl = spAccountledger.AccountLedgerSearchforCustomer(decAreaId, decRouteId, txtCustomerNameSearch.Text.Trim()); dgvCustomer.DataSource = dtbl; } catch (Exception ex) { MessageBox.Show("Cus13:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }