public ActionResult GetList(E_PageParameter ePageParameter) { int pageIndex = Utils.GetInt(Request["page"]); ePageParameter.pageindex = pageIndex > 0 ? pageIndex - 1 : pageIndex; ePageParameter.pagesize = 20; List <tb_Sample> list = new List <tb_Sample>(); int count = 0; switch (CurrentUserInfo.DataRange) { case 3: //个人 ePageParameter.areaid = -1; ePageParameter.createuser = CurrentUserInfo.PersonnelID; break; case 2: //区域 ePageParameter.areaid = (int)CurrentUserInfo.AreaID; break; } list = _dSample.GetSampleList(ePageParameter, ref count); ViewBag.SampleList = list; ViewBag.arealist = _tArea.GetModelList((CurrentUserInfo.DataRange > 1 ? $"AreaID={CurrentUserInfo.AreaID}" : "")); ViewBag.ePageParameter = ePageParameter; ViewBag.page = Utils.ShowPage(count, ePageParameter.pagesize, pageIndex, 5); return(View("/views/Sample/SampleList.cshtml")); }
public ActionResult EasyConsumeLock() { ViewData["ddl_company"] = PublicClass.GetAreaList("请选择", CurrentUserInfo.AreaID.Value); List <E_tb_Area> _Arealist = new List <E_tb_Area>(); T_tb_Area tArea = new T_tb_Area(); if (CurrentUserInfo.RoleID == 3) { _Arealist = tArea.GetModelList(""); } else { _Arealist = tArea.GetModelList(" AreaID = " + CurrentUserInfo.AreaID.Value); } ViewData["Arealist"] = _Arealist; return(View()); }
/// <summary> /// 获得区域数据列表 /// </summary> /// <returns></returns> private SelectList GetAreaList() { List <E_tb_Area> Laboratorylist = tArea.GetModelList(""); List <SelectListItem> list = new List <SelectListItem>(); foreach (E_tb_Area item in Laboratorylist) { list.Add(new SelectListItem() { Text = item.AreaName, Value = item.AreaID.ToString() }); } return(new SelectList(list, "Value", "Text")); }
D_Statistics dStatistics = new D_Statistics(); //数据统计 // // GET: /Laboratory/ public ActionResult TestReportList(E_PageParameter ePageParameter) { int pageIndex = Utils.GetInt(Request["page"]); ePageParameter.pageindex = pageIndex > 0 ? pageIndex - 1 : pageIndex; ePageParameter.pagesize = 20; ViewBag.arealist = tArea.GetModelList((CurrentUserInfo.DataRange > 1 ? $"AreaID={CurrentUserInfo.AreaID}" : "")); ViewBag.TestReportList = this.GetList(ePageParameter); ViewBag.ePageParameter = ePageParameter; ViewBag.page = Utils.ShowPage(ePageParameter.count, ePageParameter.pagesize, pageIndex, 5); ViewBag.NoFinishExpePlanCount = dStatistics.GetNoFinishExpePlanCount(CurrentUserInfo.PersonnelID); ViewBag.NoExamineTestReportCount = dStatistics.GetNoExamineTestReportCount(); ViewBag.NoApprovalTestReportCount = dStatistics.GetNoApprovalTestReportCount(); return(View("/views/TestReport/TestReportList.cshtml")); }
/// <summary> /// 获取区域字典下拉菜单数据 /// </summary> /// <param name="IsSearch"></param> /// <returns></returns> public SelectList GetAreaList(bool IsSearch) { List <SelectListItem> list = new List <SelectListItem>(); if (IsSearch) { list.Add(new SelectListItem() { Text = "请选择", Value = "-1", Selected = true }); } List <E_tb_Area> TempList = tArea.GetModelList(""); foreach (E_tb_Area eTypeDict in TempList) { list.Add(new SelectListItem() { Text = eTypeDict.AreaName, Value = eTypeDict.AreaID.ToString() }); } list.First().Selected = true; return(new SelectList(list, "Value", "Text")); }