public ContactWindow(int userId) { InitializeComponent(); _service = new ApplicationService(); this.userId = userId; List <Contact> contacts = _service.GetContactsByUserId(userId); contactView.ItemsSource = contacts; }
public ContactSelect(TaskWindow taskWindow, int userId) { InitializeComponent(); _service = new ApplicationService(); _userId = userId; _taskWindow = taskWindow; List <Contact> Contact = _service.GetContactsByUserId(userId); foreach (Contact contact in Contact) { this.contactSelectView.Items.Add(contact); } }