public void prijaviSe(object sender, EventArgs e) { List <Korisnik> ListaKorisnika = new List <Korisnik>(); RadSaDatotekama.citanjeKorisnikDatoteke(ref ListaKorisnika); Boolean flag = false; foreach (Korisnik k in ListaKorisnika) { if ((txtKorisnickoIme.Text == k.KorisnickoIme) && (txtLozinka.Text == k.Lozinka)) { flag = true; if (k is Administrator) { Administrator a = k as Administrator; FormAdmin admin = new FormAdmin(ref a, this); this.Visible = false; admin.Show(); } else if (k is Kupac) { Kupac ku = k as Kupac; FormKupac kupac = new FormKupac(ref ku, this); this.Visible = false; kupac.Show(); } } } if (flag == false) { MessageBox.Show("Podatke koje ste uneli ne postoje u sistemu!", "", MessageBoxButtons.OK, MessageBoxIcon.Warning); } txtKorisnickoIme.Text = ""; txtLozinka.Text = ""; }
public void izlazakIzRezervacije(object sender, EventArgs e) { this.Hide(); kupac.Show(); }
public void povratakNaPočetnuStranu(object sender, EventArgs e) { this.Hide(); forma.Show(); }