?? newaccount.cpp
字號(hào):
// NewAccount.cpp : implementation file
//
#include "stdafx.h"
#include "atm.h"
#include "NewAccount.h"
#include "MutiCheck.h"
#include "NewExchange.h"
#include "ForeignAccount.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//CEnterPaswd enterpaswdlg;
/////////////////////國(guó)際卡用戶////////////////////////////////////////////////////////
// NewAccount dialog
//CEnterPaswd enterpaswdlg;
NewAccount::NewAccount(CWnd* pParent /*=NULL*/)
: CDialog(NewAccount::IDD, pParent)
{
//{{AFX_DATA_INIT(NewAccount)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void NewAccount::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(NewAccount)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(NewAccount, CDialog)
//{{AFX_MSG_MAP(NewAccount)
ON_BN_CLICKED(IDCHANGECODE, OnChangecode)
ON_BN_CLICKED(IDCHECK, OnCheck)
ON_BN_CLICKED(IDEXCHANGE, OnExchange)
ON_BN_CLICKED(IDTRANSFER, OnTransfer)
ON_BN_CLICKED(IDWITHDRAW, OnWithdraw)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BOOL NewAccount::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
// SetIcon(m_hIcon, TRUE); // Set big icon
// SetIcon(m_hIcon, FALSE); // Set small icon
ifstream fin("國(guó)際卡帳戶.txt");//,ios::nocreate);
if (fin.is_open())
{
while (!fin.eof())
{
CString acntNum;
char strNo[19],strpwd[7];
fin >> strNo;
acntNum = strNo;
CString paswrd;
fin>>strpwd;
paswrd=strpwd;
double balan;
fin>>balan;
double dollar;
fin>>dollar;
double mark;
fin>>mark;
double yen;
fin>>yen;
if(fin.eof())
break;
ForeignAccount *p1=new ForeignAccount(acntNum,paswrd,dollar,mark,yen);
p1->reloadbalance(balan);
}
fin.close();
}
ifstream finE("國(guó)際卡外行帳戶.txt");//,ios::nocreate);
if (finE.is_open())
{
while (!finE.eof())
{
CString acntNum;
char strNo[19],strpwd[7];
finE >> strNo;
acntNum = strNo;
CString paswrd;
finE>>strpwd;
paswrd=strpwd;
double balan;
finE>>balan;
if(finE.eof())
break;
Exaccount *p2=new Exaccount(acntNum,paswrd);
p2->reloadbalance(balan);
}
finE.close();
}
// remove("外行帳戶.txt");
CEnterPaswd enterpaswdlg;
enterpaswdlg.DoModal();
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// NewAccount message handlers
void NewAccount::OnChangecode()
{
// TODO: Add your control notification handler code here
}
void NewAccount::OnCheck()
{
// TODO: Add your control notification handler code here
MutiCheck dlg;
dlg.DoModal();
}
void NewAccount::OnExchange()
{
// TODO: Add your control notification handler code here
NewExchange DLG;
DLG.DoModal();//improper
}
void NewAccount::OnTransfer()
{
// TODO: Add your control notification handler code here
}
void NewAccount::OnWithdraw()
{
// TODO: Add your control notification handler code here
// KillTimer(0);
CWithdraw withdrawdlg;
withdrawdlg.DoModal();
}
void NewAccount::OnCancel()
{
// TODO: Add extra cleanup here
ForeignAccount::storageC();
// CPhoneuser::storageP();
Exaccount::storageE();
CDialog::OnCancel();
CEnd endlg;
endlg.DoModal();
CDialog::OnCancel();
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -