public ActionResult PrRolePriConfig() { List <Role> roles = (List <Role>)CommonHelper.GetCommonApi("Roles", 3); Role role = roles.Find(p => p.ROLENAME == "---请选择---"); if (role == null) { roles.Add(new Role { ROLENO = "", ROLENAME = "---请选择---" }); } ViewBag.Roles = JsonConvert.SerializeObject(roles.OrderBy(p => p.ROLENO)); GridBusinessRule girdBusinessRule = new GridBusinessRule("角色操作权限维护") { GridId = "PrRolePriConfig", PrimaryKey = "POWERNO", AutoSearch = true, IsPaging = "false", GridDataUrl = Url.Action("QueryRolePrHandleConfig"), TreeUrl = Url.Action("QueryRolePrMenusConfig"), EditUrl = Url.Action("ModifyRolePower") }; return(View(girdBusinessRule)); }
public ActionResult PrStaffRoleConfig() { var rsp = WeChatHelper.PostService <DeptStaff, DeptStaffResponse>("DeptStaff", new DeptStaff { RequestType = 0, CurrDept = Session["DepartNo"].CastTo(""), CurrOper = Session["StaffNo"].CastTo("") }); List <InsideDepart> departList = rsp.Departs.ToList(); departList.Add(new InsideDepart { DEPARTNO = "", DEPARTNAME = "--请选择--" }); List <InsideStaff> staffList = rsp.Staffs.ToList(); staffList.Add(new InsideStaff { STAFFNO = "", STAFFNAME = "--请选择--", DEPARTNO = "" }); ViewBag.Staffs = JsonConvert.SerializeObject(staffList.OrderBy(p => p.STAFFNO)); ViewBag.Departs = JsonConvert.SerializeObject(departList.OrderBy(p => p.DEPARTNO)); GridBusinessRule girdBusinessRule = new GridBusinessRule("员工角色信息维护"); girdBusinessRule.GridId = "PrStaffRoleConfig"; girdBusinessRule.ToolbarItem = "search"; girdBusinessRule.PrimaryKey = "ROLENO"; girdBusinessRule.AutoSearch = false; girdBusinessRule.IsClosedQueryModal = "false"; girdBusinessRule.GridDataUrl = Url.Action("QueryPrStaffNoRole"); girdBusinessRule.PermmitUrl = Url.Action("ModifyPrStaffRole"); return(View(girdBusinessRule)); }
public ActionResult PrMsgNewMsg(string id, string level, string state, string body, string time, string title, string sender, string fileNo, string isPage, string boxfrom) { List <Role> roles = (List <Role>)CommonHelper.GetCommonApi("Roles", 3); List <InsideDepart> departs = (List <InsideDepart>)CommonHelper.GetCommonApi("Departs", 4); List <InsideStaff> staffs = (List <InsideStaff>)CommonHelper.GetCommonApi("Staffs", 5); List <RoleExt> roleExts = roles.Select(role => new RoleExt() { id = role.ROLENO, text = role.ROLENAME, desc = role.ROLENO + ":" + role.ROLENAME }).ToList(); List <DepartExt> departExts = departs.Select(depart => new DepartExt() { id = depart.DEPARTNO, text = depart.DEPARTNAME, desc = depart.DEPARTNO + ":" + depart.DEPARTNAME }).ToList(); List <StaffExt> staffExts = staffs.Select(staff => new StaffExt() { id = staff.STAFFNO, text = staff.STAFFNAME, desc = staff.STAFFNO + ":" + staff.STAFFNAME }).ToList(); //删除当前用户 staffExts.Remove(staffExts.Where(r => r.id == Session["StaffNo"].CastTo("")).Single()); ViewBag.Roles = JsonConvert.SerializeObject(roleExts.OrderBy(p => p.id)); ViewBag.Departs = JsonConvert.SerializeObject(departExts.OrderBy(p => p.id)); ViewBag.Staffs = JsonConvert.SerializeObject(staffExts.OrderBy(p => p.id)); if (!string.IsNullOrEmpty(id)) { ViewBag.Id = id; ViewBag.Title = title; ViewBag.Level = level; ViewBag.State = state; ViewBag.Body = body; ViewBag.Time = " 发送于:" + time; ViewBag.Sender = sender; ViewBag.FileNo = fileNo; ViewBag.IsPage = isPage; ViewBag.Boxfrom = boxfrom; } GridBusinessRule girdBusinessRule = new GridBusinessRule("写新消息") { AutoSearch = false, IsClosedQueryModal = "true", EditUrl = Url.Action("QueryBeforeOrNext"), DownUrl = Url.Action("DownLoadFile"), PermmitUrl = Url.Action("SendMsg") }; return(View(girdBusinessRule)); }
public ActionResult PrMsgSentItems() { GridBusinessRule girdBusinessRule = new GridBusinessRule("已发送消息") { GridId = "PrMsgSentItems", ToolbarItem = "delete,transfer", PrimaryKey = "MSGID", AutoSearch = true, IsClosedQueryModal = "true", DeleteUrl = Url.Action("DelMsg"), GridDataUrl = Url.Action("QuerySentItems") }; return(View(girdBusinessRule)); }
public ActionResult PrMsgInbox() { GridBusinessRule girdBusinessRule = new GridBusinessRule("收件箱") { GridId = "PrMsgInbox", ToolbarItem = "delete,transfer,returnmsg", PrimaryKey = "MSGID", AutoSearch = true, IsClosedQueryModal = "true", DeleteUrl = Url.Action("DelMsg"), GridDataUrl = Url.Action("QueryInbox"), PermmitUrl = Url.Action("InboxCheck") }; return(View(girdBusinessRule)); }
public ActionResult PrRoleConfig() { GridBusinessRule girdBusinessRule = new GridBusinessRule("角色信息维护") { GridId = "PrRoleConfig", ToolbarItem = "add,edit,delete", PrimaryKey = "ROLENO", AutoSearch = true, IsClosedQueryModal = "true", AddUrl = Url.Action("AddPrRoleConfig"), EditUrl = Url.Action("ModifyPrRoleConfig"), DeleteUrl = Url.Action("DeletePrRoleConfig"), GridDataUrl = Url.Action("QueryPrRoleConfig") }; return(View(girdBusinessRule)); }