private void btn_LinkChild_Click(object sender, RoutedEventArgs e) { if (lst_ChildBox.SelectedItem != null) { string cID = ((Child)(lst_ChildBox.SelectedItem)).ID; int link = 0; Link_DeLinkChild linkDelinkChild = new Link_DeLinkChild(link, cID); linkDelinkChild.ShowDialog(); //0 = link } }
private void btn_De_LinkChild_Click(object sender, RoutedEventArgs e) { if (lst_ChildBox.SelectedItem != null) { string cID = ((Child)(lst_ChildBox.SelectedItem)).ID; int delink = 1; Link_DeLinkChild linkDelinkChild = new Link_DeLinkChild(delink, cID); linkDelinkChild.ShowDialog(); //1 = delink lst_ChildBox.Items.Clear(); setChildBox(); } }