private ActionResult GetTotalCount(int?deptID, int?pageSize, int?pageIndex) { pageSize = pageSize ?? 20; if (pageIndex == null || pageIndex.Value < 1) { pageIndex = 1; } ViewResult view = new ViewResult(); JTPager pager = new JTPager() { Size = pageSize.Value, Index = pageIndex.Value }; int year = this.timeOverService.GetFirst()?.Year ?? DateTime.Now.Year; DepartmentDataObject dept = this.departmentService.GetOne(deptID.Value); int[] ids = dept.GetIDArray(); IList <BeMeasuredDataObject> beMeasuredList = this.beMeasuredService.GetTotal(ids, year, pager); view.ViewData["PageSize"] = pager.Size; view.ViewData["PageIndex"] = pager.Index; view.ViewData["PageCount"] = pager.Count; view.ViewData["RecordCount"] = pager.Total; view.ViewData["DeptID"] = deptID.Value; view.ViewName = "EvaluationCountResult"; view.ViewData["BeMeasuredList"] = beMeasuredList; return(view); }
public ActionResult AddUser(int?deptID, int?id, int?pageSize, int?pageIndex) { if (deptID == null) { return(Redirect(Request.UrlReferrer.ToString())); } JTPager pager = new JTPager(); pager.Size = pageSize == null || pageSize.Value <= 0 ? 20 : pageSize.Value; pager.Index = pageIndex == null || pageIndex.Value <= 0 ? 1 : pageIndex.Value; DepartmentDataObject dept = this.departmentService.GetOne(deptID.Value); int[] ids = dept.UserList.Select(p => p.ID).ToArray(); IList <UserInfoDataObject> userList = this.userInfoService.GetList(ids, pager); ViewData["PageSize"] = pager.Size; ViewData["PageIndex"] = pager.Index; ViewData["PageCount"] = pager.Count; ViewData["RecordCount"] = pager.Total; ViewData["Department"] = dept; ViewData["UserList"] = userList; return(View()); }
public ActionResult AddUserInfoToMeasured(int?id, int?pageSize, int?pageIndex) { if (id == null) { return(Redirect(Request.UrlReferrer.ToString())); } JTPager pager = new JTPager(); pager.Size = pageSize == null || pageSize.Value <= 0 ? 20 : pageSize.Value; pager.Index = pageIndex == null || pageIndex.Value <= 0 ? 1 : pageIndex.Value; BeMeasuredDataObject bm = this.beMeasuredService.GetOne(id.Value); List <int> ids = new List <int>(); foreach (MeasuredDataObject measured in bm.MeasuredList) { ids.AddRange(measured.UserList.Select(p => p.ID).ToArray()); } IList <UserInfoDataObject> userList = this.userInfoService.GetList(ids.ToArray(), pager); IList <DepartmentDataObject> deptList = this.departmentService.GetList(); IList <DutiesDataObject> dutiesList = this.dutiesService.GetList(); ViewData["DeptList"] = deptList; ViewData["DutiesList"] = dutiesList; ViewData["UserList"] = userList; ViewData["BeMeasured"] = bm; ViewData["PageSize"] = pager.Size; ViewData["PageIndex"] = pager.Index; ViewData["PageCount"] = pager.Count; ViewData["RecordCount"] = pager.Total; return(View()); }
public ActionResult PartakePerson(int?pageSize, int?pageIndex) { JTPager pager = new JTPager(); pager.Size = pageSize == null || pageSize.Value <= 0 ? 20 : pageSize.Value; pager.Index = pageIndex == null || pageIndex.Value <= 0 ? 1 : pageIndex.Value; List <UserInfoDataObject> userList = userInfoService.GetList(pager); ViewData["UserList"] = userList; ViewData["PageSize"] = pager.Size; ViewData["PageIndex"] = pager.Index; ViewData["PageCount"] = pager.Count; ViewData["RecordCount"] = pager.Total; return(View()); }
public ActionResult Person(int?pageSize, int?pageIndex) { JTPager pager = new JTPager(); pager.Size = pageSize == null || pageSize.Value <= 0 ? 20 : pageSize.Value; pager.Index = pageIndex == null || pageIndex.Value <= 0 ? 1 : pageIndex.Value; IList <BeMeasuredDataObject> beMeasureList = this.beMeasuredService.GetList(pager); ViewData["BeMeasureList"] = beMeasureList; ViewData["PageSize"] = pager.Size; ViewData["PageIndex"] = pager.Index; ViewData["PageCount"] = pager.Count; ViewData["RecordCount"] = pager.Total; return(View()); }
public ActionResult AddBeMeasured(int?pageSize, int?pageIndex) { JTPager pager = new JTPager(); pager.Size = pageSize == null || pageSize.Value <= 0 ? 20 : pageSize.Value; pager.Index = pageIndex == null || pageIndex.Value <= 0 ? 1 : pageIndex.Value; int[] beIDs = this.beMeasuredService.GetList().Select(p => p.UserInfo.ID).ToArray(); IList <UserInfoDataObject> userList = this.userInfoService.GetList(beIDs, pager); ViewData["UserList"] = userList; ViewData["PageSize"] = pager.Size; ViewData["PageIndex"] = pager.Index; ViewData["PageCount"] = pager.Count; ViewData["RecordCount"] = pager.Total; return(View()); }
public ActionResult StyleOfWorkAlready(int?pageSize, int?pageIndex) { pageSize = pageSize ?? 20; if (pageIndex == null || pageIndex.Value < 1) { pageIndex = 1; } ViewResult view = new ViewResult(); JTPager pager = new JTPager() { Size = pageSize.Value, Index = pageIndex.Value }; IList <UserInfoDataObject> userlist = this.userInfoService.StyleOfWorkAlready(pager); view.ViewData["PageSize"] = pager.Size; view.ViewData["PageIndex"] = pager.Index; view.ViewData["PageCount"] = pager.Count; view.ViewData["RecordCount"] = pager.Total; view.ViewData["UserList"] = userlist; view.ViewName = "EvaluationQuery"; return(view); }