//private void fillGauge(int custId)
    //{
    //    try
    //    {
    //        string stgauge = q.GetGaugeIdname(custId);
    //        DataTable dtgauge = g.ReturnData(stgauge);
    //        ddlGaugeWise.DataSource = dtgauge;
    //        ddlGaugeWise.DataTextField = "gaugeNameAndID";
    //        ddlGaugeWise.DataValueField = "gauge_id";
    //        ddlGaugeWise.DataBind();
    //        ddlGaugeWise.Items.Insert(0, "All");

    //    }
    //    catch (Exception ex)
    //    {
    //        g.ShowMessage(this.Page, ex.Message);
    //    }
    //}
    private void fillCustomer()
    {
        try
        {
            DataTable dtcust = q.GetCustomerNameId();
            ddlcust.DataSource     = dtcust;
            ddlcust.DataTextField  = "customer_name";
            ddlcust.DataValueField = "customer_id";
            ddlcust.DataBind();
            ddlcust.Items.Insert(0, "All");
        }
        catch (Exception ex)
        {
            g.ShowMessage(this.Page, ex.Message);
        }
    }
Esempio n. 2
0
 private void fillCustomer()
 {
     try
     {
         DataTable custdt = q.GetCustomerNameId();
         ddlCustomer.DataSource     = custdt;
         ddlCustomer.DataTextField  = "customer_name";
         ddlCustomer.DataValueField = "customer_id";
         ddlCustomer.DataBind();
         ddlCustomer.Items.Insert(0, "--Select--");
         ddlCustomer.Focus();
     }
     catch (Exception ex)
     {
         g.ShowMessage(this.Page, ex.Message);
     }
 }