573 lines
16 KiB
ObjectPascal
573 lines
16 KiB
ObjectPascal
![]() |
unit U_GetDllForm;
|
|||
|
|
|||
|
interface
|
|||
|
|
|||
|
uses
|
|||
|
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, inifiles,
|
|||
|
dxCore, ActiveX;
|
|||
|
|
|||
|
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; export; stdcall;
|
|||
|
|
|||
|
function ConnData(): Boolean;
|
|||
|
|
|||
|
function GetsysParam(muserId: pchar; fparam1: pchar): Boolean;
|
|||
|
|
|||
|
implementation
|
|||
|
|
|||
|
uses
|
|||
|
U_DataLink, U_Fun, U_iniParam, U_MJManageNewFDNew, U_ProductOrderList,
|
|||
|
U_ProductOrderAnPai, U_MJEdit, U_JYOrderCDOne, U_JYOrderCDMore,
|
|||
|
U_CpCkSaoMNewSel, U_CKProductBCPInList, U_CKProductBCPOutList, U_BanCpHCSaoM,
|
|||
|
U_CKProductBCPHCList, U_CKProductBCPKCList, U_CKProductBCPKCHZList,
|
|||
|
U_CpRkSaoMNew, U_ClothContractList, U_ClothContractKCList,
|
|||
|
U_ProductOrderNewList, U_ClothPDInfoList, U_ClothHCList, U_ContractListNX,
|
|||
|
U_ClothContractListSX, U_ClothContractListHZ, U_ProductOrderLBNameSet,
|
|||
|
U_ProductOrderNewList_JD, U_CKJYList, U_CKProductJYHZList, U_ModulePromptList,
|
|||
|
U_CPDBAO, U_JYOrderOther_Main,U_JYOrderCDOne_ZDDY;
|
|||
|
|
|||
|
/////////////////////////////////////////////////////////////////
|
|||
|
// <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:ȡDll<6C>еô<D0B5><C3B4><EFBFBD> //
|
|||
|
// <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>App>><3E><><EFBFBD><EFBFBD>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD> //
|
|||
|
// FormH>><3E><><EFBFBD>ô<EFBFBD><C3B4>ھ<EFBFBD><DABE><EFBFBD> <20><> //
|
|||
|
// FormID>><3E><><EFBFBD>ں<EFBFBD>; //
|
|||
|
// Language>><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; //
|
|||
|
// WinStyle>><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD> //
|
|||
|
/////////////////////////////////////////////////////////////////
|
|||
|
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd;
|
|||
|
var
|
|||
|
mnewHandle: hwnd;
|
|||
|
mstyle: TFormStyle; // 0:<3A>Ӵ<EFBFBD><D3B4><EFBFBD>; 1<><31><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>
|
|||
|
mstate: TWindowState;
|
|||
|
mborderstyle: TFormBorderStyle;
|
|||
|
begin
|
|||
|
mnewHandle := 0;
|
|||
|
DName := GName;
|
|||
|
DCode := GCode;
|
|||
|
DdataBase := DataBase;
|
|||
|
DTitCaption := Title;
|
|||
|
DParameters1 := Parameters1;
|
|||
|
DParameters2 := Parameters2;
|
|||
|
DParameters3 := Parameters3;
|
|||
|
DParameters4 := Parameters4;
|
|||
|
DParameters5 := Parameters5;
|
|||
|
DParameters6 := Parameters6;
|
|||
|
DParameters7 := Parameters7;
|
|||
|
DParameters8 := Parameters8;
|
|||
|
DParameters9 := Parameters9;
|
|||
|
DParameters10 := Parameters10;
|
|||
|
|
|||
|
MainApplication := App;
|
|||
|
DCurHandle := FormH;
|
|||
|
IsDelphiLanguage := Language;
|
|||
|
|
|||
|
Application := TApplication(App);
|
|||
|
DCurHandle := 0;
|
|||
|
|
|||
|
|
|||
|
//<2F><>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
|
|||
|
SetLength(server, 255);
|
|||
|
SetLength(dtbase, 255);
|
|||
|
SetLength(user, 255);
|
|||
|
SetLength(pswd, 255);
|
|||
|
|
|||
|
server := '101.132.143.144,7781';
|
|||
|
// server:='.';
|
|||
|
dtbase := 'yuebangjydata';
|
|||
|
user := 'rtsa';
|
|||
|
pswd := 'rightsoft@5740';
|
|||
|
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
|||
|
|
|||
|
IF trim(DataBaseStr)<>''then
|
|||
|
DConString := DataBaseStr;
|
|||
|
|
|||
|
DParameters1:='<27><>Ȩ<EFBFBD><C8A8>';
|
|||
|
//DCode:='ADMIN';
|
|||
|
//DName:='ADMIN';
|
|||
|
// DParameters2:='<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>'; //12
|
|||
|
// DParameters2:='<27><><EFBFBD><EFBFBD>';
|
|||
|
if not ConnData() then
|
|||
|
begin
|
|||
|
result := 0;
|
|||
|
exit;
|
|||
|
end;
|
|||
|
if IsINIFile() then
|
|||
|
ReadINIFile()
|
|||
|
else
|
|||
|
WriteINIFile;
|
|||
|
GetsysParam('', '');
|
|||
|
// <20><><EFBFBD>崰<EFBFBD><E5B4B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>״̬
|
|||
|
if WinStyle = 0 then
|
|||
|
begin
|
|||
|
mstyle := fsMDIChild;
|
|||
|
mstate := wsMaximized;
|
|||
|
mborderstyle := bsSizeable;
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
mstyle := fsNormal;
|
|||
|
mstate := wsNormal;
|
|||
|
mborderstyle := bsSizeable;
|
|||
|
end;
|
|||
|
////////////////////
|
|||
|
/////////////////////
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD>鴰<EFBFBD><E9B4B0>
|
|||
|
case FormID of
|
|||
|
201: //<2F><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE>
|
|||
|
begin
|
|||
|
if frmProductOrderNewList = nil then
|
|||
|
begin
|
|||
|
frmProductOrderNewList := TfrmProductOrderNewList.Create(application.MainForm);
|
|||
|
with frmProductOrderNewList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmProductOrderNewList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmProductOrderNewList.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
202: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
begin
|
|||
|
if FrmJYOrderOther = nil then
|
|||
|
begin
|
|||
|
FrmJYOrderOther := TFrmJYOrderOther.Create(application.MainForm);
|
|||
|
with FrmJYOrderOther do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
fdatabase := trim(DataBase);
|
|||
|
// fdatabase:=trim('<27><>ѯ');
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
FrmJYOrderOther.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := FrmJYOrderOther.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
2: // <20><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmMJManageNewFDNewSF = nil then
|
|||
|
begin
|
|||
|
frmMJManageNewFDNewSF := TfrmMJManageNewFDNewSF.Create(application.MainForm);
|
|||
|
with frmMJManageNewFDNewSF do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmMJManageNewFDNewSF.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmMJManageNewFDNewSF.Handle;
|
|||
|
end;
|
|||
|
11: //<2F><>ǩƤ<C7A9><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmProductOrderLBNameSet = nil then
|
|||
|
begin
|
|||
|
frmProductOrderLBNameSet := TfrmProductOrderLBNameSet.Create(application.MainForm);
|
|||
|
with frmProductOrderLBNameSet do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmProductOrderLBNameSet.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmProductOrderLBNameSet.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
12: //<2F><>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmMJEdit = nil then
|
|||
|
begin
|
|||
|
frmMJEdit := TfrmMJEdit.Create(application.MainForm);
|
|||
|
with frmMJEdit do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmMJEdit.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmMJEdit.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
13: //<2F><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8>
|
|||
|
begin
|
|||
|
if frmCpRkSaoMNew = nil then
|
|||
|
begin
|
|||
|
frmCpRkSaoMNew := TfrmCpRkSaoMNew.Create(application.MainForm);
|
|||
|
with frmCpRkSaoMNew do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCpRkSaoMNew.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCpRkSaoMNew.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
14: //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmCpCkSaoMNewSel = nil then
|
|||
|
begin
|
|||
|
frmCpCkSaoMNewSel := TfrmCpCkSaoMNewSel.Create(application.MainForm);
|
|||
|
with frmCpCkSaoMNewSel do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCpCkSaoMNewSel.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCpCkSaoMNewSel.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
15: //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
begin
|
|||
|
if frmCKProductBCPInList = nil then
|
|||
|
begin
|
|||
|
frmCKProductBCPInList := TfrmCKProductBCPInList.Create(application.MainForm);
|
|||
|
with frmCKProductBCPInList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductBCPInList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductBCPInList.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
16: //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
begin
|
|||
|
if frmCKProductBCPOutList = nil then
|
|||
|
begin
|
|||
|
frmCKProductBCPOutList := TfrmCKProductBCPOutList.Create(application.MainForm);
|
|||
|
with frmCKProductBCPOutList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductBCPOutList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductBCPOutList.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
17: //<2F><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
begin
|
|||
|
if frmCKProductBCPKCList = nil then
|
|||
|
begin
|
|||
|
frmCKProductBCPKCList := TfrmCKProductBCPKCList.Create(application.MainForm);
|
|||
|
with frmCKProductBCPKCList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductBCPKCList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductBCPKCList.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
18: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
begin
|
|||
|
if frmCKProductBCPKCHZList = nil then
|
|||
|
begin
|
|||
|
frmCKProductBCPKCHZList := TfrmCKProductBCPKCHZList.Create(application.MainForm);
|
|||
|
with frmCKProductBCPKCHZList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductBCPKCHZList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductBCPKCHZList.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
19: //<2F><><EFBFBD>鱨<EFBFBD><E9B1A8>
|
|||
|
begin
|
|||
|
if frmJYOrderCDOne = nil then
|
|||
|
begin
|
|||
|
frmJYOrderCDOne := TfrmJYOrderCDOne.Create(application.MainForm);
|
|||
|
with frmJYOrderCDOne do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmJYOrderCDOne.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmJYOrderCDOne.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
191: //<2F>Զ<EFBFBD><D4B6><EFBFBD>ӡ
|
|||
|
begin
|
|||
|
if frmJYOrderCDOne_ZDDY = nil then
|
|||
|
begin
|
|||
|
frmJYOrderCDOne_ZDDY := TfrmJYOrderCDOne_ZDDY.Create(application.MainForm);
|
|||
|
with frmJYOrderCDOne_ZDDY do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmJYOrderCDOne_ZDDY.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmJYOrderCDOne_ZDDY.Handle;
|
|||
|
|
|||
|
// end;
|
|||
|
end;
|
|||
|
|
|||
|
22: //<2F><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE>ѡ<EFBFBD><D1A1>
|
|||
|
begin
|
|||
|
if frmClothHCList = nil then
|
|||
|
begin
|
|||
|
frmClothHCList := TfrmClothHCList.Create(application.MainForm);
|
|||
|
with frmClothHCList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmClothHCList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmClothHCList.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
23: //<2F><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE><EFBFBD><EFBFBD><EFBFBD>Ȳ<EFBFBD>ѯ
|
|||
|
begin
|
|||
|
if frmProductOrderNewList_JD = nil then
|
|||
|
begin
|
|||
|
frmProductOrderNewList_JD := TfrmProductOrderNewList_JD.Create(application.MainForm);
|
|||
|
with frmProductOrderNewList_JD do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmProductOrderNewList_JD.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmProductOrderNewList_JD.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
28: //<2F><><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmCPDBao = nil then
|
|||
|
begin
|
|||
|
frmCPDBao := TfrmCPDBao.Create(application.MainForm);
|
|||
|
with frmCPDBao do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
//ftype:='<27><><EFBFBD><EFBFBD>';
|
|||
|
//ftype:=trim(DataBase);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCPDBao.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCPDBao.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
29: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmCKProductJYHZList = nil then
|
|||
|
begin
|
|||
|
frmCKProductJYHZList := TfrmCKProductJYHZList.Create(application.MainForm);
|
|||
|
with frmCKProductJYHZList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductJYHZList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductJYHZList.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
32: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3>
|
|||
|
begin
|
|||
|
if frmCKJYList = nil then
|
|||
|
begin
|
|||
|
frmCKJYList := TfrmCKJYList.Create(application.MainForm);
|
|||
|
with frmCKJYList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKJYList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKJYList.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
61: //<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmModulePromptList = nil then
|
|||
|
begin
|
|||
|
frmModulePromptList := TfrmModulePromptList.Create(application.MainForm);
|
|||
|
with frmModulePromptList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmModulePromptList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmModulePromptList.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
end; // end case
|
|||
|
|
|||
|
Result := mnewHandle;
|
|||
|
// NewDllApp := Application;
|
|||
|
end;
|
|||
|
|
|||
|
function GetsysParam(muserId: pchar; fparam1: pchar): Boolean;
|
|||
|
begin
|
|||
|
result := true;
|
|||
|
//////////////////////////////
|
|||
|
shortDateFormat := 'yyyy-MM-dd';
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
with DataLink_TradeManage.AdoDataLink do
|
|||
|
begin
|
|||
|
close;
|
|||
|
sql.Clear;
|
|||
|
sql.Add('select getDate()as dt');
|
|||
|
open;
|
|||
|
DServerDate := fieldByName('dt').AsDatetime;
|
|||
|
end;
|
|||
|
result := true;
|
|||
|
end;
|
|||
|
//===========================================================
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>ӳ<EFBFBD>
|
|||
|
//===========================================================
|
|||
|
|
|||
|
function ConnData(): Boolean;
|
|||
|
var
|
|||
|
IniFile: TIniFile;
|
|||
|
begin
|
|||
|
try
|
|||
|
IniFile := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'SYSTEMSET.INI');
|
|||
|
PicSvr := IniFile.ReadString('SERVER', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ', '127.0.0.1');
|
|||
|
UserDataFlag := IniFile.ReadString('SERVER', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>', '');
|
|||
|
if (UserDataFlag = '0') or (UserDataFlag = '10') then
|
|||
|
UserDataFlag := '';
|
|||
|
finally
|
|||
|
IniFile.Free;
|
|||
|
end;
|
|||
|
if not Assigned(DataLink_TradeManage) then
|
|||
|
DataLink_TradeManage := TDataLink_TradeManage.Create(Application);
|
|||
|
try
|
|||
|
with DataLink_TradeManage.ADOLink do
|
|||
|
begin
|
|||
|
if not Connected then
|
|||
|
begin
|
|||
|
Connected := false;
|
|||
|
ConnectionString := DConString;
|
|||
|
LoginPrompt := false;
|
|||
|
Connected := true;
|
|||
|
end;
|
|||
|
end;
|
|||
|
Result := true;
|
|||
|
except
|
|||
|
Result := false;
|
|||
|
application.MessageBox('<27><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><><EFBFBD><EFBFBD>', mb_Ok + MB_ICONERROR);
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
initialization
|
|||
|
CoInitialize(nil);
|
|||
|
dxUnitsLoader.Initialize;
|
|||
|
|
|||
|
finalization
|
|||
|
DataLink_TradeManage.Free;
|
|||
|
application := NewDllApp;
|
|||
|
dxUnitsLoader.Finalize;
|
|||
|
|
|||
|
end.
|
|||
|
|