Example #1
0
        public ActionResult EditTripBookingTransport(int id, int tripId = 0)
        {
            _CheckForAdminAccess();

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

            return(View(_model));
        }
Example #2
0
        public async Task <ActionResult> SaveTripBookingTransportAsync(AdminTripBookingTransportEditModel model)
        {
            _CheckForAdminAccess();

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

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

            else
            {
                return(RedirectToAction("TripBookingTransports"));
            }
        }