Example #1
0
 /// <summary>
 /// 获取用户或班级下的教师或学生(通讯录)
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static List<User> ClassUser_List(OCTeamClass model, int PageIndex, int PageSize)
 {
     try
     {
         using (var conn = DbHelper.CCService())
         {
             var p = new DynamicParameters();
             p.Add("@Key", model.Key);
             p.Add("@UserID", model.UserID);
             p.Add("@OCClassID", model.@OCClassID);
             p.Add("@UserType", model.UserType);
             p.Add("@GroupID", model.GroupID);
             p.Add("@PageIndex", PageIndex);
             p.Add("@PageSize", PageSize);
             return conn.Query<User>("ClassUser_List", p, commandType: CommandType.StoredProcedure).ToList();
         }
     }
     catch (Exception e)
     {
         return new List<User>();
     }
 }
Example #2
0
 /// <summary>
 /// 获取用户或班级下的教师或学生
 /// </summary>
 /// <param name="context"></param>
 public void ClassUser_List(HttpContext context)
 {
     OCTeamClass model = new OCTeamClass
     {
         Key =context.Request["Key"],
         UserID = UserService.CurrentUser.UserID,
         OCClassID = Convert.ToInt32(context.Request["OCClassID"]),
         UserType = Convert.ToInt32(context.Request["UserType"]),
         GroupID = Convert.ToInt32(context.Request["GroupID"])
     };
     int PageIndex=Convert.ToInt32(context.Request["PageIndex"]);
     int PageSize = Convert.ToInt32(context.Request["PageSize"]);
     IES.G2S.CourseLive.BLL.Test.MyGroupBLL mygroupbll = new IES.G2S.CourseLive.BLL.Test.MyGroupBLL();
     List<IES.JW.Model.User> list = mygroupbll.ClassUser_List(model,PageIndex,PageSize);
     if (list != null)
     {
         context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(list));
     }
     else
     {
         context.Response.Write("False");
     }
 }
Example #3
0
 public List<OCTeamClass> OCClass_UserID_Tree(OCTeamClass model)
 {
     return MyGroupDAL.OCClass_UserID_Tree(model);
 }
Example #4
0
 public List<User> ClassUser_List(OCTeamClass model, int PageIndex, int PageSize)
 {
     return MyGroupDAL.ClassUser_List(model,PageIndex,PageSize);
 }
Example #5
0
 /// <summary>
 /// 获取用户的在线课程及其下的班级树
 /// </summary>
 /// <param name="context"></param>
 public void OCClass_UserID_Tree(HttpContext context)
 {
     OCTeamClass model = new OCTeamClass
     {
         UserID = UserService.CurrentUser.UserID
     };
     IES.G2S.CourseLive.BLL.Test.MyGroupBLL mygroupbll = new IES.G2S.CourseLive.BLL.Test.MyGroupBLL();
     List<OCTeamClass> list = mygroupbll.OCClass_UserID_Tree(model);
     if (list != null)
     {
         context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(list));
     }
     else
     {
         context.Response.Write("False");
     }
 }
Example #6
0
 /// <summary>
 /// 获取用户的在线课程及其下的班级树
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static List<OCTeamClass> OCClass_UserID_Tree(OCTeamClass model)
 {
     try
     {
         using (var conn = DbHelper.CCService())
         {
             var p = new DynamicParameters();
             p.Add("@UserID", model.UserID);
             return conn.Query<OCTeamClass>("OCClass_UserID_Tree", p, commandType: CommandType.StoredProcedure).ToList();
         }
     }
     catch (Exception e)
     {
         return new List<OCTeamClass>();
     }
 }
Example #7
0
 public static List<OCTeamClass> OCClass_UserID_Tree()
 {
     string userid = IESCookie.GetCookieValue("ies");
     OCTeamClass model = new OCTeamClass { UserID = int.Parse(userid) };
     return new MyGroupBLL().OCClass_UserID_Tree(model);
 }
Example #8
0
 public static List<IES.JW.Model.User> ClassUser_List(string Key, int OCClassID, int UserType, int GroupID, int PageIndex, int PageSize)
 {
     string userid = IESCookie.GetCookieValue("ies");
     OCTeamClass model = new OCTeamClass { UserID = int.Parse(userid), Key = Key,OCClassID=OCClassID, UserType = UserType, GroupID=GroupID };
     return new MyGroupBLL().ClassUser_List(model,PageIndex,PageSize);
 }