Beispiel #1
0
        public ActionResult CadastrarNovaOrdem() // chamar tela de cadastro ok
        {
            var ordemApp    = new OrdemServicoService();
            var listServico = ordemApp.listarServicos();

            ViewBag.servicos = new SelectList(listServico, "ID", "Nome");

            var listStatus = ordemApp.listarStatus();

            ViewBag.Status = new SelectList(listStatus, "ID", "Nome");

            return(View()); // view criada
        }
Beispiel #2
0
        public ActionResult EditarOrdemServico(int id)  // receber id do obj selecionado, buscar e mostrar na tela
        {
            var ordemApp    = new OrdemServicoService();
            var listServico = ordemApp.listarServicos();

            ViewBag.servicos = new SelectList(listServico, "ID", "Nome");

            var listStatus = ordemApp.listarStatus();

            ViewBag.Status = new SelectList(listStatus, "ID", "Nome");

            var buscarOrdem = new OrdemServicoService().buscarOrdemServico(id);

            return(View(buscarOrdem));  // view criada
        }