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

📄 cardlogin.cpp

📁 各个银行
💻 CPP
字号:
// CARDLOGIN.cpp : implementation file
//

#include "stdafx.h"
#include "BankSystem.h"
#include "CARDLOGIN.h"
#include "ADOConn.h"
#include "BankSystemDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CCARDLOGIN dialog


CCARDLOGIN::CCARDLOGIN(CWnd* pParent /*=NULL*/)
	: CDialog(CCARDLOGIN::IDD, pParent)
{
	//{{AFX_DATA_INIT(CCARDLOGIN)
	m_cardid = _T("");
	m_cardpwd = _T("");
	//}}AFX_DATA_INIT
}


void CCARDLOGIN::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCARDLOGIN)
	DDX_Text(pDX, IDC_CARDID, m_cardid);
	DDX_Text(pDX, IDC_CARDPWD, m_cardpwd);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCARDLOGIN, CDialog)
	//{{AFX_MSG_MAP(CCARDLOGIN)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCARDLOGIN message handlers

void CCARDLOGIN::OnOK() 
{

	ADOConn Conn;
	_RecordsetPtr pRst;
	Conn.OnInitADOConn();
	_variant_t v;
	this->UpdateData(true);
	_bstr_t sql;
	sql="select *from cardInfo where cardId='"+m_cardid+"'"+"and cardPwd='"+m_cardpwd+"'";
	pRst=Conn.GetRecordset(sql);
	if(pRst->adoEOF)
	{
		AfxMessageBox("卡号或密码错误,请确认!");
		return;
	}
	else
	{  CString type,IsLoss;
		v=pRst->GetCollect("saveType");
        type=v.bstrVal;
		theApp.type=type;
		v=pRst->GetCollect("IsReportLoss");
        IsLoss=v.bstrVal;
		theApp.isloss=IsLoss;
       theApp.CARDID=m_cardid;
       AfxMessageBox("成功!");
	   CBankSystemApp* pApp=(CBankSystemApp*)AfxGetApp(); 
       CBankSystemDlg* pDlg=(CBankSystemDlg*)pApp->m_pMainWnd; 
	   pDlg->m_outop.ShowWindow(!SW_HIDE);
	}
	CDialog::OnOK();
}

⌨️ 快捷键说明

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