Example #1
0
        public ActionResult EditLocationPlace(int id)
        {
            var location = locationPlaceService.GetLocationPlaceById(id);

            if (location != null)
            {
                var editLocation = new LocationPlaceModel(location);
                return(View(editLocation));
            }

            return(RedirectToAction("Index"));
        }
Example #2
0
        public ActionResult SaveLocationPlace(LocationPlaceModel newLocation)
        {
            if (ModelState.IsValid)
            {
                var saveLocationPlace = new LocationPlace
                {
                    Id           = newLocation.Id,
                    LocationName = newLocation.LocationName
                };

                locationPlaceService.SaveLocationPlace(saveLocationPlace);

                return(RedirectToAction("Index"));
            }

            return(View("EditLocationPlace", newLocation));
        }
Example #3
0
        public ActionResult CreateLocationPlace()
        {
            var model = new LocationPlaceModel();

            return(View("EditLocationPlace", model));
        }