private void LoadFields() { this.SearchResults = LWSearchResults; this.ViewModel = new EjendomsmæglerViewModel(this); this.Kriterie = CBKriterie; this.Input = TBInput; UpdateListView(ViewModel.DisplaySearchResults()); }
public ValgtEjendomsMæglerDetails(EjendomsmæglerViewModel View, EjendomsmæglereForm ParentForm) { InitializeComponent(); this.ParentForm = ParentForm; this.ViewModel = View; CBPostNr.DataSource = View.PostNummerListe; CBPostNr.DisplayMember = "PostNummer"; var valgt = CBPostNr.SelectedItem as PostNumre; LBLdistrikt.Text = valgt.Distrikt; CBPostNr.SelectedIndexChanged += (o, e) => { valgt = CBPostNr.SelectedItem as PostNumre; LBLdistrikt.Text = valgt.Distrikt; }; }