// GET: Admin/saliemple public ActionResult Index(string Page) { var x = saliempleldn.GetAll(); ViewBag.TotalPages = Math.Ceiling(x.Count() / 10.0); int page = int.Parse(Page == null ? "1" : Page); ViewBag.Page = page; x = x.Skip((page - 1) * 10).Take(10); return(View(saliempleldn.GetAll())); }
// GET: Informe/SalidaMEmp public ActionResult Index(string buscarPor, string buscar) { if (buscarPor == "Mes") { return(View(salidaemp.GetAll().Where(y => y.FechaSalida.Month.ToString().StartsWith(buscar) || buscar == null))); } else if (buscarPor == "Anio") { return(View(salidaemp.GetAll().Where(y => y.FechaSalida.Year.ToString().StartsWith(buscar) || buscar == null))); } var x = salidaemp.GetAll(); return(View(x)); }