public ActionResult Search([Bind(Include = "StaffNr,StaffNrAct,ScheduleAtFrom,ScheduleAtEnd")]  ShiftScheduleSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            IShiftScheduleService ss = new ShiftSheduleService(Settings.Default.db);

            IPagedList <ShiftSchedule> models = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View("Index", models));
        }
        public ActionResult Index(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);

            ShiftScheduleSearchModel q = new ShiftScheduleSearchModel();

            IShiftScheduleService ss = new ShiftSheduleService(Settings.Default.db);

            IPagedList <ShiftSchedule> models = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            ShiftScheduleInfoModel info = ss.GetShiftScheduleInfo(q);

            ViewBag.Info = info;

            return(View(models));
        }