新建 文本文档.txt

来自「AA制消费管理系统(简易型) 实现账户信息」· 文本 代码 · 共 67 行

TXT
67
字号
CFormBase::load();
	//遍历一次向量容器,将账户打印出来
	CConManager &conman=CConManager::GetInstance();
	int consize;
	consize=conman.GetSize();
	vector<CConsume> tempvec;
	GotoXY(18,12);
	cout<<"Input Date From :"<<ends;
	GotoXY(18,14);
	cout<<"Input Date To   :"<<ends;
	GotoXY(18,12);
	do
	{
		string formdate=InputDate();
		string todate=InputDate();
		if(CMyString::DateCompare(fromdate,todate)>=0)
		{
			CMessageBox::ShowMessage("Your input is illegal,please input again.");
			continue;
		}
		else
			break;
	}while(1);
	for (int i=0;i<consize;i++)
	{
		if(CMyString::DateCompare(conman.GetConsume(i).GetDate,fromdate)>=0&&CMyString::DateCompare(conman.GetConsume(i).GetDate,todate)<=0)
			tempvec.push_back(conman.GetConsume(i));
	}




/***********************************************************************
日期输入函数
***********************************************************************/
string CFormAppendMoney::InputDate()
{
	//日期输入
	string date;
	CDateTime datetime;
	date=datetime.GetDateTime().substr(0,10);
	int x,y;
	WhereXY(&x,&y);
	do
	{
		GotoXY(x,y);
		CMessageBox::Clear(x,10);
		GetString(date,10);
		int len=date.length();
		if(date[len-1]==27)
			break;
		if(len==0)
		{
			CMessageBox::ShowMessage("Date cannot be null ! Input again.");
			continue;
		}
		if(date[len-1]==27)
			break;
		if(CMyString::CheckDate(date))
			break;
		else
			continue;
	}while(1);
	GotoXY(x,y);
	CMessageBox::Clear(x,10);
	return date;
}

⌨️ 快捷键说明

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