public ActionResult PrepararAgregarItem() { if (this.IsAdminUserLoggedIn() == false) { return(View("AccesoDenegado")); } ViewBag.ModoOper = "NEW"; RubroCatalogo auxObj = new RubroCatalogo(); return(View("RubroItem", auxObj)); }
public ActionResult AgregarItem([FromBody] RubroCatalogo entidad) { if (!ModelState.IsValid) { return(View("Error", new Error() { Message = "Error in data" })); } if (this.IsAdminUserLoggedIn() == false) { return(View("AccesoDenegado")); } var Repo = new RubroCatalogoBLL(); Repo.Agregar(entidad); ViewBag.Rubros = Repo.Listar(); return(View("Rubros")); }
public ActionResult EliminarItem(int ID) { if (!ModelState.IsValid) { return(View("Error", new Error() { Message = "Error in data" })); } if (this.IsAdminUserLoggedIn() == false) { return(View("AccesoDenegado")); } var Repo = new RubroCatalogoBLL(); var auxObj = new RubroCatalogo(); auxObj.Id = ID; Repo.Eliminar(auxObj); ViewBag.Rubros = Repo.Listar(); return(View("Rubros")); }