Beispiel #1
0
 private void Resetuj()
 {
     TextBoxId.Clear();
     TextBoxIme.Clear();
     TextBoxPrezime.Clear();
     ListBox1.SelectedIndex = -1;
 }
Beispiel #2
0
        private void ButtonObrisi_Click(object sender, RoutedEventArgs e)
        {
            if (ListBox1.SelectedIndex < 0)
            {
                MessageBox.Show("Odaberi clana");
                return;
            }
            Clan c1 = ListBox1.SelectedItem as Clan;

            MessageBoxResult mbr = MessageBox.Show("Brisanje clana: " + c1.ToString(), "Brisanje", MessageBoxButton.YesNo);

            if (mbr == MessageBoxResult.No)
            {
                return;
            }

            int rezultat = cDal.ObrisiClana(c1);

            if (rezultat == 0)
            {
                PrikaziClanove();
                TextBoxIme.Clear();
                TextBoxPrezime.Clear();
                TextBoxLicnaKarta.Clear();
                TextBoxUlicaBroj.Clear();
                TextBoxMesto.Clear();
                MessageBox.Show("Clan obrisan");
            }
            else
            {
                MessageBox.Show("Greska pri brisanju clana");
            }
        }
        private void Button1_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (!(string.IsNullOrWhiteSpace(TextBoxAdresa.Text) || string.IsNullOrWhiteSpace(TextBoxTelefon.Text) || string.IsNullOrWhiteSpace(TextBoxIme.Text) ||
                      string.IsNullOrWhiteSpace(TextBoxPrezime.Text)))
                {
                    for (int i = 0; i < Korisnici.Length; i++)
                    {
                        Korisnici[i] = new Korisnik {
                            ime = TextBoxIme.Text, prezime = TextBoxPrezime.Text, adresa = TextBoxAdresa.Text, brojTelefona = int.Parse(TextBoxTelefon.Text)
                        };
                    }
                }

                else
                {
                    MessageBox.Show("Sva polja moraju biti popunjena");
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Neispravan unos");
            }

            TextBoxAdresa.Clear();
            TextBoxIme.Clear();
            TextBoxPrezime.Clear();
            TextBoxTelefon.Clear();
        }
 private void Resetuj()
 {
     TextBoxId.Clear();
     TextBoxIme.Clear();
     TextBoxPrezime.Clear();
     TextBoxEmail.Clear();
     ComboBox1.SelectedIndex = -1;
 }
Beispiel #5
0
 private void Resetuj()
 {
     odabranaSlika = "";
     Image1.Source = null;
     TextBoxId.Clear();
     TextBoxIme.Clear();
     TextBoxPrezime.Clear();
     DataGrid1.SelectedIndex = -1;
     RadioMuski.IsChecked    = true;
 }
Beispiel #6
0
 private void resetuj()//metoda za resetovanje korisnickog interface-a
 {
     TextBoxId.Clear();
     TextBoxIme.Clear();
     TextBoxPrezime.Clear();
     RadioMale.IsChecked     = true;
     image1.Source           = null;
     dataGrid1.SelectedIndex = -1;
     slikaIzvor = "";//ponistava se izvor slike sa kojom smoranije radili
 }
 private void Resetuj()
 {
     TextBoxId.Clear();
     TextBoxIme.Clear();
     TextBoxPrezime.Clear();
     ComboBox1.SelectedIndex     = -1;
     RadioButtonMuski.IsChecked  = false;
     RadioButtonZenski.IsChecked = false;
     ListBox1.SelectedIndex      = -1;
 }