Exemplo n.º 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;
 }
Exemplo n.º 2
0
 public string GetLessonByCat(int id)
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.GetLessonByCat(id);
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }
Exemplo n.º 3
0
 public string GetAllLesson()
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.GetAll();
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }
Exemplo n.º 4
0
 public HttpResponseMessage PostLessonUpdate([FromBody] Lesson lesson
    
      )
 {
     ILessonRepository manageLesson = new LessonRepository();
     var result = manageLesson.Update(lesson);
     return Request.CreateResponse(HttpStatusCode.OK, result);
 }
Exemplo n.º 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);
 }
Exemplo n.º 6
0
 public string GetLessonFutur(int iduser)
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.GetLessonByUserInFewTime(iduser);
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }