private async void btnShowFathers_Click(object sender, EventArgs e) { var selectedIds = orphanageGridView1.SelectedIds; if (selectedIds == null || selectedIds.Count == 0) { return; } var fathersIds = await _caregiversViewModel.FathersIds(selectedIds); Father.FathersView fathersView = new Father.FathersView(fathersIds); fathersView.MdiParent = this.MdiParent; fathersView.Show(); }
private void btnShowFathers_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 = _mothersViewModel.FathersIds(id); if (retOIds != null && retOIds.Count > 0) { foreach (var retId in retOIds) { ret.Add(retId); } } } Father.FathersView or = new Father.FathersView(ret); or.MdiParent = this.MdiParent; or.Show(); }