601 lines
18 KiB
ObjectPascal
601 lines
18 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_iniParam, U_ProductOrderList, U_ProductOrderLBNameSet,
|
|||
|
U_MarkingInspection, U_JYOrderCDList, U_OrderProgress, U_JYOrderCDListGH,
|
|||
|
U_TableInspection;
|
|||
|
|
|||
|
/////////////////////////////////////////////////////////////////
|
|||
|
// <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
|
|||
|
frmProductOrderListLR, frmProductOrderListGL, frmProductOrderListCX: TfrmProductOrderList;
|
|||
|
frmProductOrderLBNameSetDQX, frmProductOrderLBNameSetGQX: TfrmProductOrderLBNameSet;
|
|||
|
frmJYOrderCDListCX, frmJYOrderCDListGL, frmJYOrderCDListCPGL, frmJYOrderCDListCPCX, frmJYOrderCDListSHGL, frmJYOrderCDListHHGL: TfrmJYOrderCDList;
|
|||
|
frmJYOrderCDListGH: TfrmJYOrderCDListGH; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><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
|
|||
|
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);
|
|||
|
|
|||
|
server := '139.224.59.117,7781';
|
|||
|
// server := '.';
|
|||
|
dtbase := 'guhangdata';
|
|||
|
user := 'guhangsa';
|
|||
|
pswd := 'rightsoft@8758';
|
|||
|
// pswd := 'rightsoft';
|
|||
|
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
|||
|
DConString := DataBaseStr;
|
|||
|
// DName:='XYB';
|
|||
|
// DParameters1 := '<27><>Ȩ<EFBFBD><C8A8>';
|
|||
|
if not ConnData() then
|
|||
|
begin
|
|||
|
result := 0;
|
|||
|
exit;
|
|||
|
end;
|
|||
|
|
|||
|
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
|
|||
|
|
|||
|
101: //<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><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><C6BB><EFBFBD>¼<EFBFBD><C2BC>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmProductOrderListLR.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmProductOrderListLR := TfrmProductOrderList.Create(application.MainForm);
|
|||
|
with frmProductOrderListLR do
|
|||
|
begin
|
|||
|
canshu1 := '¼<><C2BC>';
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD>¼<EFBFBD><C2BC>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmProductOrderListLR.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmProductOrderListLR.Handle;
|
|||
|
end;
|
|||
|
102: //<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><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><C6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmProductOrderListGL.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
//if frmBaoGuanListBGZL=nil then
|
|||
|
begin
|
|||
|
frmProductOrderListGL := TfrmProductOrderList.Create(application.MainForm);
|
|||
|
with frmProductOrderListGL do
|
|||
|
begin
|
|||
|
canshu1 := '<27><>Ȩ<EFBFBD><C8A8>';
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmProductOrderListGL.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmProductOrderListGL.Handle;
|
|||
|
end;
|
|||
|
103: //<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><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><C6BB><EFBFBD><EFBFBD><EFBFBD>ѯ' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmProductOrderListCX.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmProductOrderListCX := TfrmProductOrderList.Create(application.MainForm);
|
|||
|
with frmProductOrderListCX do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD><EFBFBD>ѯ';
|
|||
|
canshu1 := '<27><>ѯ';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmProductOrderListCX.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmProductOrderListCX.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
121: //<2F><>ǩƤ<C7A9><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><>ǩƤ<C7A9><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmProductOrderLBNameSetDQX.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmProductOrderLBNameSetDQX := TfrmProductOrderLBNameSet.Create(application.MainForm);
|
|||
|
with frmProductOrderLBNameSetDQX do
|
|||
|
begin
|
|||
|
Title := '<27><>ǩƤ<C7A9><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
canshu1 := '<27><>Ȩ<EFBFBD><C8A8>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmProductOrderLBNameSetDQX.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmProductOrderLBNameSetDQX.Handle;
|
|||
|
end;
|
|||
|
122: //<2F><>ǩƤ<C7A9><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>Ȩ<EFBFBD><C8A8>)
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><>ǩƤ<C7A9><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>Ȩ<EFBFBD><C8A8>)' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmProductOrderLBNameSetGQX.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmProductOrderLBNameSetGQX := TfrmProductOrderLBNameSet.Create(application.MainForm);
|
|||
|
with frmProductOrderLBNameSetGQX do
|
|||
|
begin
|
|||
|
Title := '<27><>ǩƤ<C7A9><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>Ȩ<EFBFBD><C8A8>)';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmProductOrderLBNameSetGQX.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmProductOrderLBNameSetGQX.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
311: //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmMarkingInspection = nil then
|
|||
|
begin
|
|||
|
frmMarkingInspection := TfrmMarkingInspection.Create(application.MainForm);
|
|||
|
with frmMarkingInspection do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmMarkingInspection.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmMarkingInspection.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
312: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
if frmTableInspection = nil then
|
|||
|
begin
|
|||
|
frmTableInspection := TfrmTableInspection.Create(application.MainForm);
|
|||
|
with frmTableInspection do
|
|||
|
begin
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmTableInspection.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmTableInspection.Handle;
|
|||
|
end;
|
|||
|
411: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><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><CFA2><EFBFBD><EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmJYOrderCDListGL.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmJYOrderCDListGL := TfrmJYOrderCDList.Create(application.MainForm);
|
|||
|
with frmJYOrderCDListGL do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>';
|
|||
|
canshu1 := '<27><><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmJYOrderCDListGL.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmJYOrderCDListGL.Handle;
|
|||
|
end;
|
|||
|
412: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѯ
|
|||
|
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><CFA2>ѯ' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmJYOrderCDListCX.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmJYOrderCDListCX := TfrmJYOrderCDList.Create(application.MainForm);
|
|||
|
with frmJYOrderCDListCX do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѯ';
|
|||
|
canshu1 := '<27><>ѯ';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmJYOrderCDListCX.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmJYOrderCDListCX.Handle;
|
|||
|
end;
|
|||
|
413: //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmJYOrderCDListCPGL.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmJYOrderCDListCPGL := TfrmJYOrderCDList.Create(application.MainForm);
|
|||
|
with frmJYOrderCDListCPGL do
|
|||
|
begin
|
|||
|
Title := '<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>';
|
|||
|
canshu1 := '<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmJYOrderCDListCPGL.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmJYOrderCDListCPGL.Handle;
|
|||
|
end;
|
|||
|
414: //<2F><><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>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmJYOrderCDListSHGL.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmJYOrderCDListSHGL := TfrmJYOrderCDList.Create(application.MainForm);
|
|||
|
with frmJYOrderCDListSHGL do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
canshu1 := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmJYOrderCDListSHGL.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmJYOrderCDListSHGL.Handle;
|
|||
|
end;
|
|||
|
416: //<2F><><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>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmJYOrderCDListHHGL.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmJYOrderCDListHHGL := TfrmJYOrderCDList.Create(application.MainForm);
|
|||
|
with frmJYOrderCDListHHGL do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
canshu1 := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmJYOrderCDListHHGL.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmJYOrderCDListHHGL.Handle;
|
|||
|
end;
|
|||
|
417: //<2F><>Ʒ<EFBFBD><C6B7>ѯ
|
|||
|
begin
|
|||
|
bFound := FALSE;
|
|||
|
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
|||
|
begin
|
|||
|
if App.MainForm.MDIChildren[i].Caption = '<27><>Ʒ<EFBFBD><C6B7>ѯ' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmJYOrderCDListCPCX.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmJYOrderCDListCPCX := TfrmJYOrderCDList.Create(application.MainForm);
|
|||
|
with frmJYOrderCDListCPCX do
|
|||
|
begin
|
|||
|
Title := '<27><>Ʒ<EFBFBD><C6B7>ѯ';
|
|||
|
canshu1 := '<27><>Ʒ<EFBFBD><C6B7>ѯ';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmJYOrderCDListCPCX.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmJYOrderCDListCPCX.Handle;
|
|||
|
end;
|
|||
|
421: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><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><CFA2><EFBFBD><EFBFBD>' then
|
|||
|
begin
|
|||
|
BringWindowToTop(frmJYOrderCDListGH.Handle);
|
|||
|
bFound := TRUE;
|
|||
|
Break;
|
|||
|
end;
|
|||
|
end;
|
|||
|
if not bFound then
|
|||
|
begin
|
|||
|
frmJYOrderCDListGH := TfrmJYOrderCDListGH.Create(application.MainForm);
|
|||
|
with frmJYOrderCDListGH do
|
|||
|
begin
|
|||
|
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>';
|
|||
|
canshu1 := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>';
|
|||
|
caption := Trim(Title);
|
|||
|
FormStyle := mstyle;
|
|||
|
windowState := mstate;
|
|||
|
BorderStyle := mborderstyle;
|
|||
|
//show;
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
frmJYOrderCDListGH.BringToFront;
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
mnewHandle := frmJYOrderCDListGH.Handle;
|
|||
|
end;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
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_DyeingFinishingPlan.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_DyeingFinishingPlan) then
|
|||
|
DataLink_DyeingFinishingPlan := TDataLink_DyeingFinishingPlan.Create(Application);
|
|||
|
try
|
|||
|
with DataLink_DyeingFinishingPlan.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_DyeingFinishingPlan.Free;
|
|||
|
// Application := OldDllApp;
|
|||
|
initialization
|
|||
|
CoInitialize(nil);
|
|||
|
dxUnitsLoader.Initialize;
|
|||
|
|
|||
|
|
|||
|
finalization
|
|||
|
DataLink_DyeingFinishingPlan.Free;
|
|||
|
application := NewDllApp;
|
|||
|
dxUnitsLoader.Finalize;
|
|||
|
|
|||
|
end.
|
|||
|
|