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); }
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())); } }
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); }