//Добавить катеогрию private void addCategory_Click(object sender, RoutedEventArgs e) { CategoryModel m = new CategoryModel(); m.ParentName = (tree.SelectedItem as CategoryModel).Name; CategoryEdit edt = new CategoryEdit(m); // string sql="select " edt.ShowDialog(); // ProductEdit edtp = new ProductEdit(); // edtp.ShowDialog(); }
//редактировать категорию private void edtCategory_Click(object sender, RoutedEventArgs e) { CategoryEdit edt = new CategoryEdit((tree.SelectedItem as CategoryModel)); edt.ShowDialog(); }