コード例 #1
0
 public string GetLessonFilter(DateTime start, DateTime end, string zip)
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.GetFilter(start, end, zip);
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }
コード例 #2
0
 public string GetLessonByCat(int id)
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.GetLessonByCat(id);
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }
コード例 #3
0
 public string GetAllLesson()
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.GetAll();
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }
コード例 #4
0
 public HttpResponseMessage PostLessonUpdate([FromBody] Lesson lesson
    
      )
 {
     ILessonRepository manageLesson = new LessonRepository();
     var result = manageLesson.Update(lesson);
     return Request.CreateResponse(HttpStatusCode.OK, result);
 }
コード例 #5
0
 public HttpResponseMessage PostLessonBookCreate([FromBody] Booking booking
      )
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.Book(booking.user_id, booking.lesson_id);
     return Request.CreateResponse(HttpStatusCode.OK, result);
 }
コード例 #6
0
 public string GetLessonFutur(int iduser)
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.GetLessonByUserInFewTime(iduser);
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }