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)); }
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)); }