793 lines
22 KiB
ObjectPascal
793 lines
22 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_ContractList, U_ContractListNX
|
|||
|
//<2F><>ͬ U_CPGangNo
|
|||
|
, U_ProductOrderNewList, U_ProductOrderLBNameSet//ָʾ<D6B8><CABE>
|
|||
|
, U_MJManageNewFDNew, U_KcRollCaiFen, U_JYOrderCDOne, U_MJEdit, U_CPDBAO
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
, U_CpRkSaoMNew, U_CKProductBCPInList, U_CKProductRKHZList //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
, U_ProductOrderNewList_CY, U_CpCkSaoMNewSel, U_CKProductBCPOutList,
|
|||
|
U_CKProductCKHZList //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
, U_CKProductBCPKCList, U_CKProductBCPKCHZList, U_CKProductBSCRCList//<2F><><EFBFBD><EFBFBD>
|
|||
|
, U_ModulePromptList //<2F><>ʾ
|
|||
|
, U_ProductOrderNewList_JD, U_OrderLRList, U_ContractListXF_YGML,
|
|||
|
U_ProductOrderJdList;
|
|||
|
|
|||
|
/////////////////////////////////////////////////////////////////
|
|||
|
// <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
|
|||
|
frmPRTCYLR, frmPRTCYCW, frmPRTCYCK: TfrmProductOrderNewList_CY;
|
|||
|
frmProductOrderLR, frmProductOrderGQX: TfrmProductOrderNewList;
|
|||
|
|
|||
|
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 := '.';
|
|||
|
server := '121.40.233.100,7781';
|
|||
|
dtbase := 'chengxiedata';
|
|||
|
user := 'sa';
|
|||
|
pswd := 'rightsoft@123';
|
|||
|
// pswd := 'rightsoft';
|
|||
|
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
|||
|
DConString := DataBaseStr;
|
|||
|
|
|||
|
// DCode:='002';
|
|||
|
// DName:='ԬȪ<D4AC><C8AA>';
|
|||
|
// DParameters1 := '<27><>Ȩ<EFBFBD><C8A8>';
|
|||
|
// DParameters1:='¼<><C2BC>';
|
|||
|
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
|
|||
|
111: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ
|
|||
|
begin
|
|||
|
if frmContractList = nil then
|
|||
|
begin
|
|||
|
frmContractList := TfrmContractList.Create(application.MainForm);
|
|||
|
with frmContractList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmContractList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmContractList.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
121: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ
|
|||
|
begin
|
|||
|
if frmContractListNX = nil then
|
|||
|
begin
|
|||
|
frmContractListNX := TfrmContractListNX.Create(application.MainForm);
|
|||
|
with frmContractListNX do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmContractListNX.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmContractListNX.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
211: //<2F><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE>¼<EFBFBD><C2BC>
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE>¼<EFBFBD><C2BC>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmProductOrderLR.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmProductOrderLR := TfrmProductOrderNewList.Create(application.MainForm);
|
|||
|
with frmProductOrderLR do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE>¼<EFBFBD><C2BC>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmProductOrderLR.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmProductOrderLR.Handle;
|
|||
|
end;
|
|||
|
212: //<2F><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE>¼<EFBFBD>루<EFBFBD><EBA3A8>Ȩ<EFBFBD>ޣ<EFBFBD>
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE>¼<EFBFBD>루<EFBFBD><EBA3A8>Ȩ<EFBFBD>ޣ<EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmProductOrderGQX.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmProductOrderGQX := TfrmProductOrderNewList.Create(application.MainForm);
|
|||
|
with frmProductOrderGQX do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE>¼<EFBFBD>루<EFBFBD><EBA3A8>Ȩ<EFBFBD>ޣ<EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmProductOrderGQX.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmProductOrderGQX.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
221: //<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;
|
|||
|
|
|||
|
231: //<2F>ɱ<EFBFBD>Ԥ<EFBFBD><D4A4>
|
|||
|
begin
|
|||
|
if frmContractListXF_YGML = nil then
|
|||
|
begin
|
|||
|
frmContractListXF_YGML := TfrmContractListXF_YGML.Create(application.MainForm);
|
|||
|
with frmContractListXF_YGML do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmContractListXF_YGML.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmContractListXF_YGML.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
241: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmOrderLRList = nil then
|
|||
|
begin
|
|||
|
frmOrderLRList := TfrmOrderLRList.Create(application.MainForm);
|
|||
|
with frmOrderLRList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmOrderLRList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmOrderLRList.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
251: //<2F><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE><EFBFBD><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>Ȳ<EFBFBD>ѯ
|
|||
|
begin
|
|||
|
if frmProductOrderJdList = nil then
|
|||
|
begin
|
|||
|
frmProductOrderJdList := TfrmProductOrderJdList.Create(application.MainForm);
|
|||
|
with frmProductOrderJdList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmProductOrderJdList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmProductOrderJdList.Handle;
|
|||
|
end;
|
|||
|
311: // <20><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmMJManageNewFDNewSF = nil then
|
|||
|
begin
|
|||
|
frmMJManageNewFDNewSF := TfrmMJManageNewFDNewSF.Create(application.MainForm);
|
|||
|
with frmMJManageNewFDNewSF do
|
|||
|
begin
|
|||
|
fmanage := Trim(DataBase);
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmMJManageNewFDNewSF.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmMJManageNewFDNewSF.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
321: // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ
|
|||
|
begin
|
|||
|
if frmKcRollCaiFen = nil then
|
|||
|
begin
|
|||
|
frmKcRollCaiFen := TfrmKcRollCaiFen.Create(application.MainForm);
|
|||
|
with frmKcRollCaiFen do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmKcRollCaiFen.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmKcRollCaiFen.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
331: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|||
|
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;
|
|||
|
|
|||
|
341: //<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;
|
|||
|
|
|||
|
351: // <20><>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmCPDBao = nil then
|
|||
|
begin
|
|||
|
frmCPDBao := TfrmCPDBao.Create(application.MainForm);
|
|||
|
with frmCPDBao do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCPDBao.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCPDBao.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
411: //<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;
|
|||
|
|
|||
|
421: //<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;
|
|||
|
|
|||
|
431: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmCKProductRKHZList = nil then
|
|||
|
begin
|
|||
|
frmCKProductRKHZList := TfrmCKProductRKHZList.Create(application.MainForm);
|
|||
|
with frmCKProductRKHZList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductRKHZList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductRKHZList.Handle;
|
|||
|
end;
|
|||
|
511: //<2F><><EFBFBD><EFBFBD><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><EFBFBD>¼<EFBFBD><C2BC>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmPRTCYLR.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmPRTCYLR := TfrmProductOrderNewList_CY.Create(application.MainForm);
|
|||
|
with frmPRTCYLR do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmPRTCYLR.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmPRTCYLR.Handle;
|
|||
|
end;
|
|||
|
512: //<2F><><EFBFBD><EFBFBD><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><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmPRTCYCW.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmPRTCYCW := TfrmProductOrderNewList_CY.Create(application.MainForm);
|
|||
|
with frmPRTCYCW do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmPRTCYCW.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmPRTCYCW.Handle;
|
|||
|
end;
|
|||
|
513: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֿ<EFBFBD><D6BF><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><D6BF><EFBFBD><EFBFBD><EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmPRTCYCK.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmPRTCYCK := TfrmProductOrderNewList_CY.Create(application.MainForm);
|
|||
|
with frmPRTCYCK do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֿ<EFBFBD><D6BF><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmPRTCYCK.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmPRTCYCK.Handle;
|
|||
|
end;
|
|||
|
// 511: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
// begin
|
|||
|
// if frmProductOrderNewList_CY=nil then
|
|||
|
// begin
|
|||
|
// frmProductOrderNewList_CY:= TfrmProductOrderNewList_CY.Create(application.MainForm);
|
|||
|
// with frmProductOrderNewList_CY do
|
|||
|
// begin
|
|||
|
// caption:=Trim(Title);
|
|||
|
// FormStyle := mstyle ;
|
|||
|
// windowState := mstate ;
|
|||
|
// BorderStyle := mborderstyle;
|
|||
|
// //show;
|
|||
|
// end;
|
|||
|
// end
|
|||
|
// else
|
|||
|
// frmProductOrderNewList_CY.BringToFront;
|
|||
|
// //<2F><><EFBFBD><EFBFBD>
|
|||
|
// mNewHandle:=frmProductOrderNewList_CY.Handle;
|
|||
|
// end ;
|
|||
|
521: //<2F><>Ʒɨ<C6B7><C9A8><EFBFBD><EFBFBD><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;
|
|||
|
|
|||
|
531: //<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;
|
|||
|
|
|||
|
541: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmCKProductCKHZList = nil then
|
|||
|
begin
|
|||
|
frmCKProductCKHZList := TfrmCKProductCKHZList.Create(application.MainForm);
|
|||
|
with frmCKProductCKHZList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductCKHZList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductCKHZList.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
611: //<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;
|
|||
|
|
|||
|
621: //<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;
|
|||
|
|
|||
|
631: //<2F><>Ʒ<EFBFBD>ֿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmCKProductBSCRCList = nil then
|
|||
|
begin
|
|||
|
frmCKProductBSCRCList := TfrmCKProductBSCRCList.Create(application.MainForm);
|
|||
|
with frmCKProductBSCRCList do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmCKProductBSCRCList.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmCKProductBSCRCList.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>', '-1');
|
|||
|
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;
|
|||
|
//initialization
|
|||
|
// OldDllApp := Application;
|
|||
|
//
|
|||
|
//finalization
|
|||
|
// DataLink_TradeManage.Free;
|
|||
|
// Application := OldDllApp;
|
|||
|
|
|||
|
end.
|
|||
|
|