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; implementation uses U_DataLink, U_Fun, U_iniParam, U_MJManageNewFDNew, U_ProductOrderList, U_ProductOrderAnPai, U_BangAdd, U_MJEdit, U_JYOrderCDOne, U_JYOrderCDMore, U_CKProductBCPInList, 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_OrderJDList, U_ProductOrderAnPaiGQX, 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_CP_COL_XL_ZD, U_CKPDlist, U_ClothContractList_HZ, U_ProductOrderNewList_ZD, U_ClothContractList_SJDCK, U_KH_XS_YP_list, U_ProductOrderNewList_BH, U_ClothContractList_HZ1, U_ClothContractList_CP, U_ClothContractList_SJD, U_ClothContractList_Dp, U_ClothContractList_SJDMX, U_ClothContractList_PBKC; ///////////////////////////////////////////////////////////////// // 功能说明:取Dll中得窗体 // // 参数说明:App>>调用应用程序; // // FormH>>调用窗口句柄 ; // // FormID>>窗口号; // // Language>>语言种类; // // WinStyle>>窗口类型; // ///////////////////////////////////////////////////////////////// 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 mnewHandle: hwnd; mstyle: TFormStyle; // 0:子窗口; 1:普通窗口 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; //赋值链接字符串 SetLength(server, 255); SetLength(dtbase, 255); SetLength(user, 255); SetLength(pswd, 255); server := '101.132.143.144,7781'; // server:='.'; dtbase := 'hengmingdata'; user := 'rtsa'; pswd := 'rightsoft@5740'; DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server; if trim(DataBaseStr) <> '' then DConString := DataBaseStr; // DParameters1:='桂华纺织'; // DParameters1:='高权限'; // DataBase:='高权限'; // DParameters2:='管理'; //DCode:='test'; //DName:='ADMIN'; // fDParameters2 // DParameters1:='查询'; // database:=''; if not ConnData() then begin result := 0; exit; end; if IsINIFile() then ReadINIFile() else WriteINIFile; // 定义窗口类型 、状态 if WinStyle = 0 then begin mstyle := fsMDIChild; mstate := wsMaximized; mborderstyle := bsSizeable; end else begin mstyle := fsNormal; mstate := wsNormal; mborderstyle := bsSizeable; end; ///////////////////// //调用子模块窗口 case FormID of 0: //生产指示单 begin if frmProductOrderNewList <> nil then frmProductOrderNewList.Free; if frmProductOrderNewList = nil then begin frmProductOrderNewList := TfrmProductOrderNewList.Create(application.MainForm); with frmProductOrderNewList do begin fsyrName := trim(DataBase); fDParameters1 := trim(DParameters1); forderType := trim(DParameters2); { fsyrName:='桂华纺织'; fDParameters1:=''; forderType:='正常单'; } caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmProductOrderNewList.BringToFront; //句柄 mnewHandle := frmProductOrderNewList.Handle; end; -2: //生产指示单 begin if frmProductOrderNewList = nil then begin frmProductOrderNewList := TfrmProductOrderNewList.Create(application.MainForm); with frmProductOrderNewList do begin fDParameters1 := trim(DParameters1); fCustomerNoName := '广东门市部'; CustomerNoName.Text := '广东门市部'; CustomerNoName.Enabled := false; tchk.Visible := false; TBPrint.Visible := false; TBPrint1.Visible := false; TBPrint2.Visible := false; caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmProductOrderNewList.BringToFront; //句柄 mnewHandle := frmProductOrderNewList.Handle; end; -1: //生产指示单 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; //句柄 mnewHandle := frmProductOrderNewList_JD.Handle; end; -3: //生产指示单 begin // if frmProductOrderNewList<>nil then frmProductOrderNewList.Free; if frmProductOrderNewList_ZD = nil then begin frmProductOrderNewList_ZD := TfrmProductOrderNewList_ZD.Create(application.MainForm); with frmProductOrderNewList_ZD do begin fsyrName := trim(DataBase); fDParameters1 := trim(DParameters1); forderType := trim(DParameters2); caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmProductOrderNewList_ZD.BringToFront; //句柄 mnewHandle := frmProductOrderNewList_ZD.Handle; end; -11: //生产指示单 begin if frmProductOrderNewList_BH <> nil then frmProductOrderNewList_BH.Free; if frmProductOrderNewList_BH = nil then begin frmProductOrderNewList_BH := TfrmProductOrderNewList_BH.Create(application.MainForm); with frmProductOrderNewList_BH do begin fsyrName := trim(DataBase); fDParameters1 := trim(DParameters1); forderType := trim(DParameters2); fsyrName := '桂华纺织'; // fDParameters1:='管理'; forderType := '报货单'; caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmProductOrderNewList_BH.BringToFront; //句柄 mnewHandle := frmProductOrderNewList_BH.Handle; end; 1: //回仓管理 begin if frmProductOrderAnPai = nil then begin frmProductOrderAnPai := TfrmProductOrderAnPai.Create(application.MainForm); with frmProductOrderAnPai do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmProductOrderAnPai.BringToFront; //句柄 mnewHandle := frmProductOrderAnPai.Handle; end; { 101: //回仓管理 (高权限) begin if frmProductOrderAnPaiGQX=nil then begin frmProductOrderAnPaiGQX:= TfrmProductOrderAnPaiGQX.Create(application.MainForm); with frmProductOrderAnPaiGQX do begin caption:=Trim(Title); FormStyle := mstyle ; windowState := mstate ; BorderStyle := mborderstyle; //show; end; end else frmProductOrderAnPaiGQX.BringToFront; //句柄 mNewHandle:=frmProductOrderAnPaiGQX.Handle; end ; } 102: //回仓查询 begin if frmClothHCList = nil then begin frmClothHCList := TfrmClothHCList.Create(application.MainForm); with frmClothHCList do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothHCList.BringToFront; //句柄 mnewHandle := frmClothHCList.Handle; end; 2: // 成品检验 begin if frmMJManageNewFDNew = nil then begin frmMJManageNewFDNew := TfrmMJManageNewFDNew.Create(application.MainForm); with frmMJManageNewFDNew do begin if trim(DataBase) = '高权限' then begin iscom := false; C_CodeName.Enabled := TRUE; c_cOLOR.Enabled := TRUE; BCGangNo.Enabled := TRUE; end else iscom := true; canshu := DataBase; caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmMJManageNewFDNew.BringToFront; //句柄 mnewHandle := frmMJManageNewFDNew.Handle; end; 4: //布匹管理 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; //句柄 mnewHandle := frmMJEdit.Handle; end; { 5: //成品出库 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; //句柄 mNewHandle:=frmCpCkSaoMNewSel.Handle; end ; } 6: //成品入库列表 ,期初入库 begin if frmCKProductBCPInList = nil then begin frmCKProductBCPInList := TfrmCKProductBCPInList.Create(application.MainForm); with frmCKProductBCPInList do begin fDParameters2 := trim(DParameters2); caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCKProductBCPInList.BringToFront; //句柄 mnewHandle := frmCKProductBCPInList.Handle; end; 7: //成品出库列表 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; //句柄 mnewHandle := frmCKProductBCPOutList.Handle; end; { 8: //成品回仓 begin if frmBanCpHCSaoM=nil then begin frmBanCpHCSaoM:= TfrmBanCpHCSaoM.Create(application.MainForm); with frmBanCpHCSaoM do begin caption:=Trim(Title); FormStyle := mstyle ; windowState := mstate ; BorderStyle := mborderstyle; //show; end; end else frmBanCpHCSaoM.BringToFront; //句柄 mNewHandle:=frmBanCpHCSaoM.Handle; end ; } 9: //成品列表 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; //句柄 mnewHandle := frmCKProductBCPHCList.Handle; end; 10: //库存列表 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; //句柄 mnewHandle := frmCKProductBCPKCList.Handle; end; 11: //库存汇总列表 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; //句柄 mnewHandle := frmCKProductBCPKCHZList.Handle; end; 111: //库存汇总列表 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; //句柄 mnewHandle := frmCP_CRC.Handle; end; 112: //库存汇总列表 begin if frmCKPHKCList = nil then begin frmCKPHKCList := TfrmCKPHKCList.Create(application.MainForm); with frmCKPHKCList do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCKPHKCList.BringToFront; //句柄 mnewHandle := frmCKPHKCList.Handle; end; 113: //库存汇总列表 begin if frmCKProductCPKCHZList_Yj = nil then begin frmCKProductCPKCHZList_Yj := TfrmCKProductCPKCHZList_Yj.Create(application.MainForm); with frmCKProductCPKCHZList_Yj do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCKProductCPKCHZList_Yj.BringToFront; //句柄 mnewHandle := frmCKProductCPKCHZList_Yj.Handle; end; 12: //检验报告 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; //句柄 mnewHandle := frmJYOrderCDOne.Handle; end; 13: //检验分析 begin if frmJYOrderCDMore = nil then begin frmJYOrderCDMore := TfrmJYOrderCDMore.Create(application.MainForm); with frmJYOrderCDMore do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmJYOrderCDMore.BringToFront; //句柄 mnewHandle := frmJYOrderCDMore.Handle; end; 14: //入库扫描 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; //句柄 mnewHandle := frmCpRkSaoMNew.Handle; end; 15: //坯布采购 到货 投匹 begin if frmClothContractList = nil then begin frmClothContractList := TfrmClothContractList.Create(application.MainForm); with frmClothContractList do begin caption := Trim(Title); fDParameters1 := trim(DParameters1); // fDParameters1:=trim('查询'); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList.BringToFront; //句柄 mnewHandle := frmClothContractList.Handle; end; 151: //坯布采购 到货 投匹 begin if frmClothContractList_CG = nil then begin frmClothContractList_CG := TfrmClothContractList_CG.Create(application.MainForm); with frmClothContractList_CG do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_CG.BringToFront; //句柄 mnewHandle := frmClothContractList_CG.Handle; end; 152: //坯布采购 回修 坯布点色计划 begin if frmClothContractList_Tp = nil then begin frmClothContractList_Tp := TfrmClothContractList_Tp.Create(application.MainForm); with frmClothContractList_Tp do begin caption := Trim(Title); fDParameters1 := trim(DParameters1); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_Tp.BringToFront; //句柄 mnewHandle := frmClothContractList_Tp.Handle; end; 153: //坯布外加工 begin if frmClothContractList_JG = nil then begin frmClothContractList_JG := TfrmClothContractList_JG.Create(application.MainForm); with frmClothContractList_JG do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_JG.BringToFront; //句柄 mnewHandle := frmClothContractList_JG.Handle; end; 125: //坯布调拨管理 begin if frmClothContractList_Dp = nil then begin frmClothContractList_Dp := TfrmClothContractList_Dp.Create(application.MainForm); with frmClothContractList_Dp do begin caption := Trim(Title); fDParameters1 := trim(DParameters1); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_Dp.BringToFront; //句柄 mnewHandle := frmClothContractList_Dp.Handle; end; 154: //坯布库存查询 begin if frmClothContractList_Help = nil then begin frmClothContractList_Help := TfrmClothContractList_Help.Create(application.MainForm); with frmClothContractList_Help do begin caption := Trim(Title); v1Ssel.Visible := false; ToolButton1.Visible := false; FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_Help.BringToFront; //句柄 mnewHandle := frmClothContractList_Help.Handle; end; 155: //坯布采购 到货 投匹 begin if frmClothContractList_HZ = nil then begin frmClothContractList_HZ := TfrmClothContractList_HZ.Create(application.MainForm); with frmClothContractList_HZ do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_HZ.BringToFront; //句柄 mnewHandle := frmClothContractList_HZ.Handle; end; 255: //坯布采购 到货 投匹 begin if frmClothContractList_SJD = nil then begin frmClothContractList_SJD := TfrmClothContractList_SJD.Create(application.MainForm); with frmClothContractList_SJD do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_SJD.BringToFront; //句柄 mnewHandle := frmClothContractList_SJD.Handle; end; 245: //坯布库存查询 begin if frmClothContractList_PBKC = nil then begin frmClothContractList_PBKC := TfrmClothContractList_PBKC.Create(application.MainForm); with frmClothContractList_PBKC do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_PBKC.BringToFront; //句柄 mnewHandle := frmClothContractList_PBKC.Handle; end; 254: //坯布采购 到货 投匹 begin if frmClothContractList_SJDMX = nil then begin frmClothContractList_SJDMX := TfrmClothContractList_SJDMX.Create(application.MainForm); with frmClothContractList_SJDMX do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_SJDMX.BringToFront; //句柄 mnewHandle := frmClothContractList_SJDMX.Handle; end; 253: //坯布采购 到货 投匹 begin if frmClothContractList_SJDCK = nil then begin frmClothContractList_SJDCK := TfrmClothContractList_SJDCK.Create(application.MainForm); with frmClothContractList_SJDCK do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_SJDCK.BringToFront; //句柄 mnewHandle := frmClothContractList_SJDCK.Handle; end; 515: //成品发货查询 begin if frmClothContractList_CP = nil then begin frmClothContractList_CP := TfrmClothContractList_CP.Create(application.MainForm); with frmClothContractList_CP do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_CP.BringToFront; //句柄 mnewHandle := frmClothContractList_CP.Handle; end; 156: //坯布采购 到货 投匹 begin if frmClothContractList_HZ1 = nil then begin frmClothContractList_HZ1 := TfrmClothContractList_HZ1.Create(application.MainForm); with frmClothContractList_HZ1 do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractList_HZ1.BringToFront; //句柄 mnewHandle := frmClothContractList_HZ1.Handle; end; 16: //坯布 到货 begin if frmClothContractListDH = nil then begin frmClothContractListDH := TfrmClothContractListDH.Create(application.MainForm); with frmClothContractListDH do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractListDH.BringToFront; //句柄 mnewHandle := frmClothContractListDH.Handle; end; 17: //坯布领料 begin if frmClothContractListLL = nil then begin frmClothContractListLL := TfrmClothContractListLL.Create(application.MainForm); with frmClothContractListLL do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractListLL.BringToFront; //句柄 mnewHandle := frmClothContractListLL.Handle; end; 18: //坯布库存汇总查询 begin if frmClothContractKCList = nil then begin frmClothContractKCList := TfrmClothContractKCList.Create(application.MainForm); with frmClothContractKCList do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractKCList.BringToFront; //句柄 mnewHandle := frmClothContractKCList.Handle; end; 19: //订单合同 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; //句柄 mnewHandle := frmContractList.Handle; end; 20: //外加工 begin if frmClothContractListWJG = nil then begin frmClothContractListWJG := TfrmClothContractListWJG.Create(application.MainForm); with frmClothContractListWJG do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothContractListWJG.BringToFront; //句柄 mnewHandle := frmClothContractListWJG.Handle; end; 21: //坯布排单信息表 begin if frmClothPDInfoList = nil then begin frmClothPDInfoList := TfrmClothPDInfoList.Create(application.MainForm); with frmClothPDInfoList do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmClothPDInfoList.BringToFront; //句柄 mnewHandle := frmClothPDInfoList.Handle; end; 22: //订单进度查询 begin if frmOrderJDList = nil then begin frmOrderJDList := TfrmOrderJDList.Create(application.MainForm); with frmOrderJDList do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmOrderJDList.BringToFront; //句柄 mnewHandle := frmOrderJDList.Handle; end; 23: // 成品发货 begin if frmProductOrder_Ph = nil then begin frmProductOrder_Ph := TfrmProductOrder_Ph.Create(application.MainForm); with frmProductOrder_Ph do begin fDParameters1 := trim(DParameters1); caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmProductOrder_Ph.BringToFront; //句柄 mnewHandle := frmProductOrder_Ph.Handle; end; 231: // 成品发货 begin if frmCKSMEdit = nil then begin frmCKSMEdit := TfrmCKSMEdit.Create(application.MainForm); with frmCKSMEdit do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCKSMEdit.BringToFront; //句柄 mnewHandle := frmCKSMEdit.Handle; end; 24: // 回仓查询 begin if frmHCList = nil then begin frmHCList := TfrmHCList.Create(application.MainForm); with frmHCList do begin // fDParameters1:=trim(DParameters1); caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmHCList.BringToFront; //句柄 mnewHandle := frmHCList.Handle; end; 25: // 成品发货 begin if frmProductOrder_Ph10 = nil then begin frmProductOrder_Ph10 := TfrmProductOrder_Ph10.Create(application.MainForm); with frmProductOrder_Ph10 do begin fDParameters1 := trim(DParameters1); caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmProductOrder_Ph10.BringToFront; //句柄 mnewHandle := frmProductOrder_Ph10.Handle; end; 26: // 回仓查询 begin if frmCrkAccount = nil then begin frmCrkAccount := TfrmCrkAccount.Create(application.MainForm); with frmCrkAccount do begin // fDParameters1:=trim(DParameters1); caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCrkAccount.BringToFront; //句柄 mnewHandle := frmCrkAccount.Handle; end; 27: // 入库——其他 begin if frmCKProductBCPInList_other = nil then begin frmCKProductBCPInList_other := TfrmCKProductBCPInList_other.Create(application.MainForm); with frmCKProductBCPInList_other do begin // fDParameters2:='查询'; fDParameters2 := trim(DParameters2); caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCKProductBCPInList_other.BringToFront; //句柄 mnewHandle := frmCKProductBCPInList_other.Handle; end; 28: // 出库——其他 begin if frmCKProductBCPOutList_other = nil then begin frmCKProductBCPOutList_other := TfrmCKProductBCPOutList_other.Create(application.MainForm); with frmCKProductBCPOutList_other do begin // fDParameters2:=trim(DParameters2); caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCKProductBCPOutList_other.BringToFront; //句柄 mnewHandle := frmCKProductBCPOutList_other.Handle; end; 29: // 出库——其他 begin if frmProductOrder_Ph_other = nil then begin frmProductOrder_Ph_other := TfrmProductOrder_Ph_other.Create(application.MainForm); with frmProductOrder_Ph_other do begin // fDParameters2:=trim(DParameters2); caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmProductOrder_Ph_other.BringToFront; //句柄 mnewHandle := frmProductOrder_Ph_other.Handle; end; 30: //库存列表 begin if frmCKProductBCPKCList_other = nil then begin frmCKProductBCPKCList_other := TfrmCKProductBCPKCList_other.Create(application.MainForm); with frmCKProductBCPKCList_other do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCKProductBCPKCList_other.BringToFront; //句柄 mnewHandle := frmCKProductBCPKCList_other.Handle; end; 31: //库存汇总列表 begin if frmCKProductBCPKCHZList_other = nil then begin frmCKProductBCPKCHZList_other := TfrmCKProductBCPKCHZList_other.Create(application.MainForm); with frmCKProductBCPKCHZList_other do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCKProductBCPKCHZList_other.BringToFront; //句柄 mnewHandle := frmCKProductBCPKCHZList_other.Handle; end; 32: //库存汇总列表 begin if frmCrkAccount_other = nil then begin frmCrkAccount_other := TfrmCrkAccount_other.Create(application.MainForm); with frmCrkAccount_other do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCrkAccount_other.BringToFront; //句柄 mnewHandle := frmCrkAccount_other.Handle; end; 33: //检验报告 begin if frmJYOrderCDOne_other = nil then begin frmJYOrderCDOne_other := TfrmJYOrderCDOne_other.Create(application.MainForm); with frmJYOrderCDOne_other do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmJYOrderCDOne_other.BringToFront; //句柄 mnewHandle := frmJYOrderCDOne_other.Handle; end; 34: //检验报告 begin if frmXsList_other = nil then begin frmXsList_other := TfrmXsList_other.Create(application.MainForm); with frmXsList_other do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmXsList_other.BringToFront; //句柄 mnewHandle := frmXsList_other.Handle; end; 35: //收货统计 begin if frmYHList_other = nil then begin frmYHList_other := TfrmYHList_other.Create(application.MainForm); with frmYHList_other do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmYHList_other.BringToFront; //句柄 mnewHandle := frmYHList_other.Handle; end; 36: //收货统计 begin if frmCKProductBCPKCHZListSUM_other = nil then begin frmCKProductBCPKCHZListSUM_other := TfrmCKProductBCPKCHZListSUM_other.Create(application.MainForm); with frmCKProductBCPKCHZListSUM_other do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCKProductBCPKCHZListSUM_other.BringToFront; //句柄 mnewHandle := frmCKProductBCPKCHZListSUM_other.Handle; end; 37: //柯桥出库对比 begin if frmCKEJK = nil then begin frmCKEJK := TfrmCKEJK.Create(application.MainForm); with frmCKEJK do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCKEJK.BringToFront; //句柄 mnewHandle := frmCKEJK.Handle; end; 38: //客户销量信息 begin if frmKH_XS_list = nil then begin frmKH_XS_list := TfrmKH_XS_list.Create(application.MainForm); with frmKH_XS_list do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmKH_XS_list.BringToFront; //句柄 mnewHandle := frmKH_XS_list.Handle; end; 39: //产品销量信息 begin if frmCP_XL <> nil then frmCP_XL.Free; if frmCP_XL = nil then begin frmCP_XL := TfrmCP_XL.Create(application.MainForm); with frmCP_XL do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCP_XL.BringToFront; //句柄 mnewHandle := frmCP_XL.Handle; end; 40: //产品销量信息 begin if frmCP_COL_XL <> nil then frmCP_COL_XL.Free; if frmCP_COL_XL = nil then begin frmCP_COL_XL := TfrmCP_COL_XL.Create(application.MainForm); with frmCP_COL_XL do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCP_COL_XL.BringToFront; //句柄 mnewHandle := frmCP_COL_XL.Handle; end; 41: //产品销量信息 begin if frmCP_COL_XL_ZD <> nil then frmCP_COL_XL_ZD.Free; if frmCP_COL_XL_ZD = nil then begin frmCP_COL_XL_ZD := TfrmCP_COL_XL_ZD.Create(application.MainForm); with frmCP_COL_XL_ZD do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCP_COL_XL_ZD.BringToFront; //句柄 mnewHandle := frmCP_COL_XL_ZD.Handle; end; 42: //产品销量信息 begin if frmKH_XS_YP_list <> nil then frmKH_XS_YP_list.Free; if frmKH_XS_YP_list = nil then begin frmKH_XS_YP_list := TfrmKH_XS_YP_list.Create(application.MainForm); with frmKH_XS_YP_list do begin caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmKH_XS_YP_list.BringToFront; //句柄 mnewHandle := frmKH_XS_YP_list.Handle; end; 61: //提示 begin if frmModulePromptList <> nil then frmModulePromptList.Free; 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; //句柄 mnewHandle := frmModulePromptList.Handle; end; 97: // 成品检验 begin if frmKCRLLTZ = nil then begin frmKCRLLTZ := TfrmKCRLLTZ.Create(application.MainForm); with frmKCRLLTZ do begin if trim(DataBase) = '高权限' then begin iscom := false; end else iscom := true; caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmKCRLLTZ.BringToFront; //句柄 mnewHandle := frmKCRLLTZ.Handle; end; 98: // 成品检验 begin if frmMJManageNewFDNew_other = nil then begin frmMJManageNewFDNew_other := TfrmMJManageNewFDNew_other.Create(application.MainForm); with frmMJManageNewFDNew_other do begin if trim(DataBase) = '高权限' then begin iscom := false; C_CodeName.Enabled := TRUE; c_cOLOR.Enabled := TRUE; BCGangNo.Enabled := TRUE; end else iscom := true; caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmMJManageNewFDNew_other.BringToFront; //句柄 mnewHandle := frmMJManageNewFDNew_other.Handle; end; 99: // 成品检验 begin if frmKCRLLTZ_other = nil then begin frmKCRLLTZ_other := TfrmKCRLLTZ_other.Create(application.MainForm); with frmKCRLLTZ_other do begin if trim(DataBase) = '高权限' then begin iscom := false; end else iscom := true; caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmKCRLLTZ_other.BringToFront; //句柄 mnewHandle := frmKCRLLTZ_other.Handle; end; 100: // 客户盘点 begin if frmCKPDlist <> nil then frmCKPDlist.Free; if frmCKPDlist = nil then begin frmCKPDlist := TfrmCKPDlist.Create(application.MainForm); with frmCKPDlist do begin fckName := trim(DParameters3); // fckName:='现货'; caption := Trim(Title); FormStyle := mstyle; windowState := mstate; BorderStyle := mborderstyle; //show; end; end else frmCKPDlist.BringToFront; //句柄 mnewHandle := frmCKPDlist.Handle; end; end; // end case Result := mnewHandle; // NewDllApp:=Application ; end; //=========================================================== //建立数据库连接池 //=========================================================== 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('数据库连接失败!', '错误', mb_Ok + MB_ICONERROR); end; end; initialization CoInitialize(nil); dxUnitsLoader.Initialize; finalization DataLink_TradeManage.Free; application := NewDllApp; dxUnitsLoader.Finalize; end.