public static string ReturnCarCollectionOverview(DataSet dataSet)
        {
            var categoriesTable = dataSet.Tables[0];
            var detailTable = dataSet.Tables[1];

            var collectionContainer = new CarCollectionOverview();

            for (var x = 0; x < categoriesTable.Rows.Count; x++)
            {
                var collection = new CarCollection(categoriesTable.Rows[x][0].ToString());
                collectionContainer.AddCategory(collection);
            }

            for (var i = 0; i < detailTable.Rows.Count; i++)
            {
                var car = new CarDetail(detailTable.Rows[i][0].ToString(), detailTable.Rows[i][1].ToString(),
                                        detailTable.Rows[i][2].ToString(), detailTable.Rows[i][3].ToString(),
                                        detailTable.Rows[i][4].ToString(), detailTable.Rows[i][5].ToString(),
                                        detailTable.Rows[i][6].ToString(), detailTable.Rows[i][7].ToString(),
                                        detailTable.Rows[i][8].ToString(), detailTable.Rows[i][9].ToString(),
                                        detailTable.Rows[i][10].ToString());

                var collection = collectionContainer.FindCollectionByName(detailTable.Rows[i][1].ToString());
                collection.AddCar(car);
            }

            return collectionContainer.ToJson();
        }
        public static string ReturnCarStatus(DataSet dataSet)
        {
            var detailTable = dataSet.Tables[0];

            var car = new CarDetail(detailTable.Rows[0][0].ToString(), detailTable.Rows[0][1].ToString(),
                        detailTable.Rows[0][2].ToString(), detailTable.Rows[0][3].ToString(),
                        detailTable.Rows[0][4].ToString(), detailTable.Rows[0][5].ToString(),
                        detailTable.Rows[0][6].ToString(), detailTable.Rows[0][7].ToString(),
                        detailTable.Rows[0][8].ToString(), detailTable.Rows[0][9].ToString(),
                        detailTable.Rows[0][10].ToString());

            return car.ToJson();
        }
 public void AddCar(CarDetail car)
 {
     categoryCarCollection.Add(car);
 }
        public void AddCar(string id, string car_class, string registration, string mileage, string year, string service_start_date, string service_end_date, string service_status, string rental_status, string make, string model)
        {
            var newCar = new CarDetail(id, car_class, registration, mileage, year, service_start_date, service_end_date, service_status, rental_status, make, model);

            categoryCarCollection.Add(newCar);
        }
 public void AddCar(CarDetail car)
 {
     categoryCarCollection.Add(car);
 }
 public void AddCar(string id, string car_class, string registration, string mileage, string year, string service_start_date, string service_end_date, string service_status, string rental_status, string make, string model)
 {
     var newCar = new CarDetail(id,car_class, registration, mileage, year, service_start_date, service_end_date, service_status, rental_status, make, model);
     categoryCarCollection.Add(newCar);
 }