📄 xjcudlg.cpp
字号:
// xjcudlg.cpp : implementation file
//
#include "stdafx.h"
#include "bank.h"
#include "xjcudlg.h"
#include "qddlg.h"
#include "R2set.h"
#include "R3set.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Cxjcudlg dialog
Cxjcudlg::Cxjcudlg(CWnd* pParent /*=NULL*/)
: CDialog(Cxjcudlg::IDD, pParent)
{
//{{AFX_DATA_INIT(Cxjcudlg)
m_amount1 = 0.0;
//}}AFX_DATA_INIT
}
void Cxjcudlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Cxjcudlg)
DDX_Text(pDX, IDC_EDIT1, m_amount1);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Cxjcudlg, CDialog)
//{{AFX_MSG_MAP(Cxjcudlg)
ON_BN_CLICKED(ID_xj, Onxj)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Cxjcudlg message handlers
void Cxjcudlg::Onxj()
{this->UpdateData(true);
CR3set set3;
CR2set set2;
Cqddlg dlg;
if(m_amount1<0)
{::MessageBox(NULL,"输入金额不能小于零!","错误",MB_ICONINFORMATION);}
else{
if(!set2.IsOpen())
set2.Open(CRecordset::dynaset,_T("select * from users where cardno='"+dlg.m_card+"'"));
this->UpdateData(true);
set3.Open();
set3.MoveLast();
set3.AddNew();
set3.m_cardno=dlg.m_card;
set3.m_operation= "取款";
set3.m_trcardno ="无";
set3.m_operamount=m_amount1;
set3.Update();
set3.Close();
double t;double s;
t=-m_amount1;
s=set2.m_amount;
CString c=set2.m_cardno;
CString p=set2.m_password;
CString z=set2.m_zipiaono;
CString u=set2.m_userName;
CString i=set2.m_identify;
CString io=set2.m_idenno;
CString a=set2.m_address;
CString te=set2.m_telephone;
int ac=set2.m_accountType;
BOOL h=set2.AddConfigToTable(dlg.m_card,c,p,z,u,i,io,a,te,ac,t,s) ;
if (h=true)
::MessageBox(NULL,"操作完成!","恭喜",MB_ICONINFORMATION);
}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -