private async void btnShowFamilies_Click(object sender, EventArgs e) { var selectedIds = orphanageGridView1.SelectedIds; if (selectedIds == null || selectedIds.Count == 0) { return; } var familiesIds = await _bailsViewModel.FamiliesIds(selectedIds); Family.FimiliesView familiesView = new Family.FimiliesView(familiesIds); familiesView.MdiParent = this.MdiParent; familiesView.Show(); }
private void btnShowFamilies_Click(object sender, EventArgs e) { IList <int> ret = new List <int>(); var selectedIds = orphanageGridView1.SelectedIds; if (selectedIds == null || selectedIds.Count == 0) { return; } foreach (var id in selectedIds) { var retOIds = _fathersViewModel.FamiliesIds(id); if (retOIds != null && retOIds.Count > 0) { foreach (var retId in retOIds) { ret.Add(retId); } } } Family.FimiliesView or = new Family.FimiliesView(ret); or.MdiParent = this.MdiParent; or.Show(); }