private void FillLocationGridView()
 {
     using (DataTable dt = lController.FetchAllLocation(currentUser.Username, ddlSearchByCountry.SelectedValue, txtLocationNameSearch.Text))
     {
         gvLocation.DataSource = dt;
         gvLocation.DataBind();
     }
 }
Esempio n. 2
0
        private void FillLocation()
        {
            clsLocation           e  = new clsLocation();
            clsLocationController ec = new clsLocationController();
            DataTable             dt = new DataTable();

            dt = ec.FetchAllLocation(currentUser.Username, "", "");
            if (dt.Rows.Count > 0)
            {
                ddlLocation.DataSource     = dt;
                ddlLocation.DataTextField  = "Loc_LocationName";
                ddlLocation.DataValueField = "Loc_LocationID";
                ddlLocation.DataBind();
                ddlLocation.Items.Insert(0, new ListItem("-- Select --", "0"));
            }
        }