コード例 #1
0
 public ActionResult GetVideoAccess(int cplId, int courseType)
 {
     //这个地方要判断是否是公开课还是自约课
     if (courseType == 1)//公开课
     {
         var res = new Response <string>();
         res.Result = new GenSeeService().GetUrl(cplId);
         return(Json(res));
     }
     else//自约课
     {
         var res       = new Response <List <VideoListModel> >();
         var ret       = Common.GetRequestConent(SsoKey.GetKey(memberService.GetMember(member.Id).Result), Common.VideoAccessoryUrl, "{\"CplId\":\"" + cplId + "\",\"CourseType\":\"" + courseType + "\"}");
         var tempmodel = new JavaScriptSerializer().Deserialize <VideoInfoObject>(ret);
         if (tempmodel.Data != null && tempmodel.Data.Count > 0)
         {
             res.Result = new List <VideoListModel>();
             try
             {
                 tempmodel.Data.ForEach(c =>
                 {
                     var model             = new VideoListModel();
                     model.RecordStartTime = c.RecordStartTime;
                     //  url = string.Format("{0}?nickName={1}&token={2}", jr["Data"]["Url"].ToString(), jr["Data"]["Id"].ToString(), jr["Data"]["PASSWORD"].ToString());
                     model.DataUrl = string.Format("{0}?nickName={1}&token={2}", c.Url, c.Id, c.PASSWORD);
                     res.Result.Add(model);
                 });
             }
             catch (Exception ex)
             {
             }
         }
         return(Json(res));
     }
 }
コード例 #2
0
 public ActionResult GetLessonAccess(string CplId)
 {
     try
     {
         return(Content(Common.GetRequestConent(SsoKey.GetKey(memberService.GetMember(member.Id).Result), Common.LessonAccessoryUrl, "{\"CplId\":" + CplId + "}")));
     }
     catch (Exception ex)
     {
         return(Content(ex.Message));
     }
 }
コード例 #3
0
 public ActionResult CancelYuyue(int planId, int categoryCode)
 {
     try
     {
         return(Content(Common.GetRequestConent(SsoKey.GetKey(memberService.GetMember(member.Id).Result), Common.CancelOrderUrl, "{\"CategoryCode\":" + categoryCode + ",\"CplId\":" + planId + "}")));
     }
     catch (Exception ex)
     {
         return(Content(ex.Message));
     }
 }
コード例 #4
0
 public ActionResult GetCourseTeachers(int courseId, int classId, string teacherIds, string bookDate, int courseCount)
 {
     try
     {
         var coursestring = Common.GetRequestConent(SsoKey.GetKey(memberService.GetMember(member.Id).Result), Common.CapacityUrl, "{\"MemberId\":\"" + member.Id + "\",\"CourseId\":\"" + courseId + "\",\"ClassId\":\"" + classId + "\",\"BookDate\":\"" + bookDate + "\",\"CourseCount\":" + courseCount + ",\"TeacherId\":\"" + teacherIds + "\"}");
         return(Content(coursestring));
     }
     catch (Exception ex)
     {
         return(Content(""));
     }
 }
コード例 #5
0
 public ActionResult InsertCourse(int planId, int classId)
 {
     return(Content(Common.GetRequestConent(SsoKey.GetKey(memberService.GetMember(member.Id).Result), Common.AddtoCourseUrl, "{\"CplId\":\"" + planId + "\",\"ClassId\":\"" + classId + "\"}")));
 }
コード例 #6
0
        /// <summary>
        /// 提交课程预约
        /// </summary>
        /// <returns></returns>
        public ActionResult Order(int courseId, string teacherIds, string bookDate, int courseCount, string beginTime, int classId)
        {
            var coursestring = Common.GetRequestConent(SsoKey.GetKey(memberService.GetMember(member.Id).Result), Common.CommitCapacityUrl, "{\"MemberId\":\"" + member.Id + "\",\"CourseId\":\"" + courseId + "\",\"ClassId\":\"" + classId + "\",\"BookDate\":\"" + bookDate + "\",\"BeginTime\":\"" + beginTime + "\",\"CourseCount\":" + courseCount + ",\"TeacherIds\":\"" + teacherIds + "\"}");

            return(Content(coursestring));
        }