D7gmYongjin/坯布生产计划(WeavingSchedule)/U_GetDllForm.pas

790 lines
23 KiB
ObjectPascal
Raw Normal View History

2026-03-04 09:51:44 +08:00
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_ClothSCList, U_ClothSCYWYList, U_ClothSCListAnPaiJiTaiAP,
U_ClothSCDCGAnPai, U_ClothGMList, U_MJManageNewFDJJAP, U_JYOrderCDOne,
U_DcgGzList, U_ClothGongYiList, U_JYOrderHZList, U_ClothGYList,
U_ClothSCGYChkList;
/////////////////////////////////////////////////////////////////
// <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
frmClothSCListLR, frmClothSCListSH, frmClothSCListTJ: TfrmClothSCYWYList;
frmClothSCListYWY, frmClothSCListSC, frmClothSCListCX: TfrmClothSCList;
frmClothGongYiList, frmClothGongYiListDJXG, frmClothGongYiListDQX: TfrmClothGongYiList; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ձ<EFBFBD>
frmJYOrderCDOnePBGL, frmJYOrderCDOnePBCX: TfrmJYOrderCDOnePB;
frmClothSCListAnPaiJiTaiAPGL1, frmClothSCListAnPaiJiTaiAPGL2, frmClothSCListAnPaiJiTaiAPCX: TfrmClothSCListAnPaiJiTaiAP;
frmClothSCDCGAnPai1, frmClothSCDCGAnPai2: TfrmClothSCDCGAnPai;
frmClothGYListLR, frmClothGYListGL, frmClothGYListCX, frmClothGYListDY, frmClothGYListGJ: TfrmClothGYList;
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);
if trim(DConString) = '' then
begin
server := '139.196.189.214,7781';
//server := '.';
dtbase := 'yongjindata';
//dtbase := 'YIFuData';
user := 'YIFUsa';
// 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;
// DName := 'С֣<D0A1><D6A3><EFBFBD><EFBFBD>';
//DParameters1:='<27><>Ȩ<EFBFBD><C8A8>';
//DParameters3:='1';
//DCode:='628';
end
else
begin
DConString := DataBaseStr;
end;
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><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(frmClothGYListLR.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothGYListLR := TfrmClothGYList.Create(application.MainForm);
with frmClothGYListLR do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>¼<EFBFBD><C2BC>';
canshu1 := <><C2BC>';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothGYListLR.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothGYListLR.Handle;
end;
-102: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD><D5BF><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><D5BF><EFBFBD><EFBFBD><EFBFBD>' then
begin
BringWindowToTop(frmClothGYListGL.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothGYListGL := TfrmClothGYList.Create(application.MainForm);
with frmClothGYListGL do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>';
canshu1 := '<27><><EFBFBD><EFBFBD>';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothGYListGL.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothGYListGL.Handle;
end;
-103: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD><D5BF><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><D5BF><EFBFBD>ѯ' then
begin
BringWindowToTop(frmClothGYListCX.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothGYListCX := TfrmClothGYList.Create(application.MainForm);
with frmClothGYListCX do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD><D5BF><EFBFBD>ѯ';
canshu1 := '<27><>ѯ';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothGYListCX.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothGYListCX.Handle;
end;
-104: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD><D5BF><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><D5BF><EFBFBD>ӡ' then
begin
BringWindowToTop(frmClothGYListDY.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothGYListDY := TfrmClothGYList.Create(application.MainForm);
with frmClothGYListDY do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD><D5BF><EFBFBD>ӡ';
canshu1 := '<27><>ӡ';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothGYListDY.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothGYListDY.Handle;
end;
-105: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9>۶<EFBFBD><DBB6><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><D5B9>۶<EFBFBD><DBB6><EFBFBD>' then
begin
BringWindowToTop(frmClothGYListGJ.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothGYListGJ := TfrmClothGYList.Create(application.MainForm);
with frmClothGYListGJ do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9>۶<EFBFBD><DBB6><EFBFBD>';
canshu1 := '<27><><EFBFBD><EFBFBD>';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothGYListGJ.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothGYListGJ.Handle;
end;
101: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD>¼<EFBFBD><C2BC>' then
begin
BringWindowToTop(frmClothSCListLR.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothSCListLR := TfrmClothSCYWYList.Create(application.MainForm);
with frmClothSCListLR do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD>¼<EFBFBD><C2BC>';
canshu1 := <><C2BC>';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothSCListLR.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothSCListLR.Handle;
end;
102: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
BringWindowToTop(frmClothSCListSH.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothSCListSH := TfrmClothSCYWYList.Create(application.MainForm);
with frmClothSCListSH do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
canshu1 := '<27><><EFBFBD><EFBFBD>';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothSCListSH.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothSCListSH.Handle;
end;
103: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
BringWindowToTop(frmClothSCListTJ.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothSCListTJ := TfrmClothSCYWYList.Create(application.MainForm);
with frmClothSCListTJ do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
canshu1 := '<27><><EFBFBD><EFBFBD>';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothSCListTJ.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothSCListTJ.Handle;
end;
111: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD>
begin
if frmClothSCGYChkList = nil then
begin
frmClothSCGYChkList := TfrmClothSCGYChkList.Create(application.MainForm);
with frmClothSCGYChkList do
begin
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothSCGYChkList.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothSCGYChkList.Handle;
end;
{111: //<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(frmClothSCListSC.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothSCListSC := TfrmClothSCList.Create(application.MainForm);
with frmClothSCListSC do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD>';
canshu1 := <><C2BC>';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothSCListSC.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothSCListSC.Handle;
end;
113: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><><D2B5>Ա)
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><><D2B5>Ա)' then
begin
BringWindowToTop(frmClothSCListYWY.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothSCListYWY := TfrmClothSCList.Create(application.MainForm);
with frmClothSCListYWY do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><><D2B5>Ա)';
canshu1 := <><D2B5>Ա';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothSCListYWY.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothSCListYWY.Handle;
end; }
901: //<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(frmClothGongYiList.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothGongYiList := TfrmClothGongYiList.Create(application.MainForm);
with frmClothGongYiList do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>';
canshu1 := '<27><>Ȩ<EFBFBD><C8A8>';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothGongYiList.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothGongYiList.Handle;
end;
902: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տⵥ<D5BF><E2B5A5><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>տⵥ<D5BF><E2B5A5><EFBFBD>޸<EFBFBD>' then
begin
BringWindowToTop(frmClothGongYiListDJXG.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothGongYiListDJXG := TfrmClothGongYiList.Create(application.MainForm);
with frmClothGongYiListDJXG do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տⵥ<D5BF><E2B5A5><EFBFBD>޸<EFBFBD>';
canshu1 := '<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothGongYiListDJXG.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothGongYiListDJXG.Handle;
end;
903: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD><D5BF><EFBFBD>Ȩ<EFBFBD><C8A8>
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><D5BF><EFBFBD>Ȩ<EFBFBD><C8A8>' then
begin
BringWindowToTop(frmClothGongYiListDQX.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothGongYiListDQX := TfrmClothGongYiList.Create(application.MainForm);
with frmClothGongYiListDQX do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD><D5BF><EFBFBD>Ȩ<EFBFBD><C8A8>';
canshu1 := '<27><>Ȩ<EFBFBD><C8A8>';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothGongYiListDQX.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothGongYiListDQX.Handle;
end;
112: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD><EFBFBD>ѯ' then
begin
BringWindowToTop(frmClothSCListCX.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothSCListCX := TfrmClothSCList.Create(application.MainForm);
with frmClothSCListCX do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD><EFBFBD>ѯ';
canshu1 := '<27><>ѯ';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothSCListCX.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothSCListCX.Handle;
end;
301: //<2F><>Ʊ<EFBFBD><C6B1>ӡ
begin
bFound := FALSE;
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
begin
if App.MainForm.MDIChildren[i].Caption = '<27><>Ʊ<EFBFBD><C6B1>ӡ' then
begin
BringWindowToTop(frmClothSCDCGAnPai1.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmClothSCDCGAnPai1 := TfrmClothSCDCGAnPai.Create(application.MainForm);
with frmClothSCDCGAnPai1 do
begin
Title := '<27><>Ʊ<EFBFBD><C6B1>ӡ';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothSCDCGAnPai1.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothSCDCGAnPai1.Handle;
end;
401: //<2F>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>
begin
if frmClothGMList = nil then
begin
frmClothGMList := TfrmClothGMList.Create(application.MainForm);
with frmClothGMList do
begin
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmClothGMList.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmClothGMList.Handle;
end;
402: // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
begin
if frmMJManageNewFDJJAP = nil then
begin
frmMJManageNewFDJJAP := TfrmMJManageNewFDJJAP.Create(application.MainForm);
with frmMJManageNewFDJJAP do
begin
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmMJManageNewFDJJAP.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmMJManageNewFDJJAP.Handle;
end;
501: //<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(frmJYOrderCDOnePBGL.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
begin
frmJYOrderCDOnePBGL := TfrmJYOrderCDOnePB.Create(application.MainForm);
with frmJYOrderCDOnePBGL do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmJYOrderCDOnePBGL.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmJYOrderCDOnePBGL.Handle;
end;
502: //<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(frmJYOrderCDOnePBCX.Handle);
bFound := TRUE;
Break;
end;
end;
if not bFound then
//if frmBaoGuanListBGZL=nil then
begin
frmJYOrderCDOnePBCX := TfrmJYOrderCDOnePB.Create(application.MainForm);
with frmJYOrderCDOnePBCX do
begin
Title := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѯ';
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmJYOrderCDOnePBCX.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmJYOrderCDOnePBCX.Handle;
end;
504: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ܲ<EFBFBD>ѯ
begin
if frmJYOrderHZList = nil then
begin
frmJYOrderHZList := TfrmJYOrderHZList.Create(application.MainForm);
with frmJYOrderHZList do
begin
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmJYOrderHZList.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmJYOrderHZList.Handle;
end;
601: //<2F>β<EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD>
begin
if frmDcgGzList = nil then
begin
frmDcgGzList := TfrmDcgGzList.Create(application.MainForm);
with frmDcgGzList do
begin
caption := Trim(Title);
FormStyle := mstyle;
windowState := mstate;
BorderStyle := mborderstyle;
//show;
end;
end
else
frmDcgGzList.BringToFront;
//<2F><><EFBFBD><EFBFBD>
mnewHandle := frmDcgGzList.Handle;
end;
end;
Result := mnewHandle;
end;
//===========================================================
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>ӳ<EFBFBD>
//===========================================================
function ConnData(): Boolean;
begin
if not Assigned(DataLink_WeavingSchedule) then
DataLink_WeavingSchedule := TDataLink_WeavingSchedule.Create(Application);
try
with DataLink_WeavingSchedule.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_WeavingSchedule.Free;
application := NewDllApp;
dxUnitsLoader.Finalize;
end.