/******************************************************************** EXCLUIR INGREDIENTE ********************************************************************/ public ActionResult ExcluirIngrediente(String ID) { if (Session["UsuarioLogado"] == null) { return(RedirectToAction("Index", "Login")); } else if (Session["NivelAcesso"].Equals(2) || Session["NivelAcesso"].Equals(3) || Session["NivelAcesso"].Equals(4)) { if (!Request.HttpMethod.Equals("POST")) { try { I.ExcluirIngrediente(ID); String CodigoLote = Session["CodigoLote"].ToString(); return(RedirectToAction("DetalhesLote", "Lote", LC.LoteAtual)); } catch { // } } } else { return(RedirectToAction("Home", "Home")); } ViewBag.Imagens = Usuario.ListarImagem(Session["NIF"]); return(View()); }