Exemple #1
0
        public HttpResponseMessage UpdateSupplierFuelsPrice(UpdateSupplierFuelsPriceRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            SuccessResponse response = new SuccessResponse();

            SupplierFuelsPricesService.UpdateSupplierFuelsPrice(model);
            return(Request.CreateResponse(response));
        }
Exemple #2
0
        public HttpResponseMessage AddSupplierFuelsPrice(AddSupplierFuelsPriceRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

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

            response.Item = SupplierFuelsPricesService.UpdateSupplierFuelsPrice(model);
            return(Request.CreateResponse(response));
        }