示例#1
0
        private void RegisterForm_Load(object sender, EventArgs e)
        {
            var places = PlaceRepository.GetPlaces();

            foreach (var place in places)
            {
                cmbSelectLocation.Items.Add($"{place.Id}_{place.Location}");
            }
        }
示例#2
0
 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();
     }
 }
示例#3
0
 public static List <Place> GetPlaces()
 {
     return(mPlaceRepository.GetPlaces(null));
 }
        private List <Place> GetPlaces()
        {
            var places = PlaceRepository.GetPlaces();

            return(places.ToList());
        }
示例#5
0
 public ActionResult Places(string term)
 {
     return(Json(PlaceRepository.GetPlaces(term).Select(p => new { label = p.Name, id = p.Id }),
                 JsonRequestBehavior.AllowGet));
 }