コード例 #1
0
ファイル: VagaController.cs プロジェクト: glodzienski/ASP.NET
 // GET: Vaga
 public ActionResult Index()
 {
     if (!base.VerifyIsAuthenticated() || !base.VerifyIsAdmin())
     {
         return(base.RedirectHome());
     }
     return(View(service.List()));
 }
コード例 #2
0
        // 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));
        }