private void RegisterForm_Load(object sender, EventArgs e) { var places = PlaceRepository.GetPlaces(); foreach (var place in places) { cmbSelectLocation.Items.Add($"{place.Id}_{place.Location}"); } }
private void LoginForm_FormClosed(object sender, FormClosedEventArgs e) { if (Helpers.PlaceHelper.PlaceId > 0) { PlaceInfo = PlaceRepository.GetPlaces().Where(a => a.Id == Helpers.PlaceHelper.PlaceId).SingleOrDefault(); lblLocationName.Text = PlaceInfo.Location; lblAppUserName.Text = Helpers.PlaceHelper.AppUserName; this.Show(); } else { Application.Exit(); } }
public static List <Place> GetPlaces() { return(mPlaceRepository.GetPlaces(null)); }
private List <Place> GetPlaces() { var places = PlaceRepository.GetPlaces(); return(places.ToList()); }
public ActionResult Places(string term) { return(Json(PlaceRepository.GetPlaces(term).Select(p => new { label = p.Name, id = p.Id }), JsonRequestBehavior.AllowGet)); }