示例#1
0
        public virtual ActionResult Editar(int id)
        {
            var itens = new TIten();

            ViewBag.Reservation = TReservation.ListAll().ToSelectList(x => x.Id, x => x.Id);
            ViewBag.Movie       = TMovie.ListAll().ToSelectList(x => x.Id, x => x.Id);
            return(View());
        }
示例#2
0
 public virtual ActionResult Editar(TIten model)
 {
     try
     {
         TempData["Alert"] = new Alert("success", "Seu item foi editado com sucesso");
         model.Save();
         return(RedirectToAction("Index"));
     }
     catch (SimpleValidationException ex)
     {
         ViewBag.Reservation = TReservation.ListAll().ToSelectList(x => x.Id, x => x.Id);
         ViewBag.Movie       = TMovie.ListAll().ToSelectList(x => x.Id, x => x.Id);
         return(HandleViewException(model, ex));
     }
 }
        public virtual ActionResult Index()
        {
            var reserva = TReservation.ListAll().ToList();

            return(View(reserva));
        }