예제 #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;
 }