Exemple #1
0
        // GET: setors/Create
        public ActionResult Create()
        {
            ViewBag.TipoSetorId       = new SelectList(_tipoSetorAppService.ObterTodos(), "TipoSetorId", "Nome");
            ViewBag.AgenteAcidentes   = new MultiSelectList(_agenteAcidenteAppService.ObterTodos(), "AgenteAcidenteId", "Nome");
            ViewBag.AgenteBiologicos  = new MultiSelectList(_agenteBiologicoAppService.ObterTodos(), "AgenteBiologicoId", "Nome");
            ViewBag.AgenteErgonomicos = new MultiSelectList(_agenteErgonomicoAppService.ObterTodos(), "AgenteErgonomicoId", "Nome");
            ViewBag.AgenteFisicos     = new MultiSelectList(_agenteFisicoAppService.ObterTodos(), "AgenteFisicoId", "Nome");
            ViewBag.AgenteQuimicos    = new MultiSelectList(_agenteQuimicoAppService.ObterTodos(), "AgenteQuimicoId", "Nome");
            var setor = new SetorViewModel();

            return(View(setor));
        }
Exemple #2
0
        // GET: setors/Create
        public ActionResult Create()
        {
            if (Session["usuario"] == null)
            {
                return(RedirectToAction("Login", "Usuarios"));
            }

            ViewBag.TipoSetorId       = new SelectList(_tipoSetorAppService.ObterTodos(), "TipoSetorId", "Nome");
            ViewBag.AgenteAcidentes   = new MultiSelectList(_agenteAcidenteAppService.ObterTodos(), "AgenteAcidenteId", "Nome");
            ViewBag.AgenteBiologicos  = new MultiSelectList(_agenteBiologicoAppService.ObterTodos(), "AgenteBiologicoId", "Nome");
            ViewBag.AgenteErgonomicos = new MultiSelectList(_agenteErgonomicoAppService.ObterTodos(), "AgenteErgonomicoId", "Nome");
            ViewBag.AgenteFisicos     = new MultiSelectList(_agenteFisicoAppService.ObterTodos(), "AgenteFisicoId", "Nome");
            ViewBag.AgenteQuimicos    = new MultiSelectList(_agenteQuimicoAppService.ObterTodos(), "AgenteQuimicoId", "Nome");
            var setor = new SetorViewModel();

            return(View(setor));
        }