// GET: Listado public ActionResult Index() { if (this.IsAdminUserLoggedIn() == false) { return(View("AccesoDenegado")); } var InventarioRepo = new InventarioBLL(); ViewBag.Lista = InventarioRepo.Listar(); HttpContext.Session.SetString("Test", "1234"); return(View("Listado")); }
public ActionResult ModificarItem([FromBody] Inventario entidad) { if (!ModelState.IsValid) { return(View("Error", new Error() { Message = "Error in data" })); } if (this.IsAdminUserLoggedIn() == false) { return(View("AccesoDenegado")); } var Repo = new InventarioBLL(); Repo.Modificar(entidad); ViewBag.Inventario = Repo.Listar(); return(View("Inventario")); }