示例#1
0
        public string GetUserGroupName(int groupid)
        {
            string groupname = "未知分组";

            if (new CMS.BLL.user_groups().GetTitle(groupid) != "")
            {
                groupname = new CMS.BLL.user_groups().GetTitle(groupid);
            }
            return(groupname);
        }
示例#2
0
        private void AllowUserGroup()
        {
            CMS.BLL.user_groups bll = new CMS.BLL.user_groups();
            DataTable           dt  = bll.GetList(0, "", "id asc").Tables[0];

            this.cblAllowUserGroupID.Items.Clear();
            foreach (DataRow dr in dt.Rows)
            {
                this.cblAllowUserGroupID.Items.Add(new ListItem(dr["title"].ToString(), dr["id"].ToString()));
            }
        }
示例#3
0
        public string GetAllowUserGroupName(string idlist)
        {
            string strAllowUserGroupName = "";

            if (string.IsNullOrEmpty(idlist.Trim()))
            {
                strAllowUserGroupName = "所有用户";
            }
            else
            {
                string[] usergroupidlist = idlist.Split(',');
                foreach (string gid in usergroupidlist)
                {
                    if (!string.IsNullOrEmpty(gid.Trim()))
                    {
                        strAllowUserGroupName += new CMS.BLL.user_groups().GetTitle(int.Parse(gid)) + ",";
                    }
                }
                strAllowUserGroupName = strAllowUserGroupName.TrimEnd(',');
            }
            return(strAllowUserGroupName);
        }