Exemple #1
0
        public IHttpActionResult Put(Commission commission)
        {
            var commissionManager = new CommissionManagement();

            apiResponse = new ApiResponse();
            commissionManager.Update(commission);
            apiResponse.Data = commission;
            return(Ok(apiResponse));
        }
Exemple #2
0
        public IHttpActionResult GetCommission(Commission cedulaJuridicaDeHotel)
        {
            var commissionManager = new CommissionManagement();

            apiResponse = new ApiResponse();
            var commission = commissionManager.getCommission(cedulaJuridicaDeHotel);

            apiResponse.Data = commission;
            return(Ok(apiResponse));
        }
Exemple #3
0
 public IHttpActionResult Post(Commission commission)
 {
     try
     {
         var commissionManager = new CommissionManagement();
         commissionManager.Create(commission);
         apiResponse = new ApiResponse();
         return(Ok(apiResponse));
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
Exemple #4
0
 public IHttpActionResult Post3(Commission commission)
 {
     try
     {
         var commissionManager = new CommissionManagement();
         var tmpCommission     = commissionManager.IsAdminHotelRegistered(commission.Id);
         apiResponse      = new ApiResponse();
         apiResponse.Data = tmpCommission;
         return(Ok(apiResponse));
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
Exemple #5
0
        public async System.Threading.Tasks.Task <IHttpActionResult> Post2Async(EmailMembership email)
        {
            try
            {
                var commissionManager = new CommissionManagement();
                await commissionManager.Email(email);

                apiResponse = new ApiResponse();
                return(Ok(apiResponse));
            }
            catch (Exception e)
            {
                return(InternalServerError(e));
            }
        }