Ejemplo n.º 1
0
        private void DeleteMembershipOptionBoxReasonCommandExecuted(MembershipOptionBoxReason membershipOptionBoxReason)
        {
            if (membershipOptionBoxReason == null)
            {
                return;
            }

            bool?dialogResult = null;

            RaisePropertyChanged("DisableParentWindow");

            RadWindow.Confirm(new DialogParameters
            {
                Content             = Properties.Resources.MESSAGE_ASK_BEFORE_DELETING_ITEM,
                Header              = "Warning!",
                OkButtonContent     = "Yes",
                CancelButtonContent = "No",
                Owner  = Application.Current.MainWindow,
                Closed = (sender, args) => { dialogResult = args.DialogResult; }
            });

            RaisePropertyChanged("EnableParentWindow");

            if (dialogResult != true)
            {
                return;
            }

            _adminDataUnit.MembershipOptionBoxReasonsRepository.Delete(membershipOptionBoxReason);
            _adminDataUnit.SaveChanges();
            MembershipOptionBoxReasons.Remove(membershipOptionBoxReason);
            NewMembershipOptionBoxReason = String.Empty;
        }
Ejemplo n.º 2
0
 private void EditMembershipOptionBoxReasonCommandExecuted(MembershipOptionBoxReason membershipOptionBoxReason)
 {
     if (membershipOptionBoxReason == null)
     {
         return;
     }
     SelectedOptionBoxReason = membershipOptionBoxReason;
     IsEditMode = true;
     NewMembershipOptionBoxReason = membershipOptionBoxReason.Reason;
     RaisePropertyChanged("SetFocusOnOptionBoxReasonText");
 }