예제 #1
0
    private void FillCenters()
    {
        try
        {
            CenterBL objCenterBL = new CenterBL();

            DataSet dsVehicleTypes = new DataSet();

            if (Cache["Centers"] == null)
            {
                dsVehicleTypes   = objHotLeadBL.GetAllLocations();
                Cache["Centers"] = dsVehicleTypes;
            }
            else
            {
                dsVehicleTypes = (DataSet)Cache["Centers"];
            }



            ddlCenter.DataValueField = "LocationId";
            ddlCenter.DataTextField  = "LocationName";
            ddlCenter.DataSource     = dsVehicleTypes.Tables[0];
            ddlCenter.DataBind();
        }
        catch (Exception ex)
        {
        }
    }
예제 #2
0
    private void GetCentersUpdateLIst()
    {
        DataSet GridCentersUpa = new DataSet();

        GridCentersUpa = objHotLeadBL.GetAllLocations();
        GridCentersUpades.DataSource = GridCentersUpa.Tables[0];
        GridCentersUpades.DataBind();
    }
예제 #3
0
 private void GetAllLocations()
 {
     try
     {
         DataSet dsCenters = objHotLeadBL.GetAllLocations();
         ddlcenters.Items.Clear();
         for (int i = 0; i < dsCenters.Tables[0].Rows.Count; i++)
         {
             if (dsCenters.Tables[0].Rows[i]["LocationId"].ToString() != "0")
             {
                 ListItem list = new ListItem();
                 list.Text  = dsCenters.Tables[0].Rows[i]["LocationName"].ToString();
                 list.Value = dsCenters.Tables[0].Rows[i]["LocationId"].ToString();
                 ddlcenters.Items.Add(list);
             }
         }
         //ddlcenters.Items.Insert(0, new ListItem("All", "0"));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }