Пример #1
0
        /// <summary>
        /// Gets all available data.
        /// </summary>
        /// <returns>The model</returns>
        public static UserListModel Get()
        {
            UserListModel m = new UserListModel();

            m.Users = SysUser.Get(new Params() { OrderBy = "sysuser_login" });
            m.Groups = SysGroup.GetStructure().Flatten();

            return m;
        }
Пример #2
0
        /// <summary>
        /// Gets the available user for the given group.
        /// </summary>
        /// <param name="groupId">The group id</param>
        /// <returns>The model</returns>
        public static UserListModel GetByGroupId(Guid groupId)
        {
            UserListModel m = new UserListModel();

            m.Users = SysUser.Get("sysuser_group_id= @0", groupId, new Params() { OrderBy = "sysuser_login" });
            m.Groups = SysGroup.GetStructure().Flatten();
            m.ActiveGroup = groupId;

            return m;
        }