Exemplo n.º 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();
            }
        }
Exemplo n.º 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");
            }
        }