Ejemplo n.º 1
0
 public bool IsAproved(DateModel model)
 {
     try
     {
         return(OverTimeDetailBusiness.IsApprovedOverTime(model.year, model.month));
     }
     catch (Exception ex)
     {
         this.exceptionHandler.ApiHandleException("OverTimeController", ex);
         throw ex;
     }
 }
Ejemplo n.º 2
0
 public HttpResponseMessage approve(DateModel model)
 {
     try
     {
         OverTimeDetailBusiness.ApproveOverTime(model.year, model.month);
         return(Request.CreateResponse(HttpStatusCode.OK, model));
     }
     catch (UIValidationExceptions ex)
     {
         this.exceptionHandler.ApiHandleException("OverTimeController", ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.ExceptionList.Count > 0 ? ex.ExceptionList[0].Message : ex.Message));
     }
     catch (Exception ex)
     {
         this.exceptionHandler.ApiHandleException("OverTimeController", ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }