📄 system.cpp
字号:
/**********************************************************************************
* *
* Henry Banking System ATM Module *
* Copyright (c) 2004 by Henry. All rights reserved. *
* *
* Permission to use, copy, modify, and distribute this software for any purpose *
* is hereby granted without fee, provided that this copyright and permissions *
* notice appear in all copies and derivatives, and that no charge may be made *
* for the software and its documentation except to cover cost of distribution. *
* *
* This software is provided "as is" without express or implied warranty. *
* *
**********************************************************************************/
/*
* Description:
*
* Generate menu in a CUI way.
*
* Notes:
*
* This code has been written to conform to standard C++ and STL. It has been
* compiled successfully using Visual C++ 7.0.
*/
#include <string>
#include <vector>
#include "banking.h"
#include "common.h"
namespace banking
{
System::System()
{
DataSet temp("database/System.txt");
record = temp;
}
size_t System::getCurrentCardNo()
{
return(string2long(record.dataRow[0]));
}
size_t System::generateNewCardNo()
{
size_t cardNo = getCurrentCardNo() + 1;
record.dataRow[0] = long2string(cardNo);
record.update();
return cardNo;
}
size_t System::getCurrentDealingId()
{
return(string2long(record.dataRow[1]));
}
size_t System::generateNewDealingId()
{
size_t dealingId = getCurrentDealingId() + 1;
record.dataRow[1] = long2string(dealingId);
record.update();
return dealingId;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -