Пример #1
0
        public string GetAuthoritydotLook()
        {
            string       shtml = "";
            SqlWhereList str   = new SqlWhereList();

            str.Add("ParentId", 1);
            str.Add("Status", 1);
            List <AuthorityDot> list = AuthorityBLL.GetAll(str);

            if (list != null)
            {
                foreach (AuthorityDot item in list)
                {
                    shtml += "<option value=\"" + item.RelevanceId + "\">" + item.Text + "</option>";
                }
            }
            return(shtml);
        }
Пример #2
0
        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));
        }
Пример #3
0
        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));
        }
Пример #4
0
        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));
        }