Exemple #1
0
        public async Task <HttpResponseMessage> ApproveFulfillment(FulfillmentPercentViewModel postedViewModel)
        {
            var businessResult = await promotionBS.PutInProcessQueueAsync(postedViewModel.Year, postedViewModel.Month);

            if (!businessResult.ReturnStatus)
            {
                return(CreateErrorResponse(businessResult));
            }
            return(Request.CreateResponse(HttpStatusCode.OK, businessResult));
        }
Exemple #2
0
        public async Task <HttpResponseMessage> StartCalculation(PromotionViewModel postedViewModel)
        {
            var mapper        = GetMapper();
            var commission    = mapper.Map <Promotion>(postedViewModel);
            var entityCreated = await businessService.PutInProcessQueueAsync(postedViewModel.Year, postedViewModel.Month);

            if (entityCreated.ReturnStatus == false)
            {
                return(CreateErrorResponse(entityCreated));
            }

            return(CreateViewModelResponse(postedViewModel, entityCreated));
        }