public IHttpActionResult GetFilteredCars(string Company, string Gear, string Model, string openText, DateTime?Year)
        {
            var baseUrl = Request.RequestUri.GetLeftPart(UriPartial.Authority);

            List <BOLCarInventory> value = RentCarsInVehicleInventory.GetCarFrom_db();

            foreach (var item in value)
            {
                item.VehiclePic = baseUrl + @"/image/" + item.VehiclePic;
            }
            List <CarInventoryModel> carList = GetCarInventoryFilter.ListRetrieveFilteredCarInventory(value, Company, Gear, Model, openText, Year);

            return(Ok(carList));
        }
        // GET: api/CarInventory
        public IHttpActionResult Get(int from, int to)
        {
            var baseUrl = Request.RequestUri.GetLeftPart(UriPartial.Authority);

            List <BOLCarInventory> value = RentCarsInVehicleInventory.GetCarFrom_db();

            foreach (var item in value)
            {
                item.VehiclePic = baseUrl + @"/image/" + item.VehiclePic;
            }
            List <CarInventoryModel> carList = GetCarInventoryFilter.ListRetrieveCarInventory(value, from, to);

            return(Ok(carList));
        }
        public IHttpActionResult Get(int carNumber)
        {
            var baseUrl = Request.RequestUri.GetLeftPart(UriPartial.Authority);

            BOLCarInventory value = RentCarsInVehicleInventory.GetCarFrom_db(carNumber);

            if (value != null)
            {
                value.VehiclePic = baseUrl + @"/image/" + value.VehiclePic;

                CarInventoryModel carList = GetCarInventoryFilter.ReturnCarInventory(value);
                return(Ok(carList));
            }
            return(null);
        }
        public IHttpActionResult Get(string orderlist)
        {
            var               baseUrl   = Request.RequestUri.GetLeftPart(UriPartial.Authority);
            JObject           json      = JObject.Parse(orderlist);
            List <OrderModel> orderList = new List <OrderModel>();

            foreach (var item in json)
            {
                orderList = new JavaScriptSerializer().Deserialize <List <OrderModel> >(item.Value.ToString());
            }
            List <BOLOrder> convertedOrderList = GetOrdersFilter.RetrievelistOrder(orderList);

            List <BOLCarInventory> value = RentCarsInVehicleInventory.GetCarFrom_db(convertedOrderList);

            foreach (var item in value)
            {
                item.VehiclePic = baseUrl + @"/image/" + item.VehiclePic;
            }


            List <CarInventoryModel> carList = GetCarInventoryFilter.ListRetrieveCarInventory1(value, convertedOrderList);

            return(Ok(carList));
        }