private void flist2_PreviewDrop(object sender, DragEventArgs e) { if(selectedItem == null) MessageBox.Show("No selected Tag!"); else{ MessageBox.Show(""+selectedItem.TagCategory.TagId); DBManger dbManager = new DBManger(); string query = "INSERT into * FROM TAGTABLE WHERE TAGID LIKE '%" + selectedItem.TagCategory.TagId + "%'"; dbManager.Query = query; dbManager.execute(ref _TagedItemCollection); } }
private void TagTreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e) { DBManger dbManager = new DBManger(); selectedItem = e.NewValue as TagTreeViewItem; string query = "SELECT * FROM TAGTABLE WHERE TAGID LIKE '%" + selectedItem.TagCategory.TagId +"%'"; dbManager.Query = query; dbManager.execute(ref _TagedItemCollection); }