// GET: Vaga public ActionResult Index() { if (!base.VerifyIsAuthenticated() || !base.VerifyIsAdmin()) { return(base.RedirectHome()); } return(View(service.List())); }
// GET: Comanda/Edit/5 public ActionResult Edit(int id) { if (!base.VerifyIsAuthenticated()) { return(base.RedirectHome()); } Comanda comanda = comandaService.Show(id); if (comanda == null) { return(HttpNotFound()); } ViewBag.clientes = new SelectList(clienteService.List(), "ClienteID", "Cpf", comanda.ClienteID); ViewBag.servicos = new SelectList(servicoService.List(), "ServicoID", "Nome", comanda.ServicoID); ViewBag.vagas = new SelectList(vagaService.List(), "VagaID", "Codigo", comanda.VagaID); ViewBag.veiculos = new SelectList(veiculoService.List(), "VeiculoID", "Placa", comanda.VeiculoID); return(PartialView("ModalCadastroComandaView", comanda)); }