Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void listBoxKundList_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (listBoxKundList.SelectedIndex!= -1)
- {
- Kund aktuellKund = (Kund)listBoxKundList.SelectedItem;
- textBoxEfternamn.Text = aktuellKund.Efternamn;
- textBoxNamn.Text = aktuellKund.Förnamn;
- textBoxPersonnummer.Text = aktuellKund.Personnummer;
- textBoxGatuadress.Text = aktuellKund.Gatuadress;
- textBoxPostadress.Text = aktuellKund.Postadress;
- textBoxHemtelefon.Text = aktuellKund.Hemtelefon;
- textBoxMobiltelefon.Text = aktuellKund.Mobiltelefon;
- ListaKontona(aktuellKund);
- }
- }
- private void ListaKontona(Kund aktuellKund)
- {
- if (aktuellKund != null)
- {
- listBoxKontoList.Items.Clear();
- foreach (Konto konto in aktuellKund.Kontoinnehav)
- {
- listBoxKontoList.Items.Add(konto);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement