public async Task <IActionResult> MostrarSuministros() { if (User.Identity.IsAuthenticated) { string permiso = Permisos("PermisoSubModulo").PSMAPB ? "PermisoSubModulo" : "PermisoModulo"; bool crear = Permisos(permiso).PMMAPL.Where(w => w.Value.Contains("Crear")).Any(); if (crear) { List <Col_Suministros> suministros = await service.MostrarSuministros(); return(Json(new { data = suministros })); } else { return(NotFound()); } } else { return(RedirectToAction("Index", "Login")); } }