public IActionResult Index(int id, String Search, int Registros) { if (_signInManager.IsSignedIn(User)) { Object[] objects = new Object[3]; var data = _lcategoria.getTCategoria(Search); if (0 < data.Count) { var url = Request.Scheme + "://" + Request.Host.Value; objects = new LPaginador <TCategoria>().paginador(_lcategoria.getTCategoria(Search), id, Registros, "Categorias", "Categorias/Categorias", "Index", url); } else { objects[0] = "No hay datos que mostrar"; objects[1] = "No hay datos que mostrar"; objects[2] = new List <TCategoria>(); } models = new DataPaginador <TCategoria> { List = (List <TCategoria>)objects[2], Pagi_info = (String)objects[0], Pagi_navegacion = (String)objects[1], Input = new TCategoria() }; return(View(models)); } else { //return RedirectToAction(nameof(HomeController.Index), "Home"); return(Redirect("/Home/Index")); } }
public IActionResult Categoria(int id, String Search, int Registros) { if (_signInManager.IsSignedIn(User)) { Object[] objects = new object[3]; var data = _lcategoria.getTCategoria(Search); if (data.Count > 0) { var url = Request.Scheme + "://" + Request.Host.Value; objects = new LPaginador <TCategoria>().paginador(_lcategoria.getTCategoria(Search) , id, Registros, "Categorias", "Categorias", "Categoria", url); } else { objects[0] = "No hay datos que mostrar"; objects[1] = "No hay datos que mostrar"; objects[2] = new List <TCategoria>(); } models = new DataPaginador <TCategoria> { List = (List <TCategoria>)objects[2], Pagi_info = (String)objects[0], Pagi_navegacion = (String)objects[1], Input = new TCategoria() }; if (identityError != null) { models.Pagi_info = identityError.Description; identityError = null; } return(View(models)); } else { return(RedirectToAction(nameof(HomeController.Index), "Home")); } }
public IActionResult Index(int id, String Search, int Registros) { if (_signInManager.IsSignedIn(User)) { Object[] objects = new Object[3]; var data = _curso.getTCursos(Search); if (0 < data.Count) { var url = Request.Scheme + "://" + Request.Host.Value; objects = new LPaginador <TCursos>().paginador(data , id, Registros, "Cursos", "Cursos/Cursos", "Index", url); } else { objects[0] = "No hay datos que mostrar"; objects[1] = "No hay datos que mostrar"; objects[2] = new List <TCursos>(); } models = new DataPaginador <TCursos> { List = (List <TCursos>)objects[2], Pagi_info = (String)objects[0], Pagi_navegacion = (String)objects[1], Categorias = _lcategoria.getTCategoria(), Input = new TCursos() }; if (identityError != null) { models.Pagi_info = identityError.Description; identityError = null; } return(View(models)); } else { return(Redirect("/Home/Index")); } }