public ActionResult ClassActivityList()
        {
            string classId = "";

            if (user.usertype == "p")
            {
                classId = user.childinfo.childbjid.ToString();
            }
            if (user.usertype == "s")
            {
                classId = (user.orgid ?? Guid.Empty).ToString();
            }
            var list = StudentAffarisHelper.getClassActivitiesByType(classId, "");

            return(View(list));
        }
 public JsonResult GetClassActivities(string classId, string type = "", int top = 0)
 {
     try
     {
         var result = StudentAffarisHelper.getClassActivitiesByType(classId, type, top)
                      .Select(
             p => new
         {
             p.ID,
             p.Title,
             p.Place,
             p.DateTime,
             p.TermID,
             p.CreateTime,
             p.Type
         });
         return(Json(new { flag = true, result }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         return(Json(new { flag = false, message = e.Message }, JsonRequestBehavior.AllowGet));
     }
 }