573 lines
16 KiB
ObjectPascal
573 lines
16 KiB
ObjectPascal
![]() |
unit U_GetDllForm;
|
|||
|
|
|||
|
interface
|
|||
|
|
|||
|
uses
|
|||
|
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, 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;
|
|||
|
|
|||
|
implementation
|
|||
|
|
|||
|
uses
|
|||
|
U_DataLink, U_CpRkSaoMNew, U_CKProductBCPInList, U_SQSMCK, U_CPSMCK,
|
|||
|
U_PBOuGLtList, U_PBOuGLtListHZ, U_PBOuGLtListBHHZ, U_CKProductBCPKCList,
|
|||
|
U_CKProductBCPKCHZList, U_PBSMCK, U_PBSDCK;
|
|||
|
|
|||
|
/////////////////////////////////////////////////////////////////
|
|||
|
// <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> //
|
|||
|
/////////////////////////////////////////////////////////////////
|
|||
|
var
|
|||
|
frmCKProductBCPInListPBGL, frmCKProductBCPInListPBCX: TfrmCKProductBCPInListPB;
|
|||
|
frmCKProductBCPKCListPB, frmCKProductBCPKCListPBGL: TfrmCKProductBCPKCListPB;
|
|||
|
frmCKProductBCPKCHZListPBGL, frmCKProductBCPKCHZListPBCX: TfrmCKProductBCPKCHZListPB;
|
|||
|
frmPBSMCK2, frmPBSMCK: tfrmPBSMCK;
|
|||
|
|
|||
|
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
|
|||
|
i: Integer;
|
|||
|
bFound: Boolean;
|
|||
|
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 := PChar(GName);
|
|||
|
DCode := PChar(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);
|
|||
|
|
|||
|
user := 'rtsa';
|
|||
|
dtbase := 'xianghengdata';
|
|||
|
server := '101.132.143.144,7781';
|
|||
|
pswd := 'rightsoft@5740';
|
|||
|
// pswd := 'rightsoft';
|
|||
|
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
|||
|
DConString := DataBaseStr;
|
|||
|
// DName:='<27>ܸ<EFBFBD><DCB8><EFBFBD>';
|
|||
|
//DParameters1:='<27><>Ȩ<EFBFBD><C8A8>'; //<2F><>Ȩ<EFBFBD><C8A8>
|
|||
|
//DParameters3:='1';
|
|||
|
if not ConnData() then
|
|||
|
begin
|
|||
|
result := 0;
|
|||
|
exit;
|
|||
|
end;
|
|||
|
|
|||
|
// <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
|
|||
|
101: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8>
|
|||
|
begin
|
|||
|
if frmCpRkSaoMNewPB = nil then
|
|||
|
begin
|
|||
|
frmCpRkSaoMNewPB := TfrmCpRkSaoMNewPB.Create(application.MainForm);
|
|||
|
with frmCpRkSaoMNewPB do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCpRkSaoMNewPB.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCpRkSaoMNewPB.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
111: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmCKProductBCPInListPBGL.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
//if frmBaoGuanListBGZL=nil then
|
|||
|
begin
|
|||
|
frmCKProductBCPInListPBGL := TfrmCKProductBCPInListPB.Create(application.MainForm);
|
|||
|
with frmCKProductBCPInListPBGL do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductBCPInListPBGL.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductBCPInListPBGL.Handle;
|
|||
|
end;
|
|||
|
112: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmCKProductBCPInListPBCX.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
//if frmBaoGuanListBGZL=nil then
|
|||
|
begin
|
|||
|
frmCKProductBCPInListPBCX := TfrmCKProductBCPInListPB.Create(application.MainForm);
|
|||
|
with frmCKProductBCPInListPBCX do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductBCPInListPBCX.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductBCPInListPBCX.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
201: //ɨ<><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmSQSMCK = nil then
|
|||
|
begin
|
|||
|
frmSQSMCK := TfrmSQSMCK.Create(application.MainForm);
|
|||
|
with frmSQSMCK do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmSQSMCK.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmSQSMCK.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
200: //<2F><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD>⣨<EFBFBD><E2A3A8><EFBFBD><EFBFBD><EFBFBD>䣩
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmPBSMCK.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
//if frmBaoGuanListBGZL=nil then
|
|||
|
begin
|
|||
|
frmPBSMCK := TfrmPBSMCK.Create(application.MainForm);
|
|||
|
with frmPBSMCK do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)';
|
|||
|
canshu1 := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmPBSMCK.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmPBSMCK.Handle;
|
|||
|
end;
|
|||
|
2001: //<2F><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD>⣨һ<E2A3A8><D2BB><EFBFBD>䣩
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(һ<><D2BB><EFBFBD><EFBFBD>)' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmPBSMCK2.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
//if frmBaoGuanListBGZL=nil then
|
|||
|
begin
|
|||
|
frmPBSMCK2 := TfrmPBSMCK.Create(application.MainForm);
|
|||
|
with frmPBSMCK2 do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(һ<><D2BB><EFBFBD><EFBFBD>)';
|
|||
|
canshu1 := 'һ<><D2BB><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmPBSMCK2.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmPBSMCK2.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
202: //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmCPSMCK = nil then
|
|||
|
begin
|
|||
|
frmCPSMCK := TfrmCPSMCK.Create(application.MainForm);
|
|||
|
with frmCPSMCK do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCPSMCK.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCPSMCK.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
203: //<2F><><EFBFBD>ϳ<EFBFBD><CFB3><EFBFBD>
|
|||
|
begin
|
|||
|
if frmPBSDCK = nil then
|
|||
|
begin
|
|||
|
frmPBSDCK := TfrmPBSDCK.Create(application.MainForm);
|
|||
|
with frmPBSDCK do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmPBSDCK.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmPBSDCK.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
211: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmPBOuGLtList = nil then
|
|||
|
begin
|
|||
|
frmPBOuGLtList := TfrmPBOuGLtList.Create(application.MainForm);
|
|||
|
with frmPBOuGLtList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmPBOuGLtList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmPBOuGLtList.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
221: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmPBOuGLtListHZ = nil then
|
|||
|
begin
|
|||
|
frmPBOuGLtListHZ := TfrmPBOuGLtListHZ.Create(application.MainForm);
|
|||
|
with frmPBOuGLtListHZ do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmPBOuGLtListHZ.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmPBOuGLtListHZ.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
231: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ż<EFBFBD><C5BB><EFBFBD>
|
|||
|
begin
|
|||
|
if frmPBOuGLtListBHHZ = nil then
|
|||
|
begin
|
|||
|
frmPBOuGLtListBHHZ := TfrmPBOuGLtListBHHZ.Create(application.MainForm);
|
|||
|
with frmPBOuGLtListBHHZ do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmPBOuGLtListBHHZ.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmPBOuGLtListBHHZ.Handle;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
311: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmCKProductBCPKCListPB.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmCKProductBCPKCListPB := TfrmCKProductBCPKCListPB.Create(application.MainForm);
|
|||
|
with frmCKProductBCPKCListPB do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductBCPKCListPB.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductBCPKCListPB.Handle;
|
|||
|
end;
|
|||
|
312: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmCKProductBCPKCListPBGL.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmCKProductBCPKCListPBGL := TfrmCKProductBCPKCListPB.Create(application.MainForm);
|
|||
|
with frmCKProductBCPKCListPBGL do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
canshu1 := '<27><><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductBCPKCListPBGL.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductBCPKCListPBGL.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
// 321: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
// begin
|
|||
|
// if frmCKProductBCPKCHZListPB = nil then
|
|||
|
// begin
|
|||
|
// frmCKProductBCPKCHZListPB := TfrmCKProductBCPKCHZListPB.Create(application.MainForm);
|
|||
|
// with frmCKProductBCPKCHZListPB do
|
|||
|
// begin
|
|||
|
// caption := Trim(Title);
|
|||
|
// FormStyle := mstyle;
|
|||
|
// windowState := mstate;
|
|||
|
// BorderStyle := mborderstyle;
|
|||
|
// //show;
|
|||
|
// end;
|
|||
|
// end
|
|||
|
// else
|
|||
|
// frmCKProductBCPKCHZListPB.BringToFront;
|
|||
|
// //<2F><><EFBFBD><EFBFBD>
|
|||
|
// mnewHandle := frmCKProductBCPKCHZListPB.Handle;
|
|||
|
// end;
|
|||
|
321: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܹ<EFBFBD><DCB9><EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmCKProductBCPKCHZListPBGL.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
//if frmBaoGuanListBGZL=nil then
|
|||
|
begin
|
|||
|
frmCKProductBCPKCHZListPBGL := TfrmCKProductBCPKCHZListPB.Create(application.MainForm);
|
|||
|
with frmCKProductBCPKCHZListPBGL do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܹ<EFBFBD><DCB9><EFBFBD>';
|
|||
|
CANSHU1 := '<27><><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductBCPKCHZListPBGL.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductBCPKCHZListPBGL.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
322: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܲ<EFBFBD>ѯ
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܲ<EFBFBD>ѯ' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmCKProductBCPKCHZListPBCX.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
//if frmBaoGuanListBGZL=nil then
|
|||
|
begin
|
|||
|
frmCKProductBCPKCHZListPBCX := TfrmCKProductBCPKCHZListPB.Create(application.MainForm);
|
|||
|
with frmCKProductBCPKCHZListPBCX do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܲ<EFBFBD>ѯ';
|
|||
|
CANSHU1 := '<27><>ѯ';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductBCPKCHZListPBCX.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductBCPKCHZListPBCX.Handle;
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
Result := mnewHandle;
|
|||
|
// NewDllApp := Application;
|
|||
|
end;
|
|||
|
//===========================================================
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>ӳ<EFBFBD>
|
|||
|
//===========================================================
|
|||
|
|
|||
|
function ConnData(): Boolean;
|
|||
|
begin
|
|||
|
if not Assigned(DataLink_GreyClothWarehouse) then
|
|||
|
DataLink_GreyClothWarehouse := TDataLink_GreyClothWarehouse.Create(Application);
|
|||
|
try
|
|||
|
with DataLink_GreyClothWarehouse.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
|
|||
|
// OldDllApp := Application;
|
|||
|
//
|
|||
|
//finalization
|
|||
|
// DataLink_GreyClothWarehouse.Free;
|
|||
|
// Application := OldDllApp;
|
|||
|
initialization
|
|||
|
CoInitialize(nil);
|
|||
|
dxUnitsLoader.Initialize;
|
|||
|
|
|||
|
|
|||
|
finalization
|
|||
|
DataLink_GreyClothWarehouse.Free;
|
|||
|
application := NewDllApp;
|
|||
|
dxUnitsLoader.Finalize;
|
|||
|
|
|||
|
end.
|
|||
|
|