?? remaindlg.cpp
字號:
// RemainDlg.cpp : 實現(xiàn)文件
//
#include "stdafx.h"
#include "BankSystem.h"
#include "RemainDlg.h"
#include ".\remaindlg.h"
#include "BankSystemDlg.h"
// RemainDlg 對話框
IMPLEMENT_DYNAMIC(RemainDlg, CDialog)
RemainDlg::RemainDlg(CWnd* pParent /*=NULL*/)
: CDialog(RemainDlg::IDD, pParent)
{
}
RemainDlg::~RemainDlg()
{
}
BOOL RemainDlg::OnInitDialog()
{
CString str="SELECT * FROM bankbook WHERE uname=\'"+UserName+"\'";
try{
pRst=pConn->Execute(_bstr_t(str),NULL,adCmdText);
}
catch(_com_error &e)
{
MessageBox(e.ErrorMessage());
return FALSE;
}
CString Result;
while(!pRst->rsEOF)//將查詢到的數(shù)據(jù)加到列表框咯。
{
CString str2="您的余額為 "+(_bstr_t)pRst->GetCollect("amount")+" 元";
Result=str2;
pRst->MoveNext();
}
SetDlgItemText(IDC_Result,Result);
UpdateData();
return TRUE;
}
void RemainDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(RemainDlg, CDialog)
ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
END_MESSAGE_MAP()
// RemainDlg 消息處理程序
void RemainDlg::OnBnClickedButton1()
{
// TODO: 在此添加控件通知處理程序代碼
OnOK();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -