Пример #1
0
        /// <summary>
        ///		GroupId, GroupName
        /// </summary>
        public static DataTable GetListGroupsAsTreeDataTable()
        {
            DataTable dt;

            if (!Security.IsUserInGroup(InternalSecureGroups.Partner))
            {
                dt = new DataTable();
                dt.Columns.Add("GroupId", typeof(int));
                dt.Columns.Add("GroupName", typeof(string));
                GenerateTree(1, 0, ref dt);
            }
            else
            {
                int PartnerGroupId = DBGroup.GetGroupForPartnerUser(Security.CurrentUser.UserID);
                dt = DBGroup.GetListGroupsByPartnerDataTable(PartnerGroupId, true, false);
            }

            return(dt);
        }