private void btn_selFilterType_Click(object sender, RoutedEventArgs e) { cwnd_treeTypes w = new cwnd_treeTypes(); w.Show(); w.Closed += new EventHandler(w_selFilterTypeClosed); }
void w_selFilterTypeClosed(object sender, EventArgs e) { cwnd_treeTypes w = sender as cwnd_treeTypes; if (w.DialogResult == true) { globalFilterType = w.selectedItem; } else { globalFilterType.ID = null; globalFilterType.Description = "Все"; } btn_selFilterType.Content = "Класс = \"" + globalFilterType.Description + "\""; wc.ws_selectPassportsListAsync(globalFilterType.ID, globalFilterPlace.ID); }
//---- Перемещение элемента в другой раздел private void btn_moveItem_Click(object sender, RoutedEventArgs e) { string xmlString = "<root>"; PagedCollectionView blist = dg_DevList.ItemsSource as PagedCollectionView; ObservableCollection <int> deleteList = new ObservableCollection <int>(); foreach (wsBaseItem item in blist) { if (item.IsChecked) { int i = (int)item.ID; xmlString += "<dev id=\" " + i + "\" />"; } } xmlString += "</root>"; cwnd_treeTypes w = new cwnd_treeTypes(); w.storedString = xmlString; w.Show(); w.Closed += new EventHandler(w_selectTypeClosed); }
//---- Перемещение элемента в другой раздел private void btn_moveItem_Click(object sender, RoutedEventArgs e) { string xmlString = "<root>"; PagedCollectionView blist = dg_DevList.ItemsSource as PagedCollectionView; ObservableCollection<int> deleteList = new ObservableCollection<int>(); foreach (wsBaseItem item in blist) { if (item.IsChecked) { int i = (int)item.ID; xmlString += "<dev id=\" " + i + "\" />"; } } xmlString += "</root>"; cwnd_treeTypes w = new cwnd_treeTypes(); w.storedString = xmlString; w.Show(); w.Closed += new EventHandler(w_selectTypeClosed); }