private void buttonLI_Click(object sender, EventArgs e) { Clan clan = new Clan(); string username = textBoxUsernameLI.Text; string password = textBoxPasswordLI.Text; if (username == "" || password == "") { MessageBox.Show("Polja ne mogu biti prazna"); return; } else { int logRes = clan.LogIn(username, password); if (logRes == -1) { this.Close(); RegistracijaForm form = new RegistracijaForm(); form.Show(); } else if (logRes == 0) { //korisnik p1.Visible = false; //autor p2.Visible = false; //knjige p3.Visible = true; //1 p4.Visible = false; //2 p5.Visible = false; //admin this.Close(); } else if (logRes == 1) { //admin p1.Visible = false; //autor p2.Visible = false; //knjige p3.Visible = false; //1 p4.Visible = false; //2 p5.Visible = true; //admin this.Close(); } else if (logRes == -2) { } else { this.Close(); } } }
private void btnRegister_Click(object sender, EventArgs e) { RegistracijaForm form = new RegistracijaForm(); form.Show(); }