public RejectPlayerWithdrawRMBWindow(WithdrawRMBRecordUIModel record)
        {
            InitializeComponent();
            _syn = SynchronizationContext.Current;

            this.DataContext           = record;
            this.Record                = record;
            this.txtAdminUserName.Text = GlobalData.CurrentAdmin.UserName;

            GlobalData.Client.PayWithdrawRMBRecordCompleted += Client_PayWithdrawRMBRecordCompleted;
        }
 public void RemoveRecordFromActiveRecords(WithdrawRMBRecordUIModel record)
 {
     lock (LockActiveRecords)
     {
         for (int i = 0; i < this.ListActiveWithdrawRecords.Count; i++)
         {
             if (record.ID == this.ListActiveWithdrawRecords[i].ID)
             {
                 this.ListActiveWithdrawRecords.RemoveAt(i);
                 break;
             }
         }
     }
 }
        private void btnReject_Click(object sender, RoutedEventArgs e)
        {
            Button btn = sender as Button;
            WithdrawRMBRecordUIModel record = btn.DataContext as WithdrawRMBRecordUIModel;

            if (record == null)
            {
                return;
            }

            RejectPlayerWithdrawRMBWindow win = new RejectPlayerWithdrawRMBWindow(record);

            win.ShowDialog();
            if (win.IsOK)
            {
                App.WithdrawRMBVMObject.RemoveRecordFromActiveRecords(record);
            }
        }