public ActionResult ComplainList(int id = 0) { if (Session["Identity"] == null) { return RedirectToAction("login"); } DataClasses1DataContext s = new DataClasses1DataContext(); int? sz = s.getNotAcceptComplaintPageCount(6); IQueryable<getNotAcceptComplaintByPageResult> fs = s.getNotAcceptComplaintByPage(id + 1, 6); ViewData.Model = fs; ViewData["pageCount"] = id; ViewData["maxPage"] = sz; return View(); }