Exemplo n.º 1
0
        private void EditMembershipGroupCommandExecuted(MembershipGroupModel membershipGroup)
        {
            RaisePropertyChanged("DisableParentWindow");

            var view = new AddMembershipGroupView(membershipGroup);
            view.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");

            if (view.DialogResult != null && view.DialogResult == true)
            {
                _adminDataUnit.MembershipGroupsRepository.Refresh();
                RefreshMembershipGroups();
            }
        }
Exemplo n.º 2
0
        private void AddMembershipGroupCommandExecuted()
        {
            RaisePropertyChanged("DisableParentWindow");

            var addMembershipGroupView = new AddMembershipGroupView(MembershipGroup);
            addMembershipGroupView.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");
            if (addMembershipGroupView.DialogResult != null && addMembershipGroupView.DialogResult == true)
            {
                if (Content != null)
                {
                    var viewModel = Content.DataContext as MembershipGroupsViewModel;
                    if (viewModel != null)
                    {
                        viewModel.AllMembershipGroups.Add(addMembershipGroupView.ViewModel.MembershipGroup);
                        viewModel.RefreshMembershipGroups();
                    }
                }
                TreeViewItemPath = "Members|Category Groups|Groups";

                RaisePropertyChanged("SelectTreeViewItem");
            }
        }