Exemple #1
0
        public static TList <GE.MyLearning.BL.UserInfo> GetUserListByGroupID(string groupid)
        {
            string whereClause = "";

            if ((groupid == null) || (groupid == ""))
            {
                whereClause = "UserID not in (select UserID from UserGroup)";
            }
            else
            {
                whereClause = "UserID in (select UserID from UserGroup where GroupID=" + CommonClass.sqlString(groupid) + ")";
            }
            string orderBy = "UserCNName";
            int    count   = -1;

            return(DataRepository.UserInfoProvider.GetPaged(whereClause, orderBy, 0, 0x7fffffff, out count));
        }
Exemple #2
0
        public static TList <GE.MyLearning.BL.UserInfo> GetUserListByGroupIDAndPermissionID(string groupid, string permissionId)
        {
            string whereClause = "UserID in ( select UserID from UserRole as a inner join RolePermission as b on a.RoleID=b.RoleID where PermissionId=" + CommonClass.sqlString(permissionId) + ")";

            if ((groupid == "") || (groupid == null))
            {
                whereClause = whereClause + " and UserID not in (select UserID from UserGroup)";
            }
            else
            {
                whereClause = whereClause + " and UserID in (select UserID from UserGroup where GroupID=" + CommonClass.sqlString(groupid) + ")";
            }
            string orderBy = "UserCNName";
            int    count   = -1;

            return(DataRepository.UserInfoProvider.GetPaged(whereClause, orderBy, 0, 0x7fffffff, out count));
        }
Exemple #3
0
 public static string GetCourseRelationId()
 {
     return(CommonClass.BindId(DbHelperSQL.GetMaxID("CourseRelationID", "dbo.CourseRelation")));
 }