private void btnAddCar_Click(object sender, EventArgs e)
 {
     //Create instance
     dbManager = new MySQLManager();
     dbManager.OpenDBConnection();
     if (dbManager.Insert(tbCarManufacture.Text, tbCarModel.Text, tbCarYear.Text))
     {
         MessageBox.Show("Jauna automašīna veiksmīgi pievienota!");
     }
     else
     {
         MessageBox.Show("Problēma pievienot jauno automašīnu");
     }
     //clear input fields
     tbCarManufacture.Clear();
     tbCarModel.Clear();
     tbCarYear.Clear();
     //Maybe at end - destroy instance?
     dbManager = null;
 }
 private void AddUserCars()
 {
     dbManager            = new MySQLManager();
     cbUserCar.DataSource = dbManager.SelectUserCars();
 }
 private void btnCheckServicesBack_Click(object sender, EventArgs e)
 {
     dbManager = null;
     this.Close();//Close this form.
 }
 public frmCheckServices()
 {
     InitializeComponent();
     dbManager = new MySQLManager();
     SetUserAvaibleCars();
 }