Ejemplo n.º 1
0
        public ActionResult EditTripBookingAccommodation(int id, int tripId = 0)
        {
            _CheckForAdminAccess();

            var context = new TravelogyDevEntities1();
            var _model  = new AdminTripBookingAccommodationEditModel()
            {
                TripId   = tripId,
                DbObject = context.View_TripBookingAccommodation.Where(p => p.Id == id).FirstOrDefault()
            };

            return(View(_model));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> SaveTripBookingAccommodationAsync(AdminTripBookingAccommodationEditModel model)
        {
            _CheckForAdminAccess();

            var _blError = await AdminUtility.SaveTripBookingAccommodation(model.DbObject);

            if (model.TripId == 0)
            {
                return(RedirectToAction("TripBookingAccommodations"));
            }
            else
            {
                return(RedirectToAction("TripManagement", new { @id = model.TripId }));
            }
        }