public ActionResult Index(int?page) { int pageIndex = PagingHelper.GetPageIndex(page); AttendanceRecordCalSearchModel q = new AttendanceRecordCalSearchModel(); IAttendanceRecordCalService ss = new AttendanceRecordCalService(Settings.Default.db); IPagedList <AttendanceRecordCalView> records = ss.SearchCalView(q).ToPagedList(pageIndex, Settings.Default.pageSize); ViewBag.Query = q; SetExtraWorkTypeList(null); return(View(records)); }
public ActionResult Search([Bind(Include = "CompanyId,DepartmentId,StaffNr,IsException,IsExceptionHandled,AttendanceDateFrom,AttendanceDateEnd")] AttendanceRecordCalSearchModel q) { int pageIndex = 0; int.TryParse(Request.QueryString.Get("page"), out pageIndex); pageIndex = PagingHelper.GetPageIndex(pageIndex); IAttendanceRecordCalService ss = new AttendanceRecordCalService(Settings.Default.db); IPagedList <AttendanceRecordCalView> records = ss.SearchCalView(q).ToPagedList(pageIndex, Settings.Default.pageSize); ViewBag.Query = q; SetExtraWorkTypeList(null); return(View("Index", records)); }