private void refreshDataGrid()
        {
            dataGrid.ItemsSource = null;
            carDatas.Clear();

            DataBaseReader DBreader = new DataBaseReader();

            DBreader.CommandText = "SELECT * FROM StartedCarRepairRecords";
            DBreader.execCommand();

            while (DBreader.SQLiteDataReader.Read())
            {
                CarData carData = new CarData();

                carData.DBId          = DBreader.SQLiteDataReader.GetInt32(0);
                carData.ClientName    = DBreader.SQLiteDataReader.GetString(1);
                carData.ClientSurname = DBreader.SQLiteDataReader.GetString(2);
                carData.ClientPhone   = DBreader.SQLiteDataReader.GetString(3);
                carData.TimeAdded     = DBreader.SQLiteDataReader.GetInt32(4);
                carData.CarMake       = DBreader.SQLiteDataReader.GetInt32(5);
                carData.CarModel      = DBreader.SQLiteDataReader.GetString(6);
                carData.CarNR         = DBreader.SQLiteDataReader.GetString(7);
                carData.CarID         = DBreader.SQLiteDataReader.GetString(8);
                carData.EngineVol     = DBreader.SQLiteDataReader.GetInt32(9);
                carData.EnginePower   = DBreader.SQLiteDataReader.GetInt32(10);
                carData.FuelType      = DBreader.SQLiteDataReader.GetInt32(11);

                carData.formatData();

                carDatas.Add(carData);
            }

            DBreader.closeConnection();
            dataGrid.ItemsSource = carDatas;
        }
        public FinishedCarBrowser()
        {
            InitializeComponent();

            finishedCarDatas.Clear();

            DataBaseReader DBreader = new DataBaseReader();

            DBreader.CommandText = "SELECT * FROM FinishedCarRepairRecords";
            DBreader.execCommand();

            while (DBreader.SQLiteDataReader.Read())
            {
                CarData carData = new CarData();

                carData.DBId            = DBreader.SQLiteDataReader.GetInt32(0);
                carData.ClientName      = DBreader.SQLiteDataReader.GetString(1);
                carData.ClientSurname   = DBreader.SQLiteDataReader.GetString(2);
                carData.ClientPhone     = DBreader.SQLiteDataReader.GetString(3);
                carData.TimeAdded       = DBreader.SQLiteDataReader.GetInt32(4); //change formatting
                carData.CarMake         = DBreader.SQLiteDataReader.GetInt32(5); //change formatting
                carData.CarModel        = DBreader.SQLiteDataReader.GetString(6);
                carData.CarNR           = DBreader.SQLiteDataReader.GetString(7);
                carData.CarID           = DBreader.SQLiteDataReader.GetString(8);
                carData.EngineVol       = DBreader.SQLiteDataReader.GetInt32(9);
                carData.EnginePower     = DBreader.SQLiteDataReader.GetInt32(10);
                carData.FuelType        = DBreader.SQLiteDataReader.GetInt32(11); //chage formatting
                carData.WorkDescription = DBreader.SQLiteDataReader.GetString(12);
                carData.WorkPrice       = DBreader.SQLiteDataReader.GetFloat(13);

                carData.formatData();

                finishedCarDatas.Add(carData);
            }

            DBreader.closeConnection();
            dataGrid.ItemsSource = finishedCarDatas;
        }