コード例 #1
0
        public HttpResponseMessage UpdatePriceMargin(UpdateFBOPriceMarginRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            SuccessResponse response = new SuccessResponse();

            FBOPriceMarginsService.UpdateFBOPriceMargin(model);
            return(Request.CreateResponse(response));
        }
コード例 #2
0
        public HttpResponseMessage AddPriceMargin(AddFBOPriceMarginRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            ItemResponse <int> response = new ItemResponse <int>();

            response.Item = FBOPriceMarginsService.UpdateFBOPriceMargin(model);
            //ItemsResponse<int> response = new ItemsResponse<int>();
            //foreach (AddFBOPriceMarginRequest model in models)
            //{
            //    response.Items.Add(FBOPriceMarginsService.UpdateFBOPriceMargin(model));
            //}
            return(Request.CreateResponse(response));
        }