예제 #1
0
        private void EditMembershipGroupAgeCommandExecuted(MembershipGroupAgeModel membershipGroupAge)
        {
            RaisePropertyChanged("DisableParentWindow");

            var view = new AddMembershipGroupAgeView(membershipGroupAge);
            view.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");

            if (view.DialogResult != null && view.DialogResult == true)
            {
                _adminDataUnit.MembershipGroupAgesRepository.Refresh();
            }
        }
예제 #2
0
        private void AddMembershipGroupAgeCommandExecuted()
        {
            RaisePropertyChanged("DisableParentWindow");

            var addMembershipGroupAgeView = new AddMembershipGroupAgeView(MembershipGroupAge);
            addMembershipGroupAgeView.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");
            if (addMembershipGroupAgeView.DialogResult != null && addMembershipGroupAgeView.DialogResult == true)
            {
                if (Content != null)
                {
                    var viewModel = Content.DataContext as MembershipGroupAgesViewModel;
                    if (viewModel != null)
                    {
                        viewModel.AllMembershipGroupAges.Add(addMembershipGroupAgeView.ViewModel.MembershipGroupAge);
                        viewModel.RefreshMembershipGroupAges();
                    }
                }
                TreeViewItemPath = "Members|Category Groups|Age";

                RaisePropertyChanged("SelectTreeViewItem");
            }
        }