public async Task <HttpResponseMessage> GetBranchPromotionReleasedStep1(int branchId) { var result_bizloading = await businessService.LoadBranchPromotionAsync(branchId, PromotionReviewStatusEnum.ReleasedStep1ByBranchManager); if (result_bizloading.ReturnStatus == false) { return(CreateErrorResponse(result_bizloading)); } var result = new BranchPromotionViewModel(); result.PromotionReviewStatusId = 0; if (result_bizloading.ResultValue != null) { var mapper = GetMapper(); result = mapper.Map <BranchPromotion, BranchPromotionViewModel>(result_bizloading.ResultValue); } return(CreateViewModelResponse(result, result_bizloading)); }
public async Task <HttpResponseMessage> GetBranchPromotionReleasedByCEO() { int branchId = IdentityConfig.GetBranchId(User); IBusinessResultValue <BranchPromotion> result_bizloading = await businessService.LoadBranchPromotionAsync(branchId, PromotionReviewStatusEnum.ReleasedByCEO); if (result_bizloading.ReturnStatus == false) { return(CreateErrorResponse(result_bizloading)); } var mapper = GetMapper(); var result = new BranchPromotionViewModel(); if (result_bizloading.ResultValue != null) { result = mapper.Map <BranchPromotion, BranchPromotionViewModel>(result_bizloading.ResultValue); } else { result.PromotionReviewStatusId = 0; } return(CreateViewModelResponse(result, result_bizloading)); }