public ActionResult ExcluirReserva(int id)
        {
            ReservaController controller = new ReservaController();
            var registro = controller.Buscar(id);

            return(View(registro));
        }
Пример #2
0
        public Reserva()
        {
            InitializeComponent();
            controller = new ReservaController();

            IniciarReserva();
        }
Пример #3
0
        public HistoricoReserva()
        {
            InitializeComponent();

            controller = new ReservaController();

            ConsultarHistorico();
        }
Пример #4
0
 public TelaReservas()
 {
     InitializeComponent();
     mesaController    = new MesaController();
     reservaController = new ReservaController();
     ClearControls();
     GetAll();
 }
        public ActionResult ExcluirReservaConfirmar(int id)
        {
            ReservaController controller = new ReservaController();

            controller.Excluir(id);

            return(RedirectToAction("ListaReserva"));
        }
        //----- Reserva
        public ActionResult ListaReserva()
        {
            //Instancia a controller de RN (SERVICE)
            ReservaController controller = new ReservaController();

            List <Reserva> lst = controller.Listar();

            return(View(lst));
        }
        public ActionResult InserirReserva(Reserva registro)
        {
            if (!ModelState.IsValid)
            {
                return(View(registro));
            }

            ReservaController controller = new ReservaController();

            controller.Inserir(registro);
            return(RedirectToAction("ListaReserva"));
        }
Пример #8
0
 public TelaReservasFinalizadas()
 {
     InitializeComponent();
     reservaController = new ReservaController();
     GetAll();
 }