Esempio n. 1
0
        public static string GetModerDropdownOptions(int uid)
        {
            var sb = new StringBuilder();
            //foreach (DataRow dataRow in BBX.Data.Forums.GetModerForums(uid).Rows)
            //{
            //	sb.AppendFormat("<option value=\"{0}\">{1}</option>", dataRow["fid"], dataRow["name"]);
            //}
            var list = Moderator.FindAllByUid(uid).ToList();

            foreach (var item in XForum.Root.AllChilds)
            {
                if (!list.Any(e => e.Fid == item.ID))
                {
                    continue;
                }

                sb.AppendFormat("<option value=\"{0}\">{1}</option>", item.ID, item.Name);
            }
            return(sb.ToString());
        }