private async void btnShowMothers_Click(object sender, EventArgs e) { var selectedIds = orphanageGridView1.SelectedIds; if (selectedIds == null || selectedIds.Count == 0) { return; } var mothersIds = await _caregiversViewModel.MothersIds(selectedIds); Mother.MothersView mothersView = new Mother.MothersView(mothersIds); mothersView.MdiParent = this.MdiParent; mothersView.Show(); }
private void btnShowMothers_Click(object sender, EventArgs e) { IList <int> ret = new List <int>(); var selectedIds = orphanageGridView1.SelectedIds; if (selectedIds == null || selectedIds.Count == 0) { return; } var retOIds = _familiesViewModel.MothersIds(selectedIds); Mother.MothersView or = new Mother.MothersView(retOIds); or.MdiParent = this.MdiParent; or.Show(); }
private void btnShowMothers_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.MothersIds(id); if (retOIds != null && retOIds.Count > 0) { foreach (var retId in retOIds) { ret.Add(retId); } } } Mother.MothersView or = new Mother.MothersView(ret); or.MdiParent = this.MdiParent; or.Show(); }