Example #1
0
        public JsonPatchDocument <ApiWorkOrderRequestModel> CreatePatch(ApiWorkOrderRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiWorkOrderRequestModel>();

            patch.Replace(x => x.DueDate, model.DueDate);
            patch.Replace(x => x.EndDate, model.EndDate);
            patch.Replace(x => x.ModifiedDate, model.ModifiedDate);
            patch.Replace(x => x.OrderQty, model.OrderQty);
            patch.Replace(x => x.ProductID, model.ProductID);
            patch.Replace(x => x.ScrappedQty, model.ScrappedQty);
            patch.Replace(x => x.ScrapReasonID, model.ScrapReasonID);
            patch.Replace(x => x.StartDate, model.StartDate);
            patch.Replace(x => x.StockedQty, model.StockedQty);
            return(patch);
        }
Example #2
0
        public virtual ApiWorkOrderRequestModel MapResponseToRequest(
            ApiWorkOrderResponseModel response)
        {
            var request = new ApiWorkOrderRequestModel();

            request.SetProperties(
                response.DueDate,
                response.EndDate,
                response.ModifiedDate,
                response.OrderQty,
                response.ProductID,
                response.ScrappedQty,
                response.ScrapReasonID,
                response.StartDate,
                response.StockedQty);
            return(request);
        }