Example #1
0
        public static List <UserGroup> GetUserGroups()
        {
            List <UserGroup> list = new List <UserGroup>();

            foreach (DataRow row in ((UserGroupCache) new UserGroupCache().GetData()).dtUserGroup.Rows)
            {
                UserGroup userGroup = new UserGroup();
                UserGroup @object   = UserGroupUtils.GetObject(row);
                list.Add(@object);
            }
            return(list);
        }
Example #2
0
        public static List <UserGroup> GetUserGroupByName(string ugName)
        {
            List <UserGroup> list = new List <UserGroup>();

            DataRowView[] array = ((UserGroupCache) new UserGroupCache().GetData()).dvUserGroupBy_UgName.FindRows(ugName);
            for (int i = 0; i < array.Length; i++)
            {
                DataRowView dataRowView = array[i];
                UserGroup   userGroup   = new UserGroup();
                UserGroup   @object     = UserGroupUtils.GetObject(dataRowView.Row);
                list.Add(@object);
            }
            return(list);
        }
Example #3
0
        public static UserGroup GetUserGroup(string ugId)
        {
            UserGroup      userGroup      = null;
            UserGroupCache userGroupCache = (UserGroupCache) new UserGroupCache().GetData();
            int            index          = userGroupCache.dvUserGroupBy_UgId.Find(ugId);
            bool           flag           = index >= 0;

            if (flag)
            {
                UserGroup userGroup2 = new UserGroup();
                userGroup = UserGroupUtils.GetObject(userGroupCache.dvUserGroupBy_UgId[index].Row);
            }
            return(userGroup);
        }