private void button3_Click(object sender, EventArgs e) { string nacin = "prijava"; Baza bazaa = new Baza(); string email = textBox1.Text; string password = textBox2.Text; bool dela = bazaa.Prijava(email, password); if (dela == true) { Main lol1 = new Main(email, nacin); lol1.Show(); this.Hide(); } else { MessageBox.Show("Prijava neuspešna"); } }
private void button4_Click(object sender, EventArgs e) { Baza bazaa = new Baza(); string email = textBox3.Text; string password = textBox4.Text; bazaa.Registracija(email, password); string nacin = "registracija"; string emaill = textBox3.Text; string passwordd = textBox4.Text; bool dela = bazaa.Prijava(email, password); if (dela == true) { Main lol1 = new Main(email, nacin); lol1.Show(); this.Hide(); } else { MessageBox.Show("Nekaj je šlo narobe :("); } }