示例#1
0
 public RentContract Get(int rid)
 {
     try
     {
         RentContract result = (RentContract)Rent.GetSpecificRent(rid);
         return(result);
     }
     catch (Exception ex)
     {
         WriteLog($"Error on GET: {ex.Message}");
         return(new RentContract());
     };
 }
示例#2
0
 public HttpResponseMessage RentEnd(int rid)
 {
     try
     {
         Rent rent = Rent.GetSpecificRent(rid);
         rent.Endrent();
         return(new HttpResponseMessage(HttpStatusCode.OK));
     }
     catch (Exception ex)
     {
         WriteLog(ex.Message);
         return(new HttpResponseMessage(HttpStatusCode.InternalServerError));
     }
 }