Example #1
0
        public HttpResponseMessage GetSupplierFuelsPricesByAdmin(int adminId)
        {
            ItemsResponse <SupplierFuelsPrices> response = new ItemsResponse <SupplierFuelsPrices>();

            response.Items = SupplierFuelsPricesService.GetSupplierFuelsPricesByAdminClientID(adminId);
            return(Request.CreateResponse(response));
        }
Example #2
0
        public HttpResponseMessage DeleteSupplierFuelsPrice(int adminId, int supplierId)
        {
            SuccessResponse response = new SuccessResponse();

            SupplierFuelsPricesService.DeleteSupplierFuelsPrice(adminId, supplierId);
            return(Request.CreateResponse(response));
        }
Example #3
0
        public HttpResponseMessage GetListOfSupplierFuelsPrices()
        {
            ItemsResponse <SupplierFuelsPrices> response = new ItemsResponse <SupplierFuelsPrices>();

            response.Items = SupplierFuelsPricesService.GetListOfSupplierFuelsPrices();
            return(Request.CreateResponse(response));
        }
Example #4
0
        public HttpResponseMessage GetSupplierFuelsPrice(int id)
        {
            ItemResponse <SupplierFuelsPrices> response = new ItemResponse <SupplierFuelsPrices>();

            response.Item = SupplierFuelsPricesService.GetSupplierFuelsPrice(id);
            return(Request.CreateResponse(response));
        }
Example #5
0
        public HttpResponseMessage GetSupplierFuelPricesByICAO(int adminId, string icao)
        {
            ItemsResponse <SupplierFuelsPrices> response = new ItemsResponse <SupplierFuelsPrices>();

            response.Items = SupplierFuelsPricesService.GetSupplierFuelsPricesByICAO(adminId, icao);
            return(Request.CreateResponse(response));
        }
Example #6
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));
        }
Example #7
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));
        }