Пример #1
0
 private void btnSnimi_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.ValidateChildren())
         {
             Korisnik korisnik = new Korisnik();
             korisnik.Ime      = txtIme.Text;
             korisnik.Prezime  = txtPrezime.Text;
             korisnik.Username = txtUsername.Text;
             korisnik.Password = txtPassword.Text;
             korisnik.Validate();
             Baza.SnimiKorisnika(korisnik, (x) => { MessageBox.Show(x.Ime); });
             this.Close();
         }
     }
     //catch(Exception ex)
     finally
     {
         MessageBox.Show("", "Greška", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }