private void odjavaBtn_Click(object sender, EventArgs e)
        {
            Prijava prijava = new Prijava();

            prijava.Show();
            this.Hide();
        }
        private void regRegistracijaBtn_Click(object sender, EventArgs e)
        {
            int idKraja = kraji[regKrajiCombobox.SelectedIndex].ID;

            using (NpgsqlConnection con = new NpgsqlConnection(connect)) {
                con.Open();

                NpgsqlCommand    com    = new NpgsqlCommand("SELECT registracijaavtosole('" + regImeTextbox.Text + "','" + regEmailTextbox.Text + "','" + regTelTextbox.Text + "', '" + idKraja + "')", con);
                NpgsqlDataReader reader = com.ExecuteReader();
                while (reader.Read())
                {
                    if (reader.GetString(0) == "USPESNO")
                    {
                        MessageBox.Show("Registracija uspela!");
                        Prijava prijava = new Prijava();
                        prijava.Show();
                        this.Hide();
                    }
                    else
                    {
                        MessageBox.Show("Avtosola s tem emailom že obstaja!");
                    }
                }
                con.Close();
            }
        }
        private void dodajIzpitBtn_Click(object sender, EventArgs e)
        {
            int idK = kraji[regKrajiCombobox.SelectedIndex].ID;

            using (NpgsqlConnection con = new NpgsqlConnection(connect)) {
                con.Open();

                NpgsqlCommand    com    = new NpgsqlCommand("SELECT dodajDveTabeli ('" + regEmailTextbox.Text + "', '" + regImeTextbox.Text + "', '" + idK + "', '" + regTelTextbox.Text + "', '" + tipIzpitaTxt.Text + "', '" + Convert.ToInt32(minStarostIzpitTxt.Text) + "' )", con);
                NpgsqlDataReader reader = com.ExecuteReader();
                while (reader.Read())
                {
                    if (reader.GetString(0) == "USPESNO")
                    {
                        MessageBox.Show("Registracija avtosole + dodan izpit Uspelo!");
                        Prijava prijava = new Prijava();
                        prijava.Show();
                        this.Hide();
                    }
                    else if (reader.GetString(0) == "NEUSPESNO")
                    {
                        MessageBox.Show("Registracija avtosole + dodajanje izpita Neuspelo!");
                        tipIzpitaTxt.Clear();
                        minStarostIzpitTxt.Clear();
                    }
                }
                con.Close();
            }
        }
        private void deleteUserBtn_Click(object sender, EventArgs e)
        {
            int idU = neki.ID;

            using (NpgsqlConnection conS = new NpgsqlConnection(connect)) {
                conS.Open();

                NpgsqlCommand    comS    = new NpgsqlCommand("SELECT izbrisiUporabnika('" + idU + "')", conS);
                NpgsqlDataReader readerS = comS.ExecuteReader();
                while (readerS.Read())
                {
                    if (readerS.GetString(0) == "USPESNO")
                    {
                        MessageBox.Show("Uporabnik je bil izbrisan");
                        Prijava prijava = new Prijava();
                        prijava.Show();
                        this.Hide();
                    }
                }
                conS.Close();
            }
        }