Beispiel #1
0
 public HttpResponseMessage GetExams()
 {
     try
     {
         List <BranchExam> ListExams = new List <BranchExam>();
         ListExams = BranchExamsManager.GetExams();
         return(Request.CreateResponse(HttpStatusCode.Created, ListExams));
     }
     catch (Exception)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, $"failed to get exams"));
     }
 }
Beispiel #2
0
 public HttpResponseMessage GetBranchExamsBybranchId([FromUri] int id)
 {
     try
     {
         List <BranchExam> ListBranchExamByBranchId = new List <BranchExam>();
         ListBranchExamByBranchId = BranchExamsManager.GetBranchExamsBybranchId(id);
         return(Request.CreateResponse(HttpStatusCode.Created, ListBranchExamByBranchId));
     }
     catch (Exception)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, $"failed to get GetBranchExamsBybranchId {id}"));
     }
 }