public object GetauthorityList() { AuthoritydotPageModel myModel = new AuthoritydotPageModel(); AuthorityDotBLL authorityDotBLL = Factory.BusinessFactory.CreateBll <AuthorityDotBLL>(); SqlWhereList sw = new SqlWhereList(); sw.Add("ParentId", 0); myModel.AuthorityDots = authorityDotBLL.GetAll(sw); foreach (var item in myModel.AuthorityDots) { item.Options = GetOptions(item.Id); } return(new PageResult(null, myModel)); }
private string GetOptions(int parentId) { string res = string.Empty; AuthoritydotPageModel myModel = new AuthoritydotPageModel(); AuthorityDotBLL authorityDotBLL = Factory.BusinessFactory.CreateBll <AuthorityDotBLL>(); SqlWhereList sw = new SqlWhereList(); sw.Add("ParentId", parentId); List <AuthorityDot> list = authorityDotBLL.GetAll(sw); foreach (var item in list) { res += " , " + item.Text; } if (string.IsNullOrEmpty(res)) { return(""); } return(res.Substring(3)); }
public object GetAdminGroupUserList() { AuthorityDotBLL authorityDotBLL = Factory.BusinessFactory.CreateBll <AuthorityDotBLL>(); List <MyAuthorityDot> myAuthorityDotList = new List <MyAuthorityDot>(); SqlWhereList sw = new SqlWhereList(); sw.Add("ParentId", 0); foreach (var authorityDot in authorityDotBLL.GetAll(sw)) { MyAuthorityDot myAuthorityDot = new MyAuthorityDot(); SqlWhereList swl = new SqlWhereList(); swl.Add("ParentId", authorityDot.Id); myAuthorityDot.DotName = authorityDot.Text; myAuthorityDot.AuthorityDots = authorityDotBLL.GetAll(swl); myAuthorityDotList.Add(myAuthorityDot); } model.AuthorityDotList = myAuthorityDotList; model.AdminGroupList = groupBLL.GetAll(); model.AdministratorList = adminBLL.GetAdministratorList(); return(new PageResult(null, model)); }