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)); }
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)); }
public HttpResponseMessage GetCustomerPriceMargin(int id) { ItemResponse <CustomerPriceMargins> response = new ItemResponse <CustomerPriceMargins>(); response.Item = CustomerPriceMarginsService.GetCustomerPriceMarginByCustClientID(id); return(Request.CreateResponse(response)); }
public HttpResponseMessage DeleteCustomerPriceMargin(int id) { SuccessResponse response = new SuccessResponse(); CustomerPriceMarginsService.DeleteCustomerPriceMargin(id); return(Request.CreateResponse(response)); }
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)); }
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)); }
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)); }
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)); }