Esempio n. 1
0
        private void EditProductGroupCommandExecuted(ProductGroupModel model)
        {
            RaisePropertyChanged("DisableParentWindow");

            var view = new AddProductGroupView(model);
            view.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");
        }
Esempio n. 2
0
        private void AddProductGroupCommandExecuted()
        {
            RaisePropertyChanged("DisableParentWindow");

            var addProductGroupView = new AddProductGroupView(null);
            addProductGroupView.ShowDialog();
            if (addProductGroupView.DialogResult != null && addProductGroupView.DialogResult == true)
            {
                if (Content != null)
                {
                    var viewModel = Content.DataContext as ProductGroupViewModel;
                    if (viewModel != null)
                    {
                        viewModel.AllProductGroups.Add(addProductGroupView.ViewModel.ProductGroup);
                        viewModel.RefreshProductGroups();
                    }
                }
            }
            RaisePropertyChanged("EnableParentWindow");
        }