private void btnAddRoot_Click(object sender, RoutedEventArgs e) { var win = new Department(0); win.ShowDialog(); this.RefreshTree(); }
private void btnEditNode_Click(object sender, RoutedEventArgs e) { if (this.RadViewSource.SelectedItem != null) { var item = this.RadViewSource.SelectedItem as RadTreeViewItem; var tag = item.Tag as StructureTreeViewModel; var win = new Department(tag.id_department, tag.id_departmentParent); win.ShowDialog(); this.RefreshTree(); } }
private void btnAddChild_Click(object sender, RoutedEventArgs e) { if (this.RadViewSource.SelectedItem != null) { var item = this.RadViewSource.SelectedItem as RadTreeViewItem; var tag = item.Tag as StructureTreeViewModel; var win = new Department(0, tag.id_department); win.ShowDialog(); this.RefreshTree(); } else { MessageBox.Show("Трябва да изберете звено, за да добавите подзвено."); } }