Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. private void listBoxKundList_SelectedIndexChanged(object sender, EventArgs e)
  2. {
  3. if (listBoxKundList.SelectedIndex!= -1)
  4. {
  5. Kund aktuellKund = (Kund)listBoxKundList.SelectedItem;
  6.  
  7. textBoxEfternamn.Text = aktuellKund.Efternamn;
  8. textBoxNamn.Text = aktuellKund.Förnamn;
  9. textBoxPersonnummer.Text = aktuellKund.Personnummer;
  10. textBoxGatuadress.Text = aktuellKund.Gatuadress;
  11. textBoxPostadress.Text = aktuellKund.Postadress;
  12. textBoxHemtelefon.Text = aktuellKund.Hemtelefon;
  13. textBoxMobiltelefon.Text = aktuellKund.Mobiltelefon;
  14. ListaKontona(aktuellKund);
  15.  
  16. }
  17. }
  18.  
  19.  
  20. private void ListaKontona(Kund aktuellKund)
  21. {
  22.  
  23. if (aktuellKund != null)
  24. {
  25. listBoxKontoList.Items.Clear();
  26.  
  27. foreach (Konto konto in aktuellKund.Kontoinnehav)
  28. {
  29. listBoxKontoList.Items.Add(konto);
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement