public static TransferPrice CreateTransferPrice(string dataAreaId, string resourceId, string borrowingLegalEntity, string projectId, string categoryId, global::System.DateTimeOffset effectiveDate, string salesCurrency, string projectContractId, string roleId, decimal pricing) { TransferPrice transferPrice = new TransferPrice(); transferPrice.dataAreaId = dataAreaId; transferPrice.ResourceId = resourceId; transferPrice.BorrowingLegalEntity = borrowingLegalEntity; transferPrice.ProjectId = projectId; transferPrice.CategoryId = categoryId; transferPrice.EffectiveDate = effectiveDate; transferPrice.SalesCurrency = salesCurrency; transferPrice.ProjectContractId = projectContractId; transferPrice.RoleId = roleId; transferPrice.Pricing = pricing; return(transferPrice); }
public HttpResponseMessage UpdateTransferPrice(HttpRequestMessage request, [FromBody] TransferPrice transferpriceModel) { return(GetHttpResponse(request, () => { var transferprice = _MPRCoreService.UpdateTransferPrice(transferpriceModel); return request.CreateResponse <TransferPrice>(HttpStatusCode.OK, transferprice); })); }
public HttpResponseMessage GetTransferPrice(HttpRequestMessage request, int transferPriceId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; TransferPrice transferPrice = _MPRCoreService.GetTransferPrice(transferPriceId); // notice no need to create a seperate model object since TransferPrice entity will do just fine response = request.CreateResponse <TransferPrice>(HttpStatusCode.OK, transferPrice); return response; })); }
public HttpResponseMessage DeleteTransferPrice(HttpRequestMessage request, [FromBody] int transferPriceId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data TransferPrice transferPrice = _MPRCoreService.GetTransferPrice(transferPriceId); if (transferPrice != null) { _MPRCoreService.DeleteTransferPrice(transferPriceId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No transferPrice found under that ID."); } return response; })); }
public TransferPrice UpdateTransferPrice(TransferPrice transferPrice) { return(Channel.UpdateTransferPrice(transferPrice)); }