Beispiel #1
0
        public HttpResponseMessage GetQuote(int custId, int adminId, string icao)
        {
            ItemResponse <CustomerPriceMarginsCollection> response = new ItemResponse <CustomerPriceMarginsCollection>();

            response.Item = CustomerPriceMarginsService.GetCustomerPriceMarginByClientIDsAndICAO(custId, adminId, icao);
            return(Request.CreateResponse(response));
        }
Beispiel #2
0
        public HttpResponseMessage GetQuoteFromAllVendors(int custId, int adminId, string icao)
        {
            ItemResponse <CustomerPriceMarginsCollection> response = new ItemResponse <CustomerPriceMarginsCollection>();

            response.Item = CustomerPriceMarginsService.GetCustomerPriceMarginForAllVendors(custId, adminId, icao);
            return(Request.CreateResponse(response));
        }
Beispiel #3
0
        public HttpResponseMessage GetCustomerPriceMargin(int id)
        {
            ItemResponse <CustomerPriceMargins> response = new ItemResponse <CustomerPriceMargins>();

            response.Item = CustomerPriceMarginsService.GetCustomerPriceMarginByCustClientID(id);
            return(Request.CreateResponse(response));
        }
Beispiel #4
0
        public HttpResponseMessage DeleteCustomerPriceMargin(int id)
        {
            SuccessResponse response = new SuccessResponse();

            CustomerPriceMarginsService.DeleteCustomerPriceMargin(id);
            return(Request.CreateResponse(response));
        }
Beispiel #5
0
        public HttpResponseMessage GetHighestMargin(int id, int custClientId, int priceMarginId)
        {
            ItemResponse <CustomerPriceMargins> response = new ItemResponse <CustomerPriceMargins>();

            response.Item = CustomerPriceMarginsService.UpdatePriceMarginGetHighestMargin(id, custClientId, priceMarginId);
            return(Request.CreateResponse(response));
        }
Beispiel #6
0
        public HttpResponseMessage GetListOfCustomerPriceMargins()
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            ItemsResponse <CustomerPriceMargins> response = new ItemsResponse <CustomerPriceMargins>();

            response.Items = CustomerPriceMarginsService.GetListOfCustomerPriceMargins();
            return(Request.CreateResponse(response));
        }
Beispiel #7
0
        public HttpResponseMessage UpdateCustomerPriceMargin(UpdateCustomerPriceMarginRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            SuccessResponse response = new SuccessResponse();

            CustomerPriceMarginsService.UpdateCustomerPriceMargin(model);
            return(Request.CreateResponse(response));
        }
Beispiel #8
0
        public HttpResponseMessage AddCustomerPriceMargin(AddCustomerPriceMarginRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

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

            response.Item = CustomerPriceMarginsService.UpdateCustomerPriceMargin(model);
            return(Request.CreateResponse(response));
        }