⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 creat.cpp

📁 MFC写的银行储蓄系统
💻 CPP
字号:
// CREAT.cpp : implementation file
//

#include "stdafx.h"
#include "银行储蓄系统.h"
#include "CREAT.h"


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCREAT dialog


CCREAT::CCREAT(CWnd* pParent /*=NULL*/)
	: CDialog(CCREAT::IDD, pParent)
{
	//{{AFX_DATA_INIT(CCREAT)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CCREAT::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCREAT)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCREAT, CDialog)
	//{{AFX_MSG_MAP(CCREAT)
	ON_BN_CLICKED(IDC_CREATACCOUNT_BUTTON, OnCreataccountButton)
	ON_BN_CLICKED(IDC_COMPLETE_BUTTON, OnCompleteButton)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCREAT message handlers

BOOL CCREAT::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	CheckRadioButton(IDC_SACCOUNT_RADIO,IDC_CACCOUNT_RADIO,IDC_SACCOUNT_RADIO);
	UpdateData(FALSE);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CCREAT::OnCreataccountButton() 
{
	// TODO: Add your control notification handler code here
	int iAccount;
    int acs=100;
	int acc=200;
	iAccount=GetCheckedRadioButton(IDC_SACCOUNT_RADIO,IDC_CACCOUNT_RADIO);
	if(iAccount==IDC_SACCOUNT_RADIO)
    {
		Savings *pS;
		for(Savings* p=(Savings*)pS->getFirst(); p ;p=(Savings*)p->getNext())
		{
			if(acs==p->AccountNo()&&acs<199)
				acs++;
		}
		pS=new Savings(acs);
		password.aS=pS;
		password.tag=1;
		password.DoModal();
	}
	else
	{
		Checkings *pC;
		for(Checkings* pp=(Checkings*)pC->getFirst(); pp ;pp=(Checkings*)pp->getNext())
		{
			if(acc==pp->AccountNo()&&acc<299)
				acc++;
		}
		pC=new Checkings(acc);
		password.aC=pC;
		password.tag=2;
		password.DoModal();
	}
	MessageBox("开户成功");
}

void CCREAT::OnCompleteButton() 
{
	// TODO: Add your control notification handler code here
	OnOK();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -