// GET: Lista public ActionResult Index(int?nivel, string guid) { string login = HttpContext.User.Identity.Name.Split('\\')[1].ToUpper(); _navegadorSession = (Navegador)Session["Nav"]; if (nivel == null) { nivel = (int)Session["NivelCorrente"]; } _navegadorSession.OperaNivel(nivel, guid); var numeroDocumento = string.Empty; if (Session["NumeroDocumento"] != null) { numeroDocumento = (string)Session["NumeroDocumento"]; } if (nivel > 2) { if (_navegadorSession.PlanilhaEscolhida == null) { ViewBag.DocumentoAtivado = false; Session["NivelCorrente"] = nivel; ViewBag.SiglaUser = login; return(View()); } else if (_navegadorSession.PlanilhaEscolhida != null) { if (string.IsNullOrEmpty(numeroDocumento)) { ViewBag.DocumentoAtivado = false; ViewBag.SiglaUser = login; return(RedirectToAction("LTemplate", "Lista", new { guidPlanilha = _navegadorSession.PlanilhaEscolhida.GUID })); } } } else { ViewBag.DocumentoAtivado = false; Session["NivelCorrente"] = nivel; ViewBag.SiglaUser = login; return(View()); } return(View()); }
public ActionResult Index(int nivel, string guid) { Session["NivelCorrente"] = nivel; LayoutSession layoutSession = null; if (Session["BOTOES"] != null) { layoutSession = (LayoutSession)Session["BOTOES"]; } string login = HttpContext.User.Identity.Name.Split('\\')[1].ToUpper(); _navegadorSession = (Navegador)Session["Nav"]; var numeroDocumento = string.Empty; if (Session["NumeroDocumento"] != null) { numeroDocumento = (string)Session["NumeroDocumento"]; } _navegadorSession.OperaNivel(nivel, guid); if (nivel > 2) { if (_navegadorSession.PlanilhaEscolhida == null) { ViewBag.DocumentoAtivado = false; Session["NivelCorrente"] = nivel; ViewBag.SiglaUser = login; return(View()); } else if (_navegadorSession.PlanilhaEscolhida != null) { if (string.IsNullOrEmpty(numeroDocumento)) { ViewBag.DocumentoAtivado = false; ViewBag.SiglaUser = login; return(RedirectToAction("IndexLT", "ListaTemplate", new { guidPlanilha = _navegadorSession.PlanilhaEscolhida.GUID })); } else { ViewBag.DocumentoAtivado = false; ViewBag.SiglaUser = login; _navegadorSession.OperaNivel(nivel, guid); //var usuario = getUsuario(login); var isVerificador = getUsuario(login).GetBoolIsVerificador(); if (isVerificador) { TempData["LayoutUsuario"] = "_LayoutProjeto"; return(RedirectToAction("IndexLD", "ListaDocumento", new { guidDocumento = _navegadorSession.PlanilhaEscolhida.GUID })); } else { return(RedirectToAction("IndexLD", "ListaDocumento", new { guidDocumento = _navegadorSession.PlanilhaEscolhida.GUID })); } } } } else { ViewBag.DocumentoAtivado = false; Session["NivelCorrente"] = nivel; ViewBag.SiglaUser = login; return(View()); } return(View()); }