public IActionResult Index() { if (!Diverso.Acesso(HttpContext.Session.GetComplexData <Usuario>("UserData"), 4)) { return(RedirectToAction("DeniedAccess", "Login")); } return(View(_contratoRepository.GetAll())); }
public IActionResult Create() { if (!Diverso.Acesso(HttpContext.Session.GetComplexData <Usuario>("UserData"), 3)) { return(RedirectToAction("DeniedAccess", "Login")); } ViewBag.ListaTipo = _tipoRepository.GetAllTipoDrop(3); return(View()); }
public IActionResult Create() { if (!Diverso.Acesso(HttpContext.Session.GetComplexData <Usuario>("UserData"), 1)) { return(RedirectToAction("DeniedAccess", "Login")); } ViewBag.Paginas = _usuarioPaginaRepository.Perfil(); return(View()); }
public IActionResult Delete(int?id) { if (!Diverso.Acesso(HttpContext.Session.GetComplexData <Usuario>("UserData"), 4)) { return(RedirectToAction("DeniedAccess", "Login")); } //Delete if (id == null) { return(NotFound()); } var _documento = _contratoRepository.GetById(id); if (_documento == null) { return(NotFound()); } return(View(_documento)); }
public IActionResult Edit(int?id) { if (!Diverso.Acesso(HttpContext.Session.GetComplexData <Usuario>("UserData"), 2)) { return(RedirectToAction("DeniedAccess", "Login")); } if (id == null) { return(NotFound()); } var _documento = _documentoRepository.GetById(id); if (_documento == null) { return(NotFound()); } ViewBag.ListaTipo = _tipoRepository.GetAllTipoDrop(1); return(View(_documento)); }
public IActionResult Edit(int?id) { if (!Diverso.Acesso(HttpContext.Session.GetComplexData <Usuario>("UserData"), 1)) { return(RedirectToAction("DeniedAccess", "Login")); } if (id == null) { return(NotFound()); } var _usuario = _usuarioRepository.GetByIdUsuarioPerfil(id); if (_usuario == null) { return(NotFound()); } ViewBag.Paginas = _usuarioPaginaRepository.Perfil(_usuario.ID); return(View(_usuario)); }