540 lines
16 KiB
ObjectPascal
540 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
|
|||
|
|
frmProductOrderMoneyList
|
|||
|
|
uses
|
|||
|
|
U_DataLink, U_Fun, U_iniParam, U_MJManageNewFDNew, U_ProductOrderList,
|
|||
|
|
U_ProductOrderAnPai, U_OrderJDList, U_MJEdit, U_JYOrderCDMore,
|
|||
|
|
U_CKProductBCPInList, U_SYRName_XS_List, U_CP_KZ_XL, U_CKProductBCPOutList,
|
|||
|
|
U_BanCpHCSaoM, U_CKProductBCPHCList, U_CKProductBCPKCList,
|
|||
|
|
U_ProductOrderNewList_JD, U_CKProductBCPKCHZList, U_CpRkSaoMNew,
|
|||
|
|
U_ClothContractList, U_ClothContractListDH, U_ClothContractListLL,
|
|||
|
|
U_ClothContractKCList, U_ContractList, U_ProductOrderNewList,
|
|||
|
|
U_ClothContractListWJG, U_ClothPDInfoList, U_CP_CRC, U_ClothHCList,
|
|||
|
|
U_ProductOrder_Ph, U_ClothContractList_CG, U_ClothContractList_Tp,
|
|||
|
|
U_ClothContractList_Help, U_ClothContractList_JG, U_CKPHKCList, U_HCList,
|
|||
|
|
U_ProductOrder_Ph10, U_CrkAccount, U_CKProductBCPInList_Other,
|
|||
|
|
U_CKProductBCPOutList_other, U_ProductOrder_Ph_other,
|
|||
|
|
U_CKProductBCPKCList_other, U_CKProductBCPKCHZList_other, U_CrkAccount_other,
|
|||
|
|
U_KCRLLTZ, U_MJManageNewFDNew_other, U_JYOrderCDOne_Other, U_xslist_other,
|
|||
|
|
U_YHList_other, U_CKProductBCPKCHZListSUM_other, U_KCRLLTZ_other, U_CKEJK,
|
|||
|
|
U_ModulePromptList, U_CKSMEdit, U_KH_XS_List, U_CP_XL, U_CP_COL_XL,
|
|||
|
|
U_CKProductCPKCHZList_Yj, U_KWSMEdit, U_CP_KC, U_SYR_CP_XS_List,
|
|||
|
|
U_SYR_CP_Col_XS_List, U_THRK_CP_list, U_CKProductBCPOutHZ_List, U_CKPDlist,
|
|||
|
|
U_ProductOrderMoneyList, U_ProductOrderNewList_OrdJD,
|
|||
|
|
U_ProductOrderMoneyList_BPXCX, U_ProductOrderShenH;
|
|||
|
|
|
|||
|
|
/////////////////////////////////////////////////////////////////
|
|||
|
|
// <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
|
|||
|
|
frmProductOrderNewList, frmProductOrderNewListGW, frmProductOrderGLi: TfrmProductOrderNewList;
|
|||
|
|
frmProductOrderShenH: TfrmProductOrderShenH;
|
|||
|
|
|
|||
|
|
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 := 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:='.';
|
|||
|
|
// pswd:='rightsoft';
|
|||
|
|
server := '106.15.78.45,7781';
|
|||
|
|
pswd := 'rightsoft@2222';
|
|||
|
|
dtbase := 'xiangyingData';
|
|||
|
|
user := 'xiangyingsa';
|
|||
|
|
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
|||
|
|
DConString := DataBaseStr;
|
|||
|
|
// DParameters1 := '<27><>ѯ';
|
|||
|
|
// DParameters2 := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>';
|
|||
|
|
// DParameters2:='<27><>Ȩ<EFBFBD><C8A8>';
|
|||
|
|
// DName := 'admin';
|
|||
|
|
// DCode:='test';
|
|||
|
|
// DName:='<27><><EFBFBD><EFBFBD>';
|
|||
|
|
// DParameters1:='<27><><EFBFBD><EFBFBD>';
|
|||
|
|
// DParameters3:='<27><><EFBFBD>Ųֿ<C5B2>';
|
|||
|
|
//database:='';
|
|||
|
|
if not ConnData() then
|
|||
|
|
begin
|
|||
|
|
result := 0;
|
|||
|
|
exit;
|
|||
|
|
end;
|
|||
|
|
if IsINIFile() then
|
|||
|
|
ReadINIFile()
|
|||
|
|
else
|
|||
|
|
WriteINIFile;
|
|||
|
|
// <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
|
|||
|
|
0: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>
|
|||
|
|
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><C2BC>(<28><><EFBFBD><EFBFBD>)' then
|
|||
|
|
begin
|
|||
|
|
BringWindowToTop(frmProductOrderNewList.Handle);
|
|||
|
|
bFound := TRUE;
|
|||
|
|
Break;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
if not bFound then
|
|||
|
|
begin
|
|||
|
|
frmProductOrderNewList := TfrmProductOrderNewList.Create(application.MainForm);
|
|||
|
|
with frmProductOrderNewList do
|
|||
|
|
begin
|
|||
|
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>(<28><><EFBFBD><EFBFBD>)';
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
fsyrName := trim(DataBase);
|
|||
|
|
fDParameters1 := trim(DParameters1);
|
|||
|
|
forderType := trim(DParameters2);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmProductOrderNewList.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmProductOrderNewList.Handle;
|
|||
|
|
end;
|
|||
|
|
101: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>(<28><><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><C2BC>(<28><><EFBFBD><EFBFBD>)' then
|
|||
|
|
begin
|
|||
|
|
BringWindowToTop(frmProductOrderNewListGW.Handle);
|
|||
|
|
bFound := TRUE;
|
|||
|
|
Break;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
if not bFound then
|
|||
|
|
begin
|
|||
|
|
frmProductOrderNewListGW := TfrmProductOrderNewList.Create(application.MainForm);
|
|||
|
|
with frmProductOrderNewListGW do
|
|||
|
|
begin
|
|||
|
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>(<28><><EFBFBD><EFBFBD>)';
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
fsyrName := trim(DataBase);
|
|||
|
|
fDParameters1 := trim(DParameters1);
|
|||
|
|
forderType := trim(DParameters2);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmProductOrderNewListGW.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmProductOrderNewListGW.Handle;
|
|||
|
|
end;
|
|||
|
|
1: //<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(frmProductOrderShenH.Handle);
|
|||
|
|
bFound := TRUE;
|
|||
|
|
Break;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
if not bFound then
|
|||
|
|
begin
|
|||
|
|
frmProductOrderShenH := TfrmProductOrderShenH.Create(application.MainForm);
|
|||
|
|
with frmProductOrderShenH do
|
|||
|
|
begin
|
|||
|
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
fsyrName := trim(DataBase);
|
|||
|
|
fDParameters1 := trim(DParameters1);
|
|||
|
|
forderType := trim(DParameters2);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmProductOrderShenH.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmProductOrderShenH.Handle;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
2: //<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(frmProductOrderGLi.Handle);
|
|||
|
|
bFound := TRUE;
|
|||
|
|
Break;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
if not bFound then
|
|||
|
|
begin
|
|||
|
|
frmProductOrderGLi := TfrmProductOrderNewList.Create(application.MainForm);
|
|||
|
|
with frmProductOrderGLi do
|
|||
|
|
begin
|
|||
|
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
fsyrName := trim(DataBase);
|
|||
|
|
fDParameters1 := trim(DParameters1);
|
|||
|
|
forderType := trim(DParameters2);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmProductOrderGLi.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmProductOrderGLi.Handle;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
-1: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
begin
|
|||
|
|
if frmProductOrderNewList_JD = nil then
|
|||
|
|
begin
|
|||
|
|
frmProductOrderNewList_JD := TfrmProductOrderNewList_JD.Create(application.MainForm);
|
|||
|
|
with frmProductOrderNewList_JD do
|
|||
|
|
begin
|
|||
|
|
fsyrName := trim(DataBase);
|
|||
|
|
if trim(DParameters1) <> '' then
|
|||
|
|
begin
|
|||
|
|
CustomerNoName.Text := trim(DParameters1);
|
|||
|
|
CustomerNoName.Enabled := fALSE;
|
|||
|
|
end;
|
|||
|
|
forderType := trim(DParameters2);
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmProductOrderNewList_JD.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmProductOrderNewList_JD.Handle;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
3: //<2F><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE>
|
|||
|
|
begin
|
|||
|
|
if frmProductOrderMoneyList = nil then
|
|||
|
|
begin
|
|||
|
|
frmProductOrderMoneyList := TfrmProductOrderMoneyList.Create(application.MainForm);
|
|||
|
|
with frmProductOrderMoneyList do
|
|||
|
|
begin
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmProductOrderMoneyList.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmProductOrderMoneyList.Handle;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
31: //<2F><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ѯ
|
|||
|
|
begin
|
|||
|
|
if frmProductOrderMoneyList_BPXCX = nil then
|
|||
|
|
begin
|
|||
|
|
frmProductOrderMoneyList_BPXCX := TfrmProductOrderMoneyList_BPXCX.Create(application.MainForm);
|
|||
|
|
with frmProductOrderMoneyList_BPXCX do
|
|||
|
|
begin
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmProductOrderMoneyList_BPXCX.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmProductOrderMoneyList_BPXCX.Handle;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
4: //<2F><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE><EFBFBD><EFBFBD><EFBFBD>Ȳ<EFBFBD>ѯ
|
|||
|
|
begin
|
|||
|
|
if frmProductOrderNewList_OrdJD = nil then
|
|||
|
|
begin
|
|||
|
|
frmProductOrderNewList_OrdJD := TfrmProductOrderNewList_OrdJD.Create(application.MainForm);
|
|||
|
|
with frmProductOrderNewList_OrdJD do
|
|||
|
|
begin
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmProductOrderNewList_OrdJD.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmProductOrderNewList_OrdJD.Handle;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
7: //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
|
begin
|
|||
|
|
if frmCKProductBCPOutList = nil then
|
|||
|
|
begin
|
|||
|
|
frmCKProductBCPOutList := TfrmCKProductBCPOutList.Create(application.MainForm);
|
|||
|
|
with frmCKProductBCPOutList do
|
|||
|
|
begin
|
|||
|
|
fckname := trim(DParameters3);
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmCKProductBCPOutList.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmCKProductBCPOutList.Handle;
|
|||
|
|
end;
|
|||
|
|
71: //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
|
begin
|
|||
|
|
if frmCKProductBCPOutHZ_List = nil then
|
|||
|
|
begin
|
|||
|
|
frmCKProductBCPOutHZ_List := TfrmCKProductBCPOutHZ_List.Create(application.MainForm);
|
|||
|
|
with frmCKProductBCPOutHZ_List do
|
|||
|
|
begin
|
|||
|
|
fckname := trim(DParameters3);
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmCKProductBCPOutHZ_List.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmCKProductBCPOutHZ_List.Handle;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
9: //<2F><>Ʒ<EFBFBD>б<EFBFBD>
|
|||
|
|
begin
|
|||
|
|
if frmCKProductBCPHCList = nil then
|
|||
|
|
begin
|
|||
|
|
frmCKProductBCPHCList := TfrmCKProductBCPHCList.Create(application.MainForm);
|
|||
|
|
with frmCKProductBCPHCList do
|
|||
|
|
begin
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmCKProductBCPHCList.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmCKProductBCPHCList.Handle;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
10: //<2F><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
|
begin
|
|||
|
|
if frmCKProductBCPKCList = nil then
|
|||
|
|
begin
|
|||
|
|
frmCKProductBCPKCList := TfrmCKProductBCPKCList.Create(application.MainForm);
|
|||
|
|
with frmCKProductBCPKCList do
|
|||
|
|
begin
|
|||
|
|
fckname := trim(DParameters3);
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmCKProductBCPKCList.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmCKProductBCPKCList.Handle;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
11: //<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;
|
|||
|
|
111: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
|
begin
|
|||
|
|
if frmCP_CRC = nil then
|
|||
|
|
begin
|
|||
|
|
frmCP_CRC := TfrmCP_CRC.Create(application.MainForm);
|
|||
|
|
with frmCP_CRC do
|
|||
|
|
begin
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmCP_CRC.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmCP_CRC.Handle;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
114: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
|
begin
|
|||
|
|
if frmCP_KC = nil then
|
|||
|
|
begin
|
|||
|
|
frmCP_KC := TfrmCP_KC.Create(application.MainForm);
|
|||
|
|
with frmCP_KC do
|
|||
|
|
begin
|
|||
|
|
caption := Trim(Title);
|
|||
|
|
FormStyle := mstyle;
|
|||
|
|
windowState := mstate;
|
|||
|
|
BorderStyle := mborderstyle;
|
|||
|
|
//show;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
frmCP_KC.BringToFront;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
|
mnewHandle := frmCP_KC.Handle;
|
|||
|
|
end;
|
|||
|
|
end; // end case
|
|||
|
|
|
|||
|
|
Result := mnewHandle;
|
|||
|
|
// NewDllApp:=Application ;
|
|||
|
|
end;
|
|||
|
|
//===========================================================
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>ӳ<EFBFBD>
|
|||
|
|
//===========================================================
|
|||
|
|
|
|||
|
|
function ConnData(): Boolean;
|
|||
|
|
begin
|
|||
|
|
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.
|
|||
|
|
|