示例#1
0
    private void FillGrid()
    {
        DataTable dtBrand = objDesg.GetCityMaster(Session["CompId"].ToString().ToString());

        lblTotalRecords.Text = Resources.Attendance.Total_Records + ": " + dtBrand.Rows.Count + "";
        Session["dtCity"]    = dtBrand;
        Session["dtFilter"]  = dtBrand;
        if (dtBrand != null && dtBrand.Rows.Count > 0)
        {
            GvCity.DataSource = dtBrand;
            GvCity.DataBind();
            AllPageCode();
        }
        else
        {
            GvCity.DataSource = null;
            GvCity.DataBind();
        }
    }
示例#2
0
    public static string[] GetCompletionListCity(string prefixText, int count, string contextKey)
    {
        CityMaster objCity = new CityMaster();
        DataTable  dt      = new DataView(objCity.GetCityMaster(HttpContext.Current.Session["CompId"].ToString()), "City like '" + prefixText.ToString() + "%'", "", DataViewRowState.CurrentRows).ToTable();

        string[] txt = new string[dt.Rows.Count];

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            txt[i] = dt.Rows[i]["City"].ToString();
        }
        return(txt);
    }