// // GET: /Platform/SysController/Edit/5 public ActionResult Edit(Guid?id) { var item = new SysController(); if (id.HasValue) { item = _sysControllerService.GetById(id.Value); } ViewBag.SysAreaId = new SelectList(_sysAreaService.GetAllEnt(), "Id", "AreaDisplayName", item.SysAreaId); ViewBag.SysActionsId = new MultiSelectList(_sysActionService.GetAllEnt(), "Id", "ActionDisplayName", item.SysControllerSysActions != null ? item.SysControllerSysActions.Where(a => !a.Deleted).Select(a => a.SysActionId) : null); return(View(item)); }
// // GET: /Platform/SysArea/ public ActionResult Index(string keyword, string ordering, int pageIndex = 1) { var model = _sysAreaService.GetAllEnt().Select(a => new { a.AreaDisplayName, a.AreaName, a.SystemId, a.CreatedDate, a.Remark, a.Id }).Search(keyword); if (!string.IsNullOrEmpty(ordering)) { model = model.OrderBy(ordering, null); } if (!string.IsNullOrEmpty(Request["report"])) { //导出 var reportModel = new Report(model.ToReportSource()); return(new ReportResult(reportModel)); } return(View(model.ToPagedList(pageIndex))); }