-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnitDataModuleMain.h
41 lines (37 loc) · 1.25 KB
/
UnitDataModuleMain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//---------------------------------------------------------------------------
#ifndef UnitDataModuleMainH
#define UnitDataModuleMainH
//---------------------------------------------------------------------------
/* -- usr -- */
/*-- sys -- */
#include <System.Classes.hpp>
#include <Data.DB.hpp>
#include <Data.Win.ADODB.hpp>
//---------------------------------------------------------------------------
typedef struct tagOPERATOR_INFO
{
int nOperatorId;
int nRoleId;
}OPERATOR_INFO,*POPERATOR_INFO;
class TDataModuleMain : public TDataModule
{
__published: // IDE-managed Components
TADOConnection *ADOConnectionMain;
void __fastcall DataModuleCreate(TObject *Sender);
void __fastcall DataModuleDestroy(TObject *Sender);
public:
enum TDatabaseType {dtMsAccess,dtMySQL,dtMsSQL,dtOracle};
public: // User declarations
__fastcall TDataModuleMain(TComponent* Owner);
public:
OPERATOR_INFO m_oiOperatorInfo;
private: // User declarations
String GetConnectionString();
String GetMDConnectionString(String& strDBName);
private:
String m_strConnection;
};
//---------------------------------------------------------------------------
extern PACKAGE TDataModuleMain *DataModuleMain;
//---------------------------------------------------------------------------
#endif