Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (listBox1.Items.Count > 0 && listBox1.SelectedItem!=null) {
- Pracownik p = (Pracownik)listBox1.SelectedItem;
- string imie = textImie.Text;
- string nazwisko = textNazwisko.Text;
- string pesel = textPesel.Text;
- string wzrost = textWzrost.Text;
- string stanowisko = textStanowisko.Text;
- textImie.Text = p.Imie.ToString();
- textNazwisko.Text = p.Nazwisko.ToString();
- textPesel.Text = p.Pesel.ToString();
- textWzrost.Text = p.Wzrost.ToString();
- textStanowisko.Text = p.Stanowisko.ToString();
- }
- else
- {
- MessageBox.Show("lista jest pusta");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement