Example #1
0
        public HttpResponseMessage UpdatePriceMargin(AddAirportPriceMarginRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            SuccessResponse response = new SuccessResponse();

            AirportPriceMarginsService.UpdateAirportPriceMargin(model);
            return(Request.CreateResponse(response));
        }
Example #2
0
        public HttpResponseMessage AddPriceMargin(AddAirportPriceMarginRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

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

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