예제 #1
0
 private void btnSelectUser_Click(object sender, EventArgs e)
 {
     dlgCardUserSelection dcusForm = new dlgCardUserSelection();
     dcusForm.ShowDialog();
     if (dcusForm.SelectedUser != null)
     {
         _CurrentUserInfo = dcusForm.SelectedUser;
         gpbReplace.Enabled = true;
         initValue();
     }
     else
     {
         gpbReplace.Enabled = false;
     }
 }
예제 #2
0
        private void btnSelectUser_Click(object sender, EventArgs e)
        {
            dlgCardUserSelection dlg = new dlgCardUserSelection();
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                if (dlg.SelectedUser != null)
                {
                    this._CurrentUser = dlg.SelectedUser;
                    this._CurrentPair = dlg.SelectedUser.PairInfo;
                    labUserName.Text = this._CurrentUser.cus_cChaName;
                    labClassName.Text = dlg.SelectedUser.ClassInfo != null ? dlg.SelectedUser.ClassInfo.csm_cClassName : dlg.SelectedUser.DeptInfo.dpm_cName;
                    labStuNum.Text = this._CurrentUser.cus_cStudentID;

                    this.Cursor = Cursors.WaitCursor;

                    //获取当前余额
                    CardUserAccount_cua_Info accountInfo = this._ICardUserAccountBL.SearchRecords(new CardUserAccount_cua_Info()
                    {
                        cua_cCUSID = this._CurrentUser.cus_cRecordID
                    }).FirstOrDefault() as CardUserAccount_cua_Info;

                    if (accountInfo != null)
                    {
                        labAccountBalance.Text = accountInfo.cua_fCurrentBalance.ToString();
                        labAccountSyncTime.Text = accountInfo.cua_dLastSyncTime.ToString("yyyy/MM/dd HH:mm:ss");
                    }

                    tbxRefundMoney.Enabled = true;
                    tbxRefundMoney.Focus();
                    btnConfirmRefund.Enabled = false;
                    this.Cursor = Cursors.Default;
                }
            }
        }