public ActionResult System(int id, int p = 1) { var system = SysUpdateHelper.GetSystem(id); if (system == null) { return(NotFound()); } var perPage = 10; var pageResult = SysUpdateHelper.GetSystemPkgs(id, p, perPage); var model = new SystemViewModel { System = system, Packages = pageResult.Item1, TotalPage = (int)Math.Ceiling((pageResult.Item2 * 1.0 / perPage)), CurrPage = p, }; return(View(model)); }