📄 datamoudle.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "DataMoudle.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TDM *DM;
//---------------------------------------------------------------------------
__fastcall TDM::TDM(TComponent* Owner)
: TDataModule(Owner)
{
}
//---------------------------------------------------------------------------
/*//功能: 返回指定表的主键
//
int TDataModule2::GetID(int i)
{
int i_pk=0;
if (cdsQuery->State != dsInactive) cdsQuery->Close();
cdsQuery->CommandText="";
switch (i)
{
case 1:
{
cdsQuery->CommandText = " select max(id) as maxid from Regin";
cdsQuery->Active = true;
if (cdsQuery->RecordCount >0 )
i_pk = cdsQuery->FieldByName("maxid")->AsInteger;
i_pk++;
};
break;
}
if (cdsQuery->State != dsInactive) cdsQuery->Close();
return i_pk;
}
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -