📄 result.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "result.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TResultForm *ResultForm;
//---------------------------------------------------------------------------
__fastcall TResultForm::TResultForm(TComponent* Owner)
: TForm(Owner)
{
AbortFlag=false;
InputError=false;
}
//---------------------------------------------------------------------------
void __fastcall TResultForm::Timer1Timer(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
bool TResultForm::GetAbortFlag()
{
return AbortFlag;
}
//---------------------------------------------------------------------------
bool TResultForm::GetInputError()
{
return InputError;
}
//---------------------------------------------------------------------------
void __fastcall TResultForm::SetAccNo(AnsiString str)
{
AccountsNo=str;
}
//---------------------------------------------------------------------------
void __fastcall TResultForm::SetName(AnsiString str)
{
PatientName=str;
}
//---------------------------------------------------------------------------
void __fastcall TResultForm::FormShow(TObject *Sender)
{
Query1->Active=false;
Query1->Params->Items[0]->AsString=AccountsNo;
Query1->Params->Items[1]->AsString=PatientName;
Query1->Active=true;
if (accounts->Text=="")
{
InputError=true;
Query1->Active=false;
if(MessageDlg("对不起,您输入的数据有误,\n请重新查询,谢谢!",
mtError,TMsgDlgButtons()<<mbOK<<mbAbort,0)!=mrOk)
AbortFlag=true;
Timer1->Enabled=true;
}
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -