Пример #1
0
        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));
        }
Пример #2
0
        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));
        }