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;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the MembershipOptionBoxReasons EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMembershipOptionBoxReasons(MembershipOptionBoxReason membershipOptionBoxReason)
 {
     base.AddObject("MembershipOptionBoxReasons", membershipOptionBoxReason);
 }
 private void EditMembershipOptionBoxReasonCommandExecuted(MembershipOptionBoxReason membershipOptionBoxReason)
 {
     if (membershipOptionBoxReason == null) return;
     SelectedOptionBoxReason = membershipOptionBoxReason;
     IsEditMode = true;
     NewMembershipOptionBoxReason = membershipOptionBoxReason.Reason;
     RaisePropertyChanged("SetFocusOnOptionBoxReasonText");
 }
Exemplo n.º 4
0
 /// <summary>
 /// Create a new MembershipOptionBoxReason object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="reason">Initial value of the Reason property.</param>
 /// <param name="optionBoxID">Initial value of the OptionBoxID property.</param>
 public static MembershipOptionBoxReason CreateMembershipOptionBoxReason(global::System.Guid id, global::System.String reason, global::System.Guid optionBoxID)
 {
     MembershipOptionBoxReason membershipOptionBoxReason = new MembershipOptionBoxReason();
     membershipOptionBoxReason.ID = id;
     membershipOptionBoxReason.Reason = reason;
     membershipOptionBoxReason.OptionBoxID = optionBoxID;
     return membershipOptionBoxReason;
 }