From 452c7e614040b4185fdcd6339defbde2266199f0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-E401PHE\\Administrator" Date: Thu, 25 Sep 2025 15:36:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=93=81=E6=96=B0=E4=BA=91=E7=BF=94?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 样品新云翔(YPGLBOM.dll)/File.INI | 5 + 样品新云翔(YPGLBOM.dll)/JWLCK.res | Bin 876 -> 0 bytes 样品新云翔(YPGLBOM.dll)/OrderManage.res | Bin 876 -> 0 bytes 样品新云翔(YPGLBOM.dll)/U_BPZdy_LRPB.dfm | 372 ++++----- 样品新云翔(YPGLBOM.dll)/U_BPZdy_LRPB.pas | 984 ++++++++++++----------- 样品新云翔(YPGLBOM.dll)/U_CPAdd.pas | 12 + 样品新云翔(YPGLBOM.dll)/U_CPAdd_ZLR.pas | 12 + 样品新云翔(YPGLBOM.dll)/U_GetDllForm.pas | 23 +- 样品新云翔(YPGLBOM.dll)/U_iniParam.pas | 64 ++ 样品新云翔(YPGLBOM.dll)/YPGL.res | Bin 876 -> 0 bytes 样品新云翔(YPGLBOM.dll)/YPGLBOM.dpr | 9 - 样品新云翔(YPGLBOM.dll)/YPGLBOM.res | Bin 876 -> 876 bytes 样品新云翔(YPGLBOM.dll)/testDll.res | Bin 876 -> 0 bytes 13 files changed, 822 insertions(+), 659 deletions(-) create mode 100644 样品新云翔(YPGLBOM.dll)/File.INI delete mode 100644 样品新云翔(YPGLBOM.dll)/JWLCK.res delete mode 100644 样品新云翔(YPGLBOM.dll)/OrderManage.res create mode 100644 样品新云翔(YPGLBOM.dll)/U_iniParam.pas delete mode 100644 样品新云翔(YPGLBOM.dll)/YPGL.res delete mode 100644 样品新云翔(YPGLBOM.dll)/testDll.res diff --git a/样品新云翔(YPGLBOM.dll)/File.INI b/样品新云翔(YPGLBOM.dll)/File.INI new file mode 100644 index 0000000..42414b1 --- /dev/null +++ b/样品新云翔(YPGLBOM.dll)/File.INI @@ -0,0 +1,5 @@ +[] +̨־= +̨= +˿ں= +˿Dllļ= diff --git a/样品新云翔(YPGLBOM.dll)/JWLCK.res b/样品新云翔(YPGLBOM.dll)/JWLCK.res deleted file mode 100644 index 2d6f24c3d9a870364649288b1c0306b551768325..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 876 zcmaJ=Jx{|h5Pc?9%tTwkz(g}L7BMg|6oiDt01W(ruz1OWgw!H+AXAn~{FzE^Brlox z9gK_}J0Q&SIVr99IQ9AN-MzD~Rtx|M;amX24SU~e>Jc?cYMoANyAd5SNQg5+p~aQP zp5HA8_(Prt$CV+GqpB(v{1D!`;JAjld@@+K+i61a|MTdsd{~!%b1ms_KJEh}cpe(` z6jA?@e29>sU}iiwp;b>~TL@2U!O)h%Yr)7`8+a;b=@mD^tI-VbODr7!U{0?gh%d@~e3Ro)^HNMvvU1UHt)HYrq~&L`&fQ16Y1SeYiaObZ>3v kZ4W@7aBc_JIL8%khzs1(H@5yR{A*B1l9s#*|B4j80N@tIJOBUy diff --git a/样品新云翔(YPGLBOM.dll)/OrderManage.res b/样品新云翔(YPGLBOM.dll)/OrderManage.res deleted file mode 100644 index 2d6f24c3d9a870364649288b1c0306b551768325..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 876 zcmaJ=Jx{|h5Pc?9%tTwkz(g}L7BMg|6oiDt01W(ruz1OWgw!H+AXAn~{FzE^Brlox z9gK_}J0Q&SIVr99IQ9AN-MzD~Rtx|M;amX24SU~e>Jc?cYMoANyAd5SNQg5+p~aQP zp5HA8_(Prt$CV+GqpB(v{1D!`;JAjld@@+K+i61a|MTdsd{~!%b1ms_KJEh}cpe(` z6jA?@e29>sU}iiwp;b>~TL@2U!O)h%Yr)7`8+a;b=@mD^tI-VbODr7!U{0?gh%d@~e3Ro)^HNMvvU1UHt)HYrq~&L`&fQ16Y1SeYiaObZ>3v kZ4W@7aBc_JIL8%khzs1(H@5yR{A*B1l9s#*|B4j80N@tIJOBUy diff --git a/样品新云翔(YPGLBOM.dll)/U_BPZdy_LRPB.dfm b/样品新云翔(YPGLBOM.dll)/U_BPZdy_LRPB.dfm index 742dc7c..c20f2ed 100644 --- a/样品新云翔(YPGLBOM.dll)/U_BPZdy_LRPB.dfm +++ b/样品新云翔(YPGLBOM.dll)/U_BPZdy_LRPB.dfm @@ -1,13 +1,13 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB - Left = 194 - Top = 128 - Width = 1386 + Left = 367 + Top = 326 + Width = 1457 Height = 758 Caption = #39033#30446#32500#25252 Color = clBtnFace Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [] OldCreateOrder = False @@ -17,12 +17,12 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB OnCreate = FormCreate OnDestroy = FormDestroy OnShow = FormShow - PixelsPerInch = 107 - TextHeight = 13 + PixelsPerInch = 96 + TextHeight = 12 object ToolBar1: TToolBar Left = 0 Top = 0 - Width = 1370 + Width = 1449 Height = 31 ButtonHeight = 30 ButtonWidth = 59 @@ -41,7 +41,7 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB object Panel1: TPanel Left = 0 Top = 0 - Width = 817 + Width = 1009 Height = 30 Align = alTop BevelInner = bvRaised @@ -93,7 +93,7 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB end end object TBClose: TToolButton - Left = 817 + Left = 1009 Top = 0 AutoSize = True Caption = #20851#38381 @@ -102,23 +102,23 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB end end object Panel2: TPanel - Left = 919 + Left = 768 Top = 31 - Width = 451 - Height = 687 - Align = alClient + Width = 681 + Height = 696 + Align = alRight BevelInner = bvRaised BevelOuter = bvLowered TabOrder = 1 object cxGrid2: TcxGrid Left = 2 - Top = 42 - Width = 447 - Height = 643 + Top = 39 + Width = 677 + Height = 655 Align = alClient TabOrder = 0 object TV2: TcxGridDBTableView - NavigatorButtons.ConfirmDelete = False + Navigator.Buttons.CustomButtons = <> DataController.DataSource = DataSource3 DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] DataController.Summary.DefaultGroupSummaryItems = <> @@ -236,74 +236,74 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB object Panel3: TPanel Left = 2 Top = 2 - Width = 447 - Height = 40 + Width = 677 + Height = 37 Align = alTop BevelInner = bvRaised BevelOuter = bvLowered TabOrder = 1 object Label3: TLabel - Left = 37 - Top = 14 - Width = 56 - Height = 13 + Left = 34 + Top = 13 + Width = 52 + Height = 12 Caption = #25195#25551#20837#21475 Font.Charset = GB2312_CHARSET Font.Color = clRed - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label4: TLabel - Left = 230 - Top = 14 - Width = 84 - Height = 13 + Left = 195 + Top = 13 + Width = 78 + Height = 12 Caption = #20844#21496#20135#21697#21517#31216 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label5: TLabel - Left = 455 - Top = 14 - Width = 56 - Height = 13 + Left = 420 + Top = 13 + Width = 52 + Height = 12 Caption = #20135#21697#32534#21495 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object CYID: TEdit - Left = 95 - Top = 10 - Width = 107 - Height = 21 + Left = 88 + Top = 9 + Width = 98 + Height = 20 TabOrder = 0 OnKeyPress = CYIDKeyPress end object CYName: TEdit Tag = 2 - Left = 315 - Top = 10 - Width = 117 - Height = 21 + Left = 274 + Top = 9 + Width = 108 + Height = 20 TabOrder = 1 OnKeyPress = CYNameKeyPress end object CYNo: TEdit Tag = 2 - Left = 514 - Top = 10 - Width = 110 - Height = 21 + Left = 474 + Top = 9 + Width = 102 + Height = 20 TabOrder = 2 OnKeyPress = CYNoKeyPress end @@ -312,216 +312,216 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB object Panel4: TPanel Left = 0 Top = 31 - Width = 911 - Height = 687 - Align = alLeft + Width = 760 + Height = 696 + Align = alClient BevelInner = bvRaised BevelOuter = bvLowered TabOrder = 2 object Panel5: TPanel Left = 2 - Top = 529 - Width = 907 - Height = 156 + Top = 550 + Width = 756 + Height = 144 Align = alBottom BevelInner = bvRaised BevelOuter = bvLowered TabOrder = 0 Visible = False object Label6: TLabel - Left = 262 - Top = 20 - Width = 52 - Height = 13 + Left = 242 + Top = 18 + Width = 47 + Height = 12 Caption = #21697' '#21517' ' Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label7: TLabel - Left = 161 - Top = 20 - Width = 28 - Height = 13 + Left = 149 + Top = 18 + Width = 26 + Height = 12 Caption = #20195#30721 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label8: TLabel - Left = 161 - Top = 51 - Width = 28 - Height = 13 + Left = 149 + Top = 47 + Width = 26 + Height = 12 Caption = #20811#37325 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label9: TLabel - Left = 460 - Top = 51 - Width = 28 - Height = 13 + Left = 425 + Top = 47 + Width = 26 + Height = 12 Caption = #38376#24133 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label10: TLabel - Left = 578 - Top = 20 - Width = 56 - Height = 13 + Left = 589 + Top = 18 + Width = 52 + Height = 12 Caption = #22383#24067#23494#24230 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label11: TLabel - Left = 262 - Top = 51 - Width = 42 - Height = 13 + Left = 242 + Top = 47 + Width = 39 + Height = 12 Caption = #32463#32428#32433 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label12: TLabel - Left = 460 - Top = 20 - Width = 28 - Height = 13 + Left = 425 + Top = 18 + Width = 26 + Height = 12 Caption = #25104#20221 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label13: TLabel - Left = 578 - Top = 51 - Width = 56 - Height = 13 + Left = 589 + Top = 47 + Width = 52 + Height = 12 Caption = #25104#21697#23494#24230 Font.Charset = GB2312_CHARSET Font.Color = clBlue - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label14: TLabel - Left = 460 - Top = 80 - Width = 28 - Height = 13 + Left = 425 + Top = 74 + Width = 26 + Height = 12 Caption = #22791#27880 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label15: TLabel - Left = 161 - Top = 80 - Width = 28 - Height = 13 + Left = 149 + Top = 74 + Width = 26 + Height = 12 Caption = #21333#20215 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label16: TLabel - Left = 51 - Top = 22 - Width = 32 - Height = 61 + Left = 47 + Top = 20 + Width = 29 + Height = 56 Font.Charset = GB2312_CHARSET Font.Color = clRed - Font.Height = -61 + Font.Height = -56 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object Label17: TLabel - Left = 262 - Top = 80 - Width = 44 - Height = 13 + Left = 242 + Top = 74 + Width = 40 + Height = 12 Caption = #31246' '#20917 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False end object MXName: TEdit Tag = 2 - Left = 312 - Top = 16 - Width = 131 - Height = 21 + Left = 288 + Top = 15 + Width = 121 + Height = 20 CharCase = ecUpperCase TabOrder = 0 OnKeyPress = MXNameKeyPress end object BPMiDu: TEdit Tag = 2 - Left = 639 - Top = 16 - Width = 131 - Height = 21 + Left = 645 + Top = 15 + Width = 121 + Height = 20 CharCase = ecUpperCase TabOrder = 2 OnKeyPress = BPMiDuKeyPress end object BPJS: TEdit Tag = 2 - Left = 312 - Top = 46 - Width = 131 - Height = 21 + Left = 288 + Top = 42 + Width = 121 + Height = 20 CharCase = ecUpperCase TabOrder = 1 OnKeyPress = BPJSKeyPress end object Button1: TButton - Left = 424 - Top = 103 - Width = 96 - Height = 41 + Left = 391 + Top = 95 + Width = 89 + Height = 38 Caption = #20445#23384 Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -18 + Font.Height = -17 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False @@ -531,10 +531,10 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB end object BPCF: TEdit Tag = 2 - Left = 493 - Top = 16 - Width = 68 - Height = 21 + Left = 455 + Top = 15 + Width = 121 + Height = 20 CharCase = ecUpperCase TabOrder = 4 Text = '100%P' @@ -542,10 +542,10 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB end object BPMF: TEdit Tag = 2 - Left = 493 - Top = 46 - Width = 68 - Height = 21 + Left = 455 + Top = 42 + Width = 121 + Height = 20 CharCase = ecUpperCase TabOrder = 5 Text = '160' @@ -553,34 +553,34 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB end object BPKZ: TEdit Tag = 2 - Left = 194 - Top = 46 - Width = 50 - Height = 21 + Left = 179 + Top = 42 + Width = 46 + Height = 20 CharCase = ecUpperCase TabOrder = 6 OnKeyPress = BPKZKeyPress end object MXCode: TEdit Tag = 2 - Left = 194 - Top = 16 - Width = 50 - Height = 21 + Left = 179 + Top = 15 + Width = 46 + Height = 20 CharCase = ecUpperCase TabOrder = 7 OnKeyPress = MXCodeKeyPress end object CPMiDu: TEdit Tag = 2 - Left = 639 - Top = 46 - Width = 131 - Height = 21 + Left = 645 + Top = 42 + Width = 121 + Height = 20 CharCase = ecUpperCase Font.Charset = GB2312_CHARSET Font.Color = clBlue - Font.Height = -13 + Font.Height = -12 Font.Name = #23435#20307 Font.Style = [fsBold] ParentFont = False @@ -589,30 +589,30 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB end object BPNote: TEdit Tag = 2 - Left = 493 - Top = 76 - Width = 278 - Height = 21 + Left = 455 + Top = 70 + Width = 310 + Height = 20 CharCase = ecUpperCase TabOrder = 9 OnKeyPress = BPNoteKeyPress end object BPPrice: TEdit Tag = 2 - Left = 194 - Top = 76 - Width = 50 - Height = 21 + Left = 179 + Top = 70 + Width = 46 + Height = 20 CharCase = ecUpperCase TabOrder = 10 OnKeyPress = BPPriceKeyPress end object IFHS: TComboBox - Left = 312 - Top = 76 - Width = 132 - Height = 21 - ItemHeight = 13 + Left = 288 + Top = 70 + Width = 122 + Height = 20 + ItemHeight = 12 TabOrder = 11 Items.Strings = ( #21547#31246 @@ -620,10 +620,10 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB end end object Panel6: TPanel - Left = 221 + Left = 204 Top = 2 - Width = 688 - Height = 527 + Width = 554 + Height = 548 Align = alClient BevelInner = bvRaised BevelOuter = bvLowered @@ -631,12 +631,12 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB object cxGrid1: TcxGrid Left = 2 Top = 33 - Width = 684 - Height = 492 + Width = 550 + Height = 513 Align = alClient TabOrder = 0 object TV1: TcxGridDBTableView - NavigatorButtons.ConfirmDelete = False + Navigator.Buttons.CustomButtons = <> OnCellDblClick = TV1CellDblClick OnFocusedRecordChanged = TV1FocusedRecordChanged DataController.DataSource = DataSource1 @@ -759,7 +759,7 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB object ToolBar2: TToolBar Left = 2 Top = 2 - Width = 684 + Width = 550 Height = 31 ButtonHeight = 30 ButtonWidth = 59 @@ -801,13 +801,22 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB Visible = False OnClick = TBDelClick end + object TbCopy: TToolButton + Left = 189 + Top = 0 + AutoSize = True + Caption = #22797#21046 + ImageIndex = 92 + Visible = False + OnClick = TbCopyClick + end end end object Panel7: TPanel Left = 2 Top = 2 - Width = 219 - Height = 527 + Width = 202 + Height = 548 Align = alLeft BevelInner = bvRaised BevelOuter = bvLowered @@ -815,16 +824,16 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB object cxDBTreeList1: TcxDBTreeList Left = 2 Top = 33 - Width = 215 - Height = 492 + Width = 198 + Height = 513 Align = alClient Bands = < item end> - BufferedPaint = False DataController.DataSource = DataSource4 DataController.ParentField = 'CPParent' DataController.KeyField = 'CPID' + Navigator.Buttons.CustomButtons = <> OptionsBehavior.ExpandOnDblClick = False OptionsSelection.CellSelect = False OptionsView.CellAutoHeight = True @@ -838,15 +847,17 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn DataBinding.FieldName = 'CP' Width = 210 - Position.ColIndex = 1 + Position.ColIndex = 0 Position.RowIndex = 0 Position.BandIndex = 0 + Summary.FooterSummaryItems = <> + Summary.GroupFooterSummaryItems = <> end end object ToolBar3: TToolBar Left = 2 Top = 2 - Width = 215 + Width = 198 Height = 31 ButtonHeight = 30 ButtonWidth = 83 @@ -874,11 +885,12 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB end end object cxSplitter1: TcxSplitter - Left = 911 + Left = 760 Top = 31 Width = 8 - Height = 687 + Height = 696 HotZoneClassName = 'TcxMediaPlayer9Style' + AlignSplitter = salRight Control = Panel4 end object ADOQueryMain: TADOQuery @@ -18822,6 +18834,7 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB end object cxStyleRepository1: TcxStyleRepository Left = 728 + PixelsPerInch = 96 object cxStyle1: TcxStyle AssignedValues = [svColor, svFont, svTextColor] Color = clSkyBlue @@ -18836,6 +18849,7 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB object cxStyleRepository2: TcxStyleRepository Left = 624 Top = 8 + PixelsPerInch = 96 object cxStyle2: TcxStyle AssignedValues = [svFont] Font.Charset = ANSI_CHARSET diff --git a/样品新云翔(YPGLBOM.dll)/U_BPZdy_LRPB.pas b/样品新云翔(YPGLBOM.dll)/U_BPZdy_LRPB.pas index 090d5a4..ee16c89 100644 --- a/样品新云翔(YPGLBOM.dll)/U_BPZdy_LRPB.pas +++ b/样品新云翔(YPGLBOM.dll)/U_BPZdy_LRPB.pas @@ -4,13 +4,26 @@ interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, - cxDataStorage, cxEdit, DB, cxDBData, ToolWin, ComCtrls, - cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel, - cxClasses, cxControls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, - StdCtrls, ExtCtrls, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, - cxButtonEdit, BtnEdit, cxTL, cxMaskEdit, cxInplaceContainer, cxDBTL, - cxTLData, cxContainer, cxCurrencyEdit, cxCheckBox, cxSplitter; + Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, + cxEdit, DB, cxDBData, ToolWin, ComCtrls, cxGridCustomTableView, + cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls, + cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls, + cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxButtonEdit, BtnEdit, + cxTL, cxMaskEdit, cxInplaceContainer, cxDBTL, cxTLData, cxContainer, + cxCurrencyEdit, cxCheckBox, cxSplitter, cxLookAndFeels, cxLookAndFeelPainters, + dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, + dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle, + dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast, + dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, + dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins, + dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green, + dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black, + dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, + dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, + dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, + dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld, + dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, + dxSkinXmas2008Blue, dxSkinscxPCPainter, cxNavigator, cxTLdxBarBuiltInMenu; type TfrmBPZDY_LRPB = class(TForm) @@ -116,6 +129,7 @@ type V1IFHS: TcxGridDBColumn; Label17: TLabel; IFHS: TComboBox; + TbCopy: TToolButton; procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBAddClick(Sender: TObject); @@ -123,9 +137,7 @@ type procedure TBDelClick(Sender: TObject); procedure TBCloseClick(Sender: TObject); procedure FormShow(Sender: TObject); - procedure TV1CellDblClick(Sender: TcxCustomGridTableView; - ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; - AShift: TShiftState; var AHandled: Boolean); + procedure TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean); procedure BPNamehange(Sender: TObject); procedure V1NotePropertiesEditValueChanged(Sender: TObject); procedure V1HelpTypePropertiesEditValueChanged(Sender: TObject); @@ -136,9 +148,7 @@ type procedure ToolButton5Click(Sender: TObject); procedure ToolButton3Click(Sender: TObject); procedure BPCodeMChange(Sender: TObject); - procedure Tv3CellDblClick(Sender: TcxCustomGridTableView; - ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; - AShift: TShiftState; var AHandled: Boolean); + procedure Tv3CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean); procedure CYNoChange(Sender: TObject); procedure CYIDKeyPress(Sender: TObject; var Key: Char); procedure Button1Click(Sender: TObject); @@ -157,29 +167,30 @@ type procedure BPCFKeyPress(Sender: TObject; var Key: Char); procedure CPMiDuKeyPress(Sender: TObject; var Key: Char); procedure FormDestroy(Sender: TObject); - procedure TV1FocusedRecordChanged(Sender: TcxCustomGridTableView; - APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; - ANewItemRecordFocusingChanged: Boolean); + procedure TV1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean); procedure BPPriceKeyPress(Sender: TObject; var Key: Char); procedure BPNoteKeyPress(Sender: TObject; var Key: Char); + procedure TbCopyClick(Sender: TObject); private - FBPID,FCPID,FCPNo,FCPName:string; + FBPID, FCPID, FCPNo, FCPName: string; procedure InitGrid(); procedure SaveData(); procedure initTree(); { Private declarations } public - flag,flagname,snote,MainType,FGYName,Fint,canshu1:string; - fnote,fnote1,forderno,fZdyFlag,ViewFlag,fHelpType:Boolean; - PPSTE:integer; + flag, flagname, snote, MainType, FGYName, Fint, canshu1: string; + fnote, fnote1, forderno, fZdyFlag, ViewFlag, fHelpType: Boolean; + PPSTE: integer; { Public declarations } end; + var frmBPZDY_LRPB: TfrmBPZDY_LRPB; implementation + uses - U_DataLink,U_Fun10,U_BPZdy_SH, U_BPZdy_HXK,U_CPTypePB; + U_DataLink, U_Fun10, U_BPZdy_SH, U_BPZdy_HXK, U_CPTypePB; {$R *.dfm} procedure TfrmBPZDY_LRPB.initTree(); @@ -193,15 +204,17 @@ begin SQL.Add('from CP_TypePB order by CPlevel,CPOrder,CPName'); Open; end; - SCreateCDS20(ADOQueryTree,Order_Tree); - SInitCDSData20(ADOQueryTree,Order_Tree); + SCreateCDS20(ADOQueryTree, Order_Tree); + SInitCDSData20(ADOQueryTree, Order_Tree); cxDBTreeList1.Items[0].Expand(true); end; procedure TfrmBPZDY_LRPB.SaveData(); -var maxno:string; +var + maxno: string; begin - if FGYName<>'' then exit; + if FGYName <> '' then + exit; try ADOQueryCmd.Connection.BeginTrans; ClientDataSet1.DisableControls; @@ -210,25 +223,25 @@ begin First; while not eof do begin - if Trim(ClientDataSet1.FieldByName('BPID').AsString)='' then + if Trim(ClientDataSet1.FieldByName('BPID').AsString) = '' then begin - if GetLSNo(ADOQueryTemp,maxno,'BP','BP_ZDY',3,1)=False then + if GetLSNo(ADOQueryTemp, maxno, 'BP', 'BP_ZDY', 3, 1) = False then begin ADOQueryCmd.Connection.RollbackTrans; ClientDataSet1.EnableControls; - Application.MessageBox('ȡʧܣ','ʾ',0); + Application.MessageBox('ȡʧܣ', 'ʾ', 0); Exit; end; end else begin - maxno:=Trim(ClientDataSet1.fieldbyname('BPID').AsString); + maxno := Trim(ClientDataSet1.fieldbyname('BPID').AsString); end; with ADOQueryCmd do begin Close; sql.Clear; - sql.Add('select * from BP_ZDY where BPID='''+Trim(maxno)+''''); + sql.Add('select * from BP_ZDY where BPID=''' + Trim(maxno) + ''''); Open; end; if ADOQueryCmd.IsEmpty then @@ -239,34 +252,34 @@ begin begin ADOQueryCmd.Edit; end; - ADOQueryCmd.FieldByName('BPID').Value:=Trim(maxno); - SSetSaveDataCDSNew(ADOQueryCmd,Tv1,ClientDataSet1,'BP_ZDY',3); - ADOQueryCmd.FieldByName('BPType').Value:=flagName; - ADOQueryCmd.FieldByName('BPFlag').Value:=flag; - ADOQueryCmd.FieldByName('valid').Value:='Y'; + ADOQueryCmd.FieldByName('BPID').Value := Trim(maxno); + SSetSaveDataCDSNew(ADOQueryCmd, Tv1, ClientDataSet1, 'BP_ZDY', 3); + ADOQueryCmd.FieldByName('BPType').Value := flagName; + ADOQueryCmd.FieldByName('BPFlag').Value := flag; + ADOQueryCmd.FieldByName('valid').Value := 'Y'; ADOQueryCmd.Post; with ADOQueryTemp do begin Close; sql.Clear; - sql.add('select * from BP_ZDY where BPCode='''+Trim(ClientDataSet1.fieldbyname('BPCode').AsString)+''''); - sql.Add(' and BPFlag='''+trim(flag)+''''); + sql.add('select * from BP_ZDY where BPCode=''' + Trim(ClientDataSet1.fieldbyname('BPCode').AsString) + ''''); + sql.Add(' and BPFlag=''' + trim(flag) + ''''); Open; end; - if ADOQueryTemp.IsEmpty=False then + if ADOQueryTemp.IsEmpty = False then begin - if ADOQueryTemp.RecordCount>1 then + if ADOQueryTemp.RecordCount > 1 then begin with ADOQueryCmd do begin Close; sql.Clear; - SQL.Add('delete BP_ZDY where BPID='''+Trim(ClientDataSet1.fieldbyname('BPID').AsString)+''''); + SQL.Add('delete BP_ZDY where BPID=''' + Trim(ClientDataSet1.fieldbyname('BPID').AsString) + ''''); ExecSQL; end; ADOQueryCmd.Connection.RollbackTrans; ClientDataSet1.EnableControls; - Application.MessageBox('ظ','ʾ',0); + Application.MessageBox('ظ', 'ʾ', 0); Exit; end; end; @@ -274,46 +287,47 @@ begin begin Close; sql.Clear; - sql.add('select * from BP_ZDY where BPName='''+Trim(ClientDataSet1.fieldbyname('BPName').AsString)+''''); - sql.add(' and isnull(BPMF,'''')='''+Trim(ClientDataSet1.fieldbyname('BPMF').AsString)+''''); - sql.add(' and isnull(BPKZ,'''')='''+Trim(ClientDataSet1.fieldbyname('BPKZ').AsString)+''''); - sql.add(' and isnull(BPJS,'''')='''+Trim(ClientDataSet1.fieldbyname('BPJS').AsString)+''''); - sql.add(' and isnull(BPWS,'''')='''+Trim(ClientDataSet1.fieldbyname('BPWS').AsString)+''''); - sql.add(' and isnull(BPMiDu,'''')='''+Trim(ClientDataSet1.fieldbyname('BPMiDu').AsString)+''''); - sql.add(' and isnull(BPUnit,'''')='''+Trim(ClientDataSet1.fieldbyname('BPUnit').AsString)+''''); - sql.Add(' and BPFlag='''+trim(flag)+''''); + sql.add('select * from BP_ZDY where BPName=''' + Trim(ClientDataSet1.fieldbyname('BPName').AsString) + ''''); + sql.add(' and isnull(BPMF,'''')=''' + Trim(ClientDataSet1.fieldbyname('BPMF').AsString) + ''''); + sql.add(' and isnull(BPKZ,'''')=''' + Trim(ClientDataSet1.fieldbyname('BPKZ').AsString) + ''''); + sql.add(' and isnull(BPJS,'''')=''' + Trim(ClientDataSet1.fieldbyname('BPJS').AsString) + ''''); + sql.add(' and isnull(BPWS,'''')=''' + Trim(ClientDataSet1.fieldbyname('BPWS').AsString) + ''''); + sql.add(' and isnull(BPMiDu,'''')=''' + Trim(ClientDataSet1.fieldbyname('BPMiDu').AsString) + ''''); + sql.add(' and isnull(BPUnit,'''')=''' + Trim(ClientDataSet1.fieldbyname('BPUnit').AsString) + ''''); + sql.Add(' and BPFlag=''' + trim(flag) + ''''); Open; end; - if ADOQueryTemp.IsEmpty=False then + if ADOQueryTemp.IsEmpty = False then begin - if ADOQueryTemp.RecordCount>1 then + if ADOQueryTemp.RecordCount > 1 then begin with ADOQueryCmd do begin Close; sql.Clear; - SQL.Add('delete BP_ZDY where BPID='''+Trim(ClientDataSet1.fieldbyname('BPID').AsString)+''''); + SQL.Add('delete BP_ZDY where BPID=''' + Trim(ClientDataSet1.fieldbyname('BPID').AsString) + ''''); ExecSQL; end; ADOQueryCmd.Connection.RollbackTrans; ClientDataSet1.EnableControls; - Application.MessageBox('ŷؾɴγɴظ','ʾ',0); + Application.MessageBox('ŷؾɴγɴظ', 'ʾ', 0); Exit; end; end; ClientDataSet1.Edit; - ClientDataSet1.FieldByName('BPID').Value:=Trim(maxno); + ClientDataSet1.FieldByName('BPID').Value := Trim(maxno); //ClientDataSet1.Post; Next; end; ClientDataSet1.EnableControls; end; - TV1.OptionsData.Editing:=false; - TV1.OptionsSelection.CellSelect:=false; + TV1.OptionsData.Editing := false; + TV1.OptionsSelection.CellSelect := false; ADOQueryCmd.Connection.CommitTrans; - except; + except + ; ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('ʧܣ','ʾ',0); + Application.MessageBox('ʧܣ', 'ʾ', 0); end; end; @@ -323,22 +337,22 @@ begin //cxGrid1.Align:=alClient; with ADOConnection1 do begin - Connected:=false; - ConnectionString:=DConString; + Connected := false; + ConnectionString := DConString; //ConnectionString:=''; - Connected:=true; + Connected := true; end; - except; + except + ; frmBPZDY_LRPB.Free; end; - canshu1:=Trim(DParameters1); + canshu1 := Trim(DParameters1); end; -procedure TfrmBPZDY_LRPB.FormClose(Sender: TObject; - var Action: TCloseAction); +procedure TfrmBPZDY_LRPB.FormClose(Sender: TObject; var Action: TCloseAction); begin ToolBar1.SetFocus; - Action:=caFree; + Action := caFree; end; procedure TfrmBPZDY_LRPB.InitGrid(); @@ -350,14 +364,14 @@ begin Close; sql.Clear; sql.Add(' exec P_Select_BP :Code,:PState,:CYType,:Stats '); - Parameters.ParamByName('Code').Value:=''; - Parameters.ParamByName('PState').Value:=0; - Parameters.ParamByName('CYType').Value:=Trim(Order_Tree.fieldbyname('CPID').AsString); - Parameters.ParamByName('Stats').Value:=''; + Parameters.ParamByName('Code').Value := ''; + Parameters.ParamByName('PState').Value := 0; + Parameters.ParamByName('CYType').Value := Trim(Order_Tree.fieldbyname('CPID').AsString); + Parameters.ParamByName('Stats').Value := ''; Open; end; - SCreateCDS20(ADOQueryMain,ClientDataSet1); - SInitCDSData20(ADOQueryMain,ClientDataSet1); + SCreateCDS20(ADOQueryMain, ClientDataSet1); + SInitCDSData20(ADOQueryMain, ClientDataSet1); finally ADOQueryMain.EnableControls; end; @@ -365,96 +379,100 @@ end; procedure TfrmBPZDY_LRPB.TBAddClick(Sender: TObject); var - i:Integer; + i: Integer; begin - if Order_Tree.FieldByName('CPLevel').AsInteger<3 then + if Order_Tree.FieldByName('CPLevel').AsInteger < 3 then begin - Panel5.Visible:=False; - Application.MessageBox('ûѡͣ!','ʾ',0); + Panel5.Visible := False; + Application.MessageBox('ûѡͣ!', 'ʾ', 0); Exit; - end else + end + else begin - Panel5.Visible:=True; - SClearData(Panel5,2); - BPMF.Text:='160'; - BPCF.Text:='100%P'; - FBPID:=''; + Panel5.Visible := True; + SClearData(Panel5, 2); + BPMF.Text := '160'; + BPCF.Text := '100%P'; + FBPID := ''; MXCode.SetFocus; - Button1.Caption:=''; + Button1.Caption := ''; end; end; procedure TfrmBPZDY_LRPB.TBSaveClick(Sender: TObject); var - maxno:string; + maxno: string; begin - if ClientDataSet1.IsEmpty then Exit; + if ClientDataSet1.IsEmpty then + Exit; Toolbar1.SetFocus; - if ClientDataSet1.Locate('BPCode',null,[]) then + if ClientDataSet1.Locate('BPCode', null, []) then begin - Application.MessageBox('ŲΪգ','ʾ',0); + Application.MessageBox('ŲΪգ', 'ʾ', 0); Exit; end; - if ClientDataSet1.Locate('BPCode','',[]) then + if ClientDataSet1.Locate('BPCode', '', []) then begin - Application.MessageBox('ŲΪգ','ʾ',0); + Application.MessageBox('ŲΪգ', 'ʾ', 0); Exit; end; - if ClientDataSet1.Locate('BPName',null,[]) then + if ClientDataSet1.Locate('BPName', null, []) then begin - Application.MessageBox('ƲΪգ','ʾ',0); + Application.MessageBox('ƲΪգ', 'ʾ', 0); Exit; end; - if ClientDataSet1.Locate('BPName','',[]) then + if ClientDataSet1.Locate('BPName', '', []) then begin - Application.MessageBox('ƲΪգ','ʾ',0); + Application.MessageBox('ƲΪգ', 'ʾ', 0); Exit; end; SaveData(); - Application.MessageBox('ɹ','ʾ',0); + Application.MessageBox('ɹ', 'ʾ', 0); end; procedure TfrmBPZDY_LRPB.TBDelClick(Sender: TObject); begin MXCode.SetFocus; - if ClientDataSet1.IsEmpty then Exit; - if Trim(ClientDataSet1.FieldByName('BPID').AsString)<>'' then + if ClientDataSet1.IsEmpty then + Exit; + if Trim(ClientDataSet1.FieldByName('BPID').AsString) <> '' then begin with ADOQueryTemp do begin Close; sql.Clear; - sql.Add('select * from ML_Manage_PB where isnull(BPID,'''')='''+Trim(FBPID)+''''); + sql.Add('select * from ML_Manage_PB where isnull(BPID,'''')=''' + Trim(FBPID) + ''''); Open; end; - if ADOQueryTemp.IsEmpty=False then + if ADOQueryTemp.IsEmpty = False then begin - Application.MessageBox('Ϣɾ!','ʾ',0); + Application.MessageBox('Ϣɾ!', 'ʾ', 0); Exit; end; - if application.MessageBox('ȷҪɾ?','ʾϢ',1)=2 then exit; + if application.MessageBox('ȷҪɾ?', 'ʾϢ', 1) = 2 then + exit; with ADOQueryCmd do begin Close; sql.Clear; - sql.Add('delete BP_ZDY where BPID='''+Trim(ClientDataSet1.fieldbyname('BPID').AsString)+''''); + sql.Add('delete BP_ZDY where BPID=''' + Trim(ClientDataSet1.fieldbyname('BPID').AsString) + ''''); ExecSQL; end; end; ClientDataSet1.Delete; - SClearData(Panel5,2); - BPMF.Text:='160'; - BPCF.Text:='100%P'; - FBPID:=''; + SClearData(Panel5, 2); + BPMF.Text := '160'; + BPCF.Text := '100%P'; + FBPID := ''; end; procedure TfrmBPZDY_LRPB.TBCloseClick(Sender: TObject); begin panel1.SetFocus; - WriteCxGrid('Զ'+Trim(flag)+'1YX1',TV1,'Զ'); - WriteCxGrid('Զ'+Trim(flag)+'2YX1',TV2,'Զ'); + WriteCxGrid('Զ' + Trim(flag) + '1YX1', TV1, 'Զ'); + WriteCxGrid('Զ' + Trim(flag) + '2YX1', TV2, 'Զ'); Close; end; @@ -462,120 +480,122 @@ procedure TfrmBPZDY_LRPB.FormShow(Sender: TObject); begin initTree(); InitGrid(); - ReadCxGrid('Զ'+Trim(flag)+'1YX1',TV1,'Զ'); - ReadCxGrid('Զ'+Trim(flag)+'2YX1',TV2,'Զ'); - frmBPZDY_LRPB.Caption:=Trim(flagname); - if ViewFlag=True then + ReadCxGrid('Զ' + Trim(flag) + '1YX1', TV1, 'Զ'); + ReadCxGrid('Զ' + Trim(flag) + '2YX1', TV2, 'Զ'); + frmBPZDY_LRPB.Caption := Trim(flagname); + if ViewFlag = True then begin - TBAdd.Visible:=False; - TBDel.Visible:=False; - ToolButton1.Visible:=true; + TBAdd.Visible := False; + TbCopy.Visible := False; + TBDel.Visible := False; + ToolButton1.Visible := true; end; - if canshu1='ѯ' then + if canshu1 = 'ѯ' then begin - ToolBar3.Visible:=False; - ToolBar2.Visible:=false; - Button1.Visible:=false; - Panel2.Visible:=false; - cxSplitter1.Visible:=false; - Panel4.Align:=alClient; - V1BPNote.Visible:=False; - V1BPPrice.Visible:=false; - Label15.Visible:=false; - BPPrice.Visible:=false; - Label14.Visible:=false; - BPNote.Visible:=false; + ToolBar3.Visible := False; + ToolBar2.Visible := false; + Button1.Visible := false; + Panel2.Visible := false; + cxSplitter1.Visible := false; + Panel4.Align := alClient; + V1BPNote.Visible := False; + V1BPPrice.Visible := false; + Label15.Visible := false; + BPPrice.Visible := false; + Label14.Visible := false; + BPNote.Visible := false; end else begin - ToolBar3.Visible:=true; - ToolBar2.Visible:=true; - Button1.Visible:=true; - Panel2.Visible:=true; - cxSplitter1.Visible:=true; - Panel4.Align:=alLeft; - V1BPNote.Visible:=true; - V1BPPrice.Visible:=true; - Label15.Visible:=true; - BPPrice.Visible:=true; - Label14.Visible:=true; - BPNote.Visible:=true; + ToolBar3.Visible := true; + ToolBar2.Visible := true; + Button1.Visible := true; + Panel2.Visible := true; + cxSplitter1.Visible := true; + Panel4.Align := alLeft; + V1BPNote.Visible := true; + V1BPPrice.Visible := true; + Label15.Visible := true; + BPPrice.Visible := true; + Label14.Visible := true; + BPNote.Visible := true; end; end; -procedure TfrmBPZDY_LRPB.TV1CellDblClick(Sender: TcxCustomGridTableView; - ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; - AShift: TShiftState; var AHandled: Boolean); -var i:integer; +procedure TfrmBPZDY_LRPB.TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean); +var + i: integer; begin - if ToolButton1.Visible=true then + if ToolButton1.Visible = true then begin - Fint:='1'; - ModalResult:=1; - end else + Fint := '1'; + ModalResult := 1; + end + else begin ToolBar1.SetFocus; - if ClientDataSet1.IsEmpty then exit; - BPMF.Text:=Trim(ClientDataSet1.fieldbyname('BPMF').AsString); - BPKZ.Text:=Trim(ClientDataSet1.fieldbyname('BPKZ').AsString); - BPCF.Text:=Trim(ClientDataSet1.fieldbyname('BPCF').AsString); - BPJS.Text:=Trim(ClientDataSet1.fieldbyname('BPJS').AsString); - BPMiDu.Text:=Trim(ClientDataSet1.fieldbyname('BPMiDu').AsString); - CPMiDu.Text:=Trim(ClientDataSet1.fieldbyname('CPMiDu').AsString); - MXCode.Text:=Trim(ClientDataSet1.FieldByName('MXCode').AsString); - MXName.Text:=Trim(ClientDataSet1.FieldByName('MXName').AsString); - IFHS.Text:=Trim(ClientDataSet1.FieldByName('IFHS').AsString); - BPPrice.Text:=Trim(ClientDataSet1.FieldByName('BPPrice').AsString); - BPNote.Text:=Trim(ClientDataSet1.FieldByName('BPNote').AsString); - FBPID:=Trim(ClientDataSet1.fieldbyname('BPID').AsString); - FCPID:=Trim(ClientDataSet1.fieldbyname('CPID').AsString); - FCPNo:=Trim(ClientDataSet1.fieldbyname('CPNo').AsString); - FCPName:=Trim(ClientDataSet1.fieldbyname('CPName').AsString); - Panel5.Visible:=True; - Button1.Caption:='޸ı'; - TBDel.Visible:=True; + if ClientDataSet1.IsEmpty then + exit; + BPMF.Text := Trim(ClientDataSet1.fieldbyname('BPMF').AsString); + BPKZ.Text := Trim(ClientDataSet1.fieldbyname('BPKZ').AsString); + BPCF.Text := Trim(ClientDataSet1.fieldbyname('BPCF').AsString); + BPJS.Text := Trim(ClientDataSet1.fieldbyname('BPJS').AsString); + BPMiDu.Text := Trim(ClientDataSet1.fieldbyname('BPMiDu').AsString); + CPMiDu.Text := Trim(ClientDataSet1.fieldbyname('CPMiDu').AsString); + MXCode.Text := Trim(ClientDataSet1.FieldByName('MXCode').AsString); + MXName.Text := Trim(ClientDataSet1.FieldByName('MXName').AsString); + IFHS.Text := Trim(ClientDataSet1.FieldByName('IFHS').AsString); + BPPrice.Text := Trim(ClientDataSet1.FieldByName('BPPrice').AsString); + BPNote.Text := Trim(ClientDataSet1.FieldByName('BPNote').AsString); + FBPID := Trim(ClientDataSet1.fieldbyname('BPID').AsString); + FCPID := Trim(ClientDataSet1.fieldbyname('CPID').AsString); + FCPNo := Trim(ClientDataSet1.fieldbyname('CPNo').AsString); + FCPName := Trim(ClientDataSet1.fieldbyname('CPName').AsString); + Panel5.Visible := True; + Button1.Caption := '޸ı'; + TBDel.Visible := True; + TBCopy.Visible := True; end; end; procedure TfrmBPZDY_LRPB.BPNamehange(Sender: TObject); var - fsj:String; + fsj: string; begin - if Trim(BPNameM.Text)<>'' then + if Trim(BPNameM.Text) <> '' then begin - fsj:=' BPName like '''+'%'+Trim(BPNameM.Text)+'%'+''''; + fsj := ' BPName like ''' + '%' + Trim(BPNameM.Text) + '%' + ''''; end; if ADOQueryMain.Active then begin - SDofilter(ADOQueryMain,fsj); - SCreateCDS20(ADOQueryMain,ClientDataSet1); - SInitCDSData20(ADOQueryMain,ClientDataSet1); + SDofilter(ADOQueryMain, fsj); + SCreateCDS20(ADOQueryMain, ClientDataSet1); + SInitCDSData20(ADOQueryMain, ClientDataSet1); end; end; procedure TfrmBPZDY_LRPB.V1NotePropertiesEditValueChanged(Sender: TObject); var - mvalue:string; + mvalue: string; begin - mvalue:=TcxTextEdit(Sender).EditingText; + mvalue := TcxTextEdit(Sender).EditingText; with ClientDataSet1 do begin Edit; - FieldByName('BPKZ').Value:=mvalue; + FieldByName('BPKZ').Value := mvalue; //Post; end; end; -procedure TfrmBPZDY_LRPB.V1HelpTypePropertiesEditValueChanged( - Sender: TObject); +procedure TfrmBPZDY_LRPB.V1HelpTypePropertiesEditValueChanged(Sender: TObject); var - mvalue:string; + mvalue: string; begin - mvalue:=TcxTextEdit(Sender).EditingText; + mvalue := TcxTextEdit(Sender).EditingText; with ClientDataSet1 do begin Edit; - FieldByName('BPWS').Value:=mvalue; + FieldByName('BPWS').Value := mvalue; Post; end; {with ADOQueryCmd do @@ -590,26 +610,26 @@ end; procedure TfrmBPZDY_LRPB.v1note1PropertiesEditValueChanged(Sender: TObject); var - mvalue:string; + mvalue: string; begin - mvalue:=TcxTextEdit(Sender).EditingText; + mvalue := TcxTextEdit(Sender).EditingText; with ClientDataSet1 do begin Edit; - FieldByName('BPMiDu').Value:=mvalue; + FieldByName('BPMiDu').Value := mvalue; Post; end; end; procedure TfrmBPZDY_LRPB.V1BPCodePropertiesEditValueChanged(Sender: TObject); var - mvalue:string; + mvalue: string; begin - mvalue:=TcxTextEdit(Sender).EditingText; + mvalue := TcxTextEdit(Sender).EditingText; with ClientDataSet1 do begin Edit; - FieldByName('BPCode').Value:=mvalue; + FieldByName('BPCode').Value := mvalue; end; {with ADOQueryCmd do begin @@ -623,23 +643,24 @@ end; procedure TfrmBPZDY_LRPB.V1BPNamePropertiesEditValueChanged(Sender: TObject); var - mvalue:string; + mvalue: string; begin - mvalue:=TcxTextEdit(Sender).EditingText; + mvalue := TcxTextEdit(Sender).EditingText; with ClientDataSet1 do begin Edit; - FieldByName('BPName').Value:=mvalue; + FieldByName('BPName').Value := mvalue; end; end; procedure TfrmBPZDY_LRPB.ToolButton4Click(Sender: TObject); begin ToolBar1.SetFocus; - if ClientDataSet1.IsEmpty then exit; - if ClientDataSet1.FieldByName('BPID').AsString='' then + if ClientDataSet1.IsEmpty then + exit; + if ClientDataSet1.FieldByName('BPID').AsString = '' then begin - application.MessageBox('뱣Ϣ','ʾ'); + application.MessageBox('뱣Ϣ', 'ʾ'); exit; end; with ML_GYS do @@ -652,15 +673,17 @@ end; procedure TfrmBPZDY_LRPB.ToolButton5Click(Sender: TObject); begin ToolBar1.SetFocus; - if ML_GYS.IsEmpty then Exit; - if Trim(ML_GYS.FieldByName('BPSubID').AsString)<>'' then + if ML_GYS.IsEmpty then + Exit; + if Trim(ML_GYS.FieldByName('BPSubID').AsString) <> '' then begin - if application.MessageBox('ȷҪɾ?','ʾϢ',1)=2 then exit; + if application.MessageBox('ȷҪɾ?', 'ʾϢ', 1) = 2 then + exit; with ADOQueryCmd do begin Close; sql.Clear; - sql.Add('delete BP_ZDY_Sub where BPSubID='''+Trim(ML_GYS.fieldbyname('BPSubID').AsString)+''''); + sql.Add('delete BP_ZDY_Sub where BPSubID=''' + Trim(ML_GYS.fieldbyname('BPSubID').AsString) + ''''); ExecSQL; end; end; @@ -668,7 +691,8 @@ begin end; procedure TfrmBPZDY_LRPB.ToolButton3Click(Sender: TObject); - var maxno:string; +var + maxno: string; begin ToolBar1.SetFocus; try @@ -679,25 +703,25 @@ begin First; while not eof do begin - if Trim(ML_GYS.FieldByName('BPSubID').AsString)='' then + if Trim(ML_GYS.FieldByName('BPSubID').AsString) = '' then begin - if GetLSNo(ADOQueryTemp,maxno,'BS','BP_ZDY_Sub',3,1)=False then + if GetLSNo(ADOQueryTemp, maxno, 'BS', 'BP_ZDY_Sub', 3, 1) = False then begin ADOQueryCmd.Connection.RollbackTrans; ML_GYS.EnableControls; - Application.MessageBox('ȡʧܣ','ʾ',0); + Application.MessageBox('ȡʧܣ', 'ʾ', 0); Exit; end; end else begin - maxno:=Trim(ML_GYS.fieldbyname('BPSubID').AsString); + maxno := Trim(ML_GYS.fieldbyname('BPSubID').AsString); end; with ADOQueryCmd do begin Close; sql.Clear; - sql.Add('select * from BP_ZDY_Sub where BPSubID='''+Trim(maxno)+''''); + sql.Add('select * from BP_ZDY_Sub where BPSubID=''' + Trim(maxno) + ''''); Open; end; if ADOQueryCmd.IsEmpty then @@ -708,53 +732,54 @@ begin begin ADOQueryCmd.edit; end; - ADOQueryCmd.FieldByName('BPSubID').Value:=Trim(maxno); - ADOQueryCmd.FieldByName('BPCode').Value:=Trim(ClientDataSet1.fieldbyname('BPCode').AsString); - ADOQueryCmd.FieldByName('BPID').Value:=Trim(ClientDataSet1.fieldbyname('BPID').AsString); - SSetSaveDataCDSNew(ADOQueryCmd,Tv2,ML_GYS,'BP_ZDY_Sub',1); - ADOQueryCmd.FieldByName('BPPrice').Value:=ML_GYS.fieldbyname('BPPrice').AsString; - ADOQueryCmd.FieldByName('BPType').Value:=flagName; - ADOQueryCmd.FieldByName('BPFlag').Value:=flag; - ADOQueryCmd.FieldByName('valid').Value:='Y'; + ADOQueryCmd.FieldByName('BPSubID').Value := Trim(maxno); + ADOQueryCmd.FieldByName('BPCode').Value := Trim(ClientDataSet1.fieldbyname('BPCode').AsString); + ADOQueryCmd.FieldByName('BPID').Value := Trim(ClientDataSet1.fieldbyname('BPID').AsString); + SSetSaveDataCDSNew(ADOQueryCmd, Tv2, ML_GYS, 'BP_ZDY_Sub', 1); + ADOQueryCmd.FieldByName('BPPrice').Value := ML_GYS.fieldbyname('BPPrice').AsString; + ADOQueryCmd.FieldByName('BPType').Value := flagName; + ADOQueryCmd.FieldByName('BPFlag').Value := flag; + ADOQueryCmd.FieldByName('valid').Value := 'Y'; ADOQueryCmd.Post; ML_GYS.Edit; - ML_GYS.FieldByName('BPSubID').Value:=Trim(maxno); + ML_GYS.FieldByName('BPSubID').Value := Trim(maxno); Next; end; ML_GYS.EnableControls; end; ADOQueryCmd.Connection.CommitTrans; - Application.MessageBox('ɹ','ʾ',0); - except; + Application.MessageBox('ɹ', 'ʾ', 0); + except + ; ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('ʧܣ','ʾ',0); + Application.MessageBox('ʧܣ', 'ʾ', 0); end; end; procedure TfrmBPZDY_LRPB.BPCodeMChange(Sender: TObject); var - fsj:String; + fsj: string; begin - if Trim(BPCodeM.Text)<>'' then + if Trim(BPCodeM.Text) <> '' then begin - fsj:=' BPCode like '''+'%'+Trim(BPCodeM.Text)+'%'+''''; + fsj := ' BPCode like ''' + '%' + Trim(BPCodeM.Text) + '%' + ''''; end; if ADOQueryMain.Active then begin - SDofilter(ADOQueryMain,fsj); - SCreateCDS20(ADOQueryMain,ClientDataSet1); - SInitCDSData20(ADOQueryMain,ClientDataSet1); + SDofilter(ADOQueryMain, fsj); + SCreateCDS20(ADOQueryMain, ClientDataSet1); + SInitCDSData20(ADOQueryMain, ClientDataSet1); end; end; -procedure TfrmBPZDY_LRPB.Tv3CellDblClick(Sender: TcxCustomGridTableView; - ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; - AShift: TShiftState; var AHandled: Boolean); -var i:Integer; +procedure TfrmBPZDY_LRPB.Tv3CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean); +var + i: Integer; begin - if ML_GX.IsEmpty then exit; + if ML_GX.IsEmpty then + exit; ML_GX.Delete; - i:=1; + i := 1; ML_GX.DisableControls; with ML_GX do begin @@ -762,8 +787,8 @@ begin while not eof do begin Edit; - FieldByName('BPMiDu').Value:=i; - i:=i+1; + FieldByName('BPMiDu').Value := i; + i := i + 1; next; end; end; @@ -772,26 +797,28 @@ end; procedure TfrmBPZDY_LRPB.CYNoChange(Sender: TObject); var - fsj:String; + fsj: string; begin - if Trim(CYNo.Text)<>'' then + if Trim(CYNo.Text) <> '' then begin - fsj:=' CYNo like '''+'%'+Trim(CYNo.Text)+'%'+''''; + fsj := ' CYNo like ''' + '%' + Trim(CYNo.Text) + '%' + ''''; end; if ADOQueryMain.Active then begin - SDofilter(ADOQueryMain,fsj); - SCreateCDS20(ADOQueryMain,ML_GX); - SInitCDSData20(ADOQueryMain,ML_GX); + SDofilter(ADOQueryMain, fsj); + SCreateCDS20(ADOQueryMain, ML_GX); + SInitCDSData20(ADOQueryMain, ML_GX); end; end; procedure TfrmBPZDY_LRPB.CYIDKeyPress(Sender: TObject; var Key: Char); -var FMXCYID,FColNo,FCYType,CPID:String; +var + FMXCYID, FColNo, FCYType, CPID: string; begin - if Key=#13 then + if Key = #13 then begin - if Trim(CYID.Text)='' then Exit; + if Trim(CYID.Text) = '' then + Exit; with ADOQuery6 do begin close; @@ -800,7 +827,7 @@ begin SQL.Add(',(select Top 1 B.CYType from CP_YDang B where B.CYID=A.CYID))'); sql.Add(',CYID=isnull((select Top 1 C.CYID from CP_YDang B inner join CP_YDang C on C.CYID=B.CYType where B.CYID=A.CYID),'); sql.Add('(select Top 1 B.CYID from CP_YDang B where B.CYID=A.CYID))'); - sql.Add(' from CP_YDang_Color A where A.CLRID='''+trim(CYID.Text)+''''); + sql.Add(' from CP_YDang_Color A where A.CLRID=''' + trim(CYID.Text) + ''''); //ShowMessage(sql.Text); Open; end; @@ -808,133 +835,134 @@ begin begin Close; sql.Clear; - sql.Add('select * from CP_YDang where CYID='''+Trim(CYID.Text)+''''); + sql.Add('select * from CP_YDang where CYID=''' + Trim(CYID.Text) + ''''); Open; end; with ADOQuery3 do begin Close; sql.Clear; - sql.Add('select * from CP_YDang where CYID='''+Trim(ADOQuery2.fieldbyname('CYType').AsString)+''''); + sql.Add('select * from CP_YDang where CYID=''' + Trim(ADOQuery2.fieldbyname('CYType').AsString) + ''''); Open; end; - if ADOQuery6.IsEmpty=false then + if ADOQuery6.IsEmpty = false then begin - CPID:=Trim(ADOQuery6.fieldbyname('CYType').AsString); - FMXCYID:=Trim(ADOQuery6.fieldbyname('CYID').AsString); - FColNo:=Trim(ADOQuery6.fieldbyname('ColorNo').AsString); - FCYType:=Trim(ADOQuery6.fieldbyname('MXCYType').AsString); + CPID := Trim(ADOQuery6.fieldbyname('CYType').AsString); + FMXCYID := Trim(ADOQuery6.fieldbyname('CYID').AsString); + FColNo := Trim(ADOQuery6.fieldbyname('ColorNo').AsString); + FCYType := Trim(ADOQuery6.fieldbyname('MXCYType').AsString); end; - if ADOQuery2.IsEmpty=false then + if ADOQuery2.IsEmpty = false then begin - CPID:=Trim(ADOQuery2.fieldbyname('CYType').AsString); - FMXCYID:=Trim(ADOQuery2.fieldbyname('CYID').AsString); + CPID := Trim(ADOQuery2.fieldbyname('CYType').AsString); + FMXCYID := Trim(ADOQuery2.fieldbyname('CYID').AsString); end; - if ADOQuery3.IsEmpty=false then + if ADOQuery3.IsEmpty = false then begin - CPID:=Trim(ADOQuery3.fieldbyname('CYType').AsString); - FMXCYID:=Trim(ADOQuery3.fieldbyname('CYID').AsString); - FCYType:=Trim(CYID.Text); + CPID := Trim(ADOQuery3.fieldbyname('CYType').AsString); + FMXCYID := Trim(ADOQuery3.fieldbyname('CYID').AsString); + FCYType := Trim(CYID.Text); end; with ADOQuery2 do begin Close; sql.Clear; sql.Add(' exec P_Select_CP_YDang1 :CYType,:CP,:RON,:WSql,:Stats '); - Parameters.ParamByName('CYType').Value:=CPID; - Parameters.ParamByName('CP').Value:=1; - Parameters.ParamByName('RON').Value:=100; - Parameters.ParamByName('WSql').Value:=' CYID='''+Trim(FMXCYID)+''' '; - Parameters.ParamByName('Stats').Value:=2; + Parameters.ParamByName('CYType').Value := CPID; + Parameters.ParamByName('CP').Value := 1; + Parameters.ParamByName('RON').Value := 100; + Parameters.ParamByName('WSql').Value := ' CYID=''' + Trim(FMXCYID) + ''' '; + Parameters.ParamByName('Stats').Value := 2; Open; end; - SCreateCDS20(ADOQuery2,ML_GX); - SInitCDSData20(ADOQuery2,ML_GX); - CYID.Text:=''; + SCreateCDS20(ADOQuery2, ML_GX); + SInitCDSData20(ADOQuery2, ML_GX); + CYID.Text := ''; end; end; procedure TfrmBPZDY_LRPB.Button1Click(Sender: TObject); var - maxno,FCPMiDu:string; - FInt:Integer; - FReal:Double; + maxno, FCPMiDu: string; + FInt: Integer; + FReal: Double; begin - if Button1.Caption='޸ı' then + if Button1.Caption = '޸ı' then begin - if Application.MessageBox('ȷҪ޸ı','ʾ',1)=2 then exit; + if Application.MessageBox('ȷҪ޸ı', 'ʾ', 1) = 2 then + exit; end; - if Button1.Caption='' then + if Button1.Caption = '' then begin - if Label16.Caption='' then + if Label16.Caption = '' then begin - application.MessageBox('ûѡ','ʾ'); + application.MessageBox('ûѡ', 'ʾ'); exit; end; end; - if MXCode.Text='' then + if MXCode.Text = '' then begin - application.MessageBox('벻Ϊ','ʾ'); + application.MessageBox('벻Ϊ', 'ʾ'); exit; end; - if Length(MXCode.Text)>2 then + if Length(MXCode.Text) > 2 then begin - application.MessageBox('벻ܳ2λ','ʾ'); + application.MessageBox('벻ܳ2λ', 'ʾ'); exit; end; - if TryStrToInt(MXCode.Text,FInt)=False then + if TryStrToInt(MXCode.Text, FInt) = False then begin - Application.MessageBox('Ƿ!','ʾ',0); + Application.MessageBox('Ƿ!', 'ʾ', 0); Exit; end; - if Trim(BPPrice.Text)<>'' then + if Trim(BPPrice.Text) <> '' then begin - if TryStrToFloat(BPPrice.Text,FReal)=False then + if TryStrToFloat(BPPrice.Text, FReal) = False then begin - Application.MessageBox('۷Ƿ!','ʾ',0); + Application.MessageBox('۷Ƿ!', 'ʾ', 0); Exit; end; end; - if Trim(Button1.Caption)<>'޸ı' then + if Trim(Button1.Caption) <> '޸ı' then begin - if Order_Tree.FieldByName('CPLevel').AsInteger=1 then + if Order_Tree.FieldByName('CPLevel').AsInteger = 1 then begin - application.MessageBox('','ʾ'); + application.MessageBox('', 'ʾ'); exit; end; end; - if Trim(BPMF.Text)<>'' then + if Trim(BPMF.Text) <> '' then begin - if TryStrToInt(BPMF.Text,FInt)=False then + if TryStrToInt(BPMF.Text, FInt) = False then begin - Application.MessageBox('ŷǷ!','ʾ',0); + Application.MessageBox('ŷǷ!', 'ʾ', 0); Exit; end; end; - if Trim(BPKZ.Text)<>'' then + if Trim(BPKZ.Text) <> '' then begin - if TryStrToInt(BPKZ.Text,FInt)=False then + if TryStrToInt(BPKZ.Text, FInt) = False then begin - Application.MessageBox('طǷ!','ʾ',0); + Application.MessageBox('طǷ!', 'ʾ', 0); Exit; end; end; - FCPMiDu:=Trim(CPMiDu.Text); - if Trim(FCPMiDu)<>'' then + FCPMiDu := Trim(CPMiDu.Text); + if Trim(FCPMiDu) <> '' then begin - if Pos('T',FCPMiDu)<>Length(FCPMiDu) then + if Pos('T', FCPMiDu) <> Length(FCPMiDu) then begin - CPMiDu.Text:=CPMiDu.Text+'T'; + CPMiDu.Text := CPMiDu.Text + 'T'; end; end; try ADOQueryCmd.Connection.BeginTrans; - if FBPID='' then + if FBPID = '' then begin - if GetLSNo(ADOQueryTemp,FBPID,'BP','BP_ZDY',3,1)=False then + if GetLSNo(ADOQueryTemp, FBPID, 'BP', 'BP_ZDY', 3, 1) = False then begin ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('ȡʧܣ','ʾ',0); + Application.MessageBox('ȡʧܣ', 'ʾ', 0); Exit; end; end; @@ -942,7 +970,7 @@ begin begin Close; sql.Clear; - sql.Add('select * from BP_ZDY where BPID='''+Trim(FBPID)+''''); + sql.Add('select * from BP_ZDY where BPID=''' + Trim(FBPID) + ''''); Open; end; if ADOQueryCmd.IsEmpty then @@ -953,129 +981,131 @@ begin begin ADOQueryCmd.Edit; end; - ADOQueryCmd.FieldByName('BPID').Value:=Trim(FBPID); + ADOQueryCmd.FieldByName('BPID').Value := Trim(FBPID); //SSetsaveSqlNew(ADOQueryCmd,'BP_ZDY',panel5,2); - RTSetsavedata(ADOQueryCmd,'BP_ZDY',panel5,2); - ADOQueryCmd.FieldByName('BPType').Value:=flagName; - ADOQueryCmd.FieldByName('BPFlag').Value:=flag; - ADOQueryCmd.FieldByName('valid').Value:='Y'; - ADOQueryCmd.FieldByName('CPID').Value:=trim(FCPID); - ADOQueryCmd.FieldByName('CPNo').Value:=trim(FCPNo); - ADOQueryCmd.FieldByName('CPName').Value:=trim(FCPName); - ADOQueryCmd.FieldByName('IFHS').AsString:=Trim(IFHS.Text); - if Trim(BPPrice.Text)<>'' then - ADOQueryCmd.FieldByName('BPPrice').Value:=BPPrice.Text + RTSetsavedata(ADOQueryCmd, 'BP_ZDY', panel5, 2); + ADOQueryCmd.FieldByName('BPType').Value := flagName; + ADOQueryCmd.FieldByName('BPFlag').Value := flag; + ADOQueryCmd.FieldByName('valid').Value := 'Y'; + ADOQueryCmd.FieldByName('CPID').Value := trim(FCPID); + ADOQueryCmd.FieldByName('CPNo').Value := trim(FCPNo); + ADOQueryCmd.FieldByName('CPName').Value := trim(FCPName); + ADOQueryCmd.FieldByName('IFHS').AsString := Trim(IFHS.Text); + if Trim(BPPrice.Text) <> '' then + ADOQueryCmd.FieldByName('BPPrice').Value := BPPrice.Text else - ADOQueryCmd.FieldByName('BPPrice').Value:=Null; - ADOQueryCmd.FieldByName('BPNote').Value:=Trim(BPNote.Text); - ADOQueryCmd.FieldByName('BPCode').Value:=trim(FCPNo)+trim(MXCode.Text); - ADOQueryCmd.FieldByName('BPName').Value:=trim(MXName.Text); - ADOQueryCmd.FieldByName('BPCF').Value:=trim(BPCF.Text); + ADOQueryCmd.FieldByName('BPPrice').Value := Null; + ADOQueryCmd.FieldByName('BPNote').Value := Trim(BPNote.Text); + ADOQueryCmd.FieldByName('BPCode').Value := trim(FCPNo) + trim(MXCode.Text); + ADOQueryCmd.FieldByName('BPName').Value := trim(MXName.Text); + ADOQueryCmd.FieldByName('BPCF').Value := trim(BPCF.Text); ADOQueryCmd.Post; with ADOQueryTemp do begin Close; sql.Clear; - sql.add('select * from BP_ZDY where BPCode='''+Trim(trim(FCPNo)+trim(MXCode.Text))+''''); - sql.Add(' and BPFlag='''+trim(flag)+''''); + sql.add('select * from BP_ZDY where BPCode=''' + Trim(trim(FCPNo) + trim(MXCode.Text)) + ''''); + sql.Add(' and BPFlag=''' + trim(flag) + ''''); Open; end; - if ADOQueryTemp.RecordCount>1 then + if ADOQueryTemp.RecordCount > 1 then begin ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('ظ','ʾ',0); + Application.MessageBox('ظ', 'ʾ', 0); Exit; end; with ADOQueryTemp do begin Close; sql.Clear; - sql.add('select * from BP_ZDY where BPCode='''+Trim(trim(FCPNo)+trim(MXCode.Text))+''''); - sql.Add(' and BPName='''+Trim(trim(FCPName)+trim(MXName.Text))+''''); - sql.Add(' and BPFlag='''+trim(flag)+''''); + sql.add('select * from BP_ZDY where BPCode=''' + Trim(trim(FCPNo) + trim(MXCode.Text)) + ''''); + sql.Add(' and BPName=''' + Trim(trim(FCPName) + trim(MXName.Text)) + ''''); + sql.Add(' and BPFlag=''' + trim(flag) + ''''); Open; end; - if ADOQueryTemp.RecordCount>1 then + if ADOQueryTemp.RecordCount > 1 then begin ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('źظ','ʾ',0); + Application.MessageBox('źظ', 'ʾ', 0); Exit; end; with ADOQueryTemp do begin Close; sql.Clear; - sql.add('select * from BP_ZDY where BPName='''+Trim(trim(FCPName)+trim(MXName.Text))+''''); - sql.add(' and isnull(BPMF,'''')='''+Trim(BPMF.Text)+''''); - sql.add(' and isnull(BPKZ,'''')='''+Trim(BPKZ.Text)+''''); - sql.add(' and isnull(BPJS,'''')='''+Trim(BPJS.Text)+''''); - sql.add(' and isnull(BPMiDu,'''')='''+Trim(BPMiDu.Text)+''''); - sql.Add(' and BPFlag='''+trim(flag)+''''); + sql.add('select * from BP_ZDY where BPName=''' + Trim(trim(FCPName) + trim(MXName.Text)) + ''''); + sql.add(' and isnull(BPMF,'''')=''' + Trim(BPMF.Text) + ''''); + sql.add(' and isnull(BPKZ,'''')=''' + Trim(BPKZ.Text) + ''''); + sql.add(' and isnull(BPJS,'''')=''' + Trim(BPJS.Text) + ''''); + sql.add(' and isnull(BPMiDu,'''')=''' + Trim(BPMiDu.Text) + ''''); + sql.Add(' and BPFlag=''' + trim(flag) + ''''); Open; end; - if ADOQueryTemp.RecordCount>1 then + if ADOQueryTemp.RecordCount > 1 then begin ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('Ϣظ','ʾ',0); + Application.MessageBox('Ϣظ', 'ʾ', 0); Exit; end; with ClientDataSet1 do begin - if Button1.Caption<>'޸ı' then + if Button1.Caption <> '޸ı' then Append else edit; - FieldByName('BPID').Value:=Trim(FBPID); - FieldByName('BPCode').Value:=trim(FCPNo)+Trim(MXCode.Text); - FieldByName('BPName').Value:=Trim(MXName.Text); - FieldByName('BPMF').Value:=Trim(BPMF.Text); - FieldByName('BPCF').Value:=Trim(BPCF.Text); - FieldByName('BPKZ').Value:=Trim(BPKZ.Text); - FieldByName('BPJS').Value:=Trim(BPJS.Text); - FieldByName('BPMiDu').Value:=Trim(BPMiDu.Text); - FieldByName('CPMiDu').Value:=Trim(CPMiDu.Text); - FieldByName('MXCode').Value:=Trim(MXCode.Text); - FieldByName('MXName').Value:=Trim(MXName.Text); - FieldByName('IFHS').AsString:=Trim(IFHS.Text); - if Trim(BPPrice.Text)<>'' then - FieldByName('BPPrice').Value:=BPPrice.Text + FieldByName('BPID').Value := Trim(FBPID); + FieldByName('BPCode').Value := trim(FCPNo) + Trim(MXCode.Text); + FieldByName('BPName').Value := Trim(MXName.Text); + FieldByName('BPMF').Value := Trim(BPMF.Text); + FieldByName('BPCF').Value := Trim(BPCF.Text); + FieldByName('BPKZ').Value := Trim(BPKZ.Text); + FieldByName('BPJS').Value := Trim(BPJS.Text); + FieldByName('BPMiDu').Value := Trim(BPMiDu.Text); + FieldByName('CPMiDu').Value := Trim(CPMiDu.Text); + FieldByName('MXCode').Value := Trim(MXCode.Text); + FieldByName('MXName').Value := Trim(MXName.Text); + FieldByName('IFHS').AsString := Trim(IFHS.Text); + if Trim(BPPrice.Text) <> '' then + FieldByName('BPPrice').Value := BPPrice.Text else - FieldByName('BPPrice').Value:=Null; - FieldByName('BPNote').Value:=Trim(BPNote.Text); + FieldByName('BPPrice').Value := Null; + FieldByName('BPNote').Value := Trim(BPNote.Text); post; end; with ADOQueryCmd do begin Close; sql.Clear; - sql.Add('UPdate ML_Manage Set MLCF='''+Trim(BPCF.Text)+''',MLJWMD='''+Trim(CPMiDu.Text)+''''); - SQL.Add(' where SUBSTRING(MLNO,2,LEN(MLNO)-1)='''+Trim(ClientDataSet1.fieldbyname('BPCode').AsString)+''''); + sql.Add('UPdate ML_Manage Set MLCF=''' + Trim(BPCF.Text) + ''',MLJWMD=''' + Trim(CPMiDu.Text) + ''''); + SQL.Add(' where SUBSTRING(MLNO,2,LEN(MLNO)-1)=''' + Trim(ClientDataSet1.fieldbyname('BPCode').AsString) + ''''); sql.Add(' and isnull(GYType,'''')=''Ⱦɫ'' '); sql.Add(' and isnull(MLType,'''')=''Ⱦɫ'''); ExecSQL; end; //cxGrid1.Enabled:=true; - SClearData(Panel5,2); - BPMF.Text:='160'; - BPCF.Text:='100%P'; - FBPID:=''; - Button1.Caption:=''; - Panel5.Visible:=false; - TBDel.Visible:=False; + SClearData(Panel5, 2); + BPMF.Text := '160'; + BPCF.Text := '100%P'; + FBPID := ''; + Button1.Caption := ''; + Panel5.Visible := false; + TBDel.Visible := False; + TbCopy.Visible := False; ADOQueryCmd.Connection.CommitTrans; - except; + except + ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('ʧܣ','ʾ',0); + Application.MessageBox('ʧܣ', 'ʾ', 0); end; - Application.MessageBox('ɹ','ʾ'); + Application.MessageBox('ɹ', 'ʾ'); end; procedure TfrmBPZDY_LRPB.TPBLBClick(Sender: TObject); begin - frmCPTypePB:=TfrmCPTypePB.Create(self); + frmCPTypePB := TfrmCPTypePB.Create(self); with frmCPTypePB do begin - if ShowModal=1 then + if ShowModal = 1 then begin end; @@ -1087,28 +1117,29 @@ end; procedure TfrmBPZDY_LRPB.ToolButton1Click(Sender: TObject); begin ToolBar1.SetFocus; - Fint:='1'; - ModalResult:=1; + FInt := '1'; + ModalResult := 1; end; procedure TfrmBPZDY_LRPB.Button1KeyPress(Sender: TObject; var Key: Char); -var maxno:string; +var + maxno: string; begin - if key=#13 then + if Key = #13 then begin - if MXCode.Text='' then + if MXCode.Text = '' then begin - application.MessageBox('ϸŲΪ','ʾ'); + application.MessageBox('ϸŲΪ', 'ʾ'); exit; end; try ADOQueryCmd.Connection.BeginTrans; - if FBPID='' then + if FBPID = '' then begin - if GetLSNo(ADOQueryTemp,FBPID,'BP','BP_ZDY',3,1)=False then + if GetLSNo(ADOQueryTemp, FBPID, 'BP', 'BP_ZDY', 3, 1) = False then begin ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('ȡʧܣ','ʾ',0); + Application.MessageBox('ȡʧܣ', 'ʾ', 0); Exit; end; end; @@ -1116,7 +1147,7 @@ begin begin Close; sql.Clear; - sql.Add('select * from BP_ZDY where BPID='''+Trim(FBPID)+''''); + sql.Add('select * from BP_ZDY where BPID=''' + Trim(FBPID) + ''''); Open; end; if ADOQueryCmd.IsEmpty then @@ -1127,38 +1158,38 @@ begin begin ADOQueryCmd.Edit; end; - ADOQueryCmd.FieldByName('BPID').Value:=Trim(FBPID); - SSetsaveSqlNew(ADOQueryCmd,'BP_ZDY',panel5,2); - ADOQueryCmd.FieldByName('BPType').Value:=flagName; - ADOQueryCmd.FieldByName('BPFlag').Value:=flag; - ADOQueryCmd.FieldByName('valid').Value:='Y'; - ADOQueryCmd.FieldByName('CPID').Value:=trim(FCPID); - ADOQueryCmd.FieldByName('CPNo').Value:=trim(FCPNo); - ADOQueryCmd.FieldByName('CPName').Value:=trim(FCPName); - ADOQueryCmd.FieldByName('BPCode').Value:=trim(FCPNo)+trim(MXCode.Text); - ADOQueryCmd.FieldByName('BPName').Value:=trim(MXName.Text); + ADOQueryCmd.FieldByName('BPID').Value := Trim(FBPID); + SSetsaveSqlNew(ADOQueryCmd, 'BP_ZDY', panel5, 2); + ADOQueryCmd.FieldByName('BPType').Value := flagName; + ADOQueryCmd.FieldByName('BPFlag').Value := flag; + ADOQueryCmd.FieldByName('valid').Value := 'Y'; + ADOQueryCmd.FieldByName('CPID').Value := trim(FCPID); + ADOQueryCmd.FieldByName('CPNo').Value := trim(FCPNo); + ADOQueryCmd.FieldByName('CPName').Value := trim(FCPName); + ADOQueryCmd.FieldByName('BPCode').Value := trim(FCPNo) + trim(MXCode.Text); + ADOQueryCmd.FieldByName('BPName').Value := trim(MXName.Text); ADOQueryCmd.Post; with ADOQueryTemp do begin Close; sql.Clear; - sql.add('select * from BP_ZDY where BPCode='''+Trim(trim(FCPNo)+trim(MXCode.Text))+''''); - sql.Add(' and BPFlag='''+trim(flag)+''''); + sql.add('select * from BP_ZDY where BPCode=''' + Trim(trim(FCPNo) + trim(MXCode.Text)) + ''''); + sql.Add(' and BPFlag=''' + trim(flag) + ''''); Open; end; - if ADOQueryTemp.IsEmpty=False then + if ADOQueryTemp.IsEmpty = False then begin - if ADOQueryTemp.RecordCount>1 then + if ADOQueryTemp.RecordCount > 1 then begin with ADOQueryCmd do begin Close; sql.Clear; - SQL.Add('delete BP_ZDY where BPID='''+Trim(FBPID)+''''); + SQL.Add('delete BP_ZDY where BPID=''' + Trim(FBPID) + ''''); ExecSQL; end; ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('ظ','ʾ',0); + Application.MessageBox('ظ', 'ʾ', 0); Exit; end; end; @@ -1166,93 +1197,91 @@ begin begin Close; sql.Clear; - sql.add('select * from BP_ZDY where BPName='''+Trim(trim(FCPName)+trim(MXName.Text))+''''); - sql.add(' and isnull(BPMF,'''')='''+Trim(BPMF.Text)+''''); - sql.add(' and isnull(BPKZ,'''')='''+Trim(BPKZ.Text)+''''); - sql.add(' and isnull(BPJS,'''')='''+Trim(BPJS.Text)+''''); - sql.add(' and isnull(BPMiDu,'''')='''+Trim(BPMiDu.Text)+''''); - sql.Add(' and BPFlag='''+trim(flag)+''''); + sql.add('select * from BP_ZDY where BPName=''' + Trim(trim(FCPName) + trim(MXName.Text)) + ''''); + sql.add(' and isnull(BPMF,'''')=''' + Trim(BPMF.Text) + ''''); + sql.add(' and isnull(BPKZ,'''')=''' + Trim(BPKZ.Text) + ''''); + sql.add(' and isnull(BPJS,'''')=''' + Trim(BPJS.Text) + ''''); + sql.add(' and isnull(BPMiDu,'''')=''' + Trim(BPMiDu.Text) + ''''); + sql.Add(' and BPFlag=''' + trim(flag) + ''''); Open; end; - if ADOQueryTemp.IsEmpty=False then + if ADOQueryTemp.IsEmpty = False then begin - if ADOQueryTemp.RecordCount>1 then + if ADOQueryTemp.RecordCount > 1 then begin with ADOQueryCmd do begin Close; sql.Clear; - SQL.Add('delete BP_ZDY where BPID='''+Trim(FBPID)+''''); + SQL.Add('delete BP_ZDY where BPID=''' + Trim(FBPID) + ''''); ExecSQL; end; ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('ŷؾɴγɴظ','ʾ',0); + Application.MessageBox('ŷؾɴγɴظ', 'ʾ', 0); Exit; end; end; with ClientDataSet1 do begin - if Button1.Caption<>'ȷ޸' then - Append + if Button1.Caption <> 'ȷ޸' then + Append else - edit; - FieldByName('BPID').Value:=Trim(FBPID); - FieldByName('BPCode').Value:=Trim(MXCode.Text); - FieldByName('BPName').Value:=Trim(MXName.Text); - FieldByName('BPMF').Value:=Trim(BPMF.Text); - FieldByName('BPKZ').Value:=Trim(BPKZ.Text); - FieldByName('BPJS').Value:=Trim(BPJS.Text); - FieldByName('BPMiDu').Value:=Trim(BPMiDu.Text); - FieldByName('MXCode').Value:=Trim(MXCode.Text); - FieldByName('MXName').Value:=Trim(MXName.Text); + edit; + FieldByName('BPID').Value := Trim(FBPID); + FieldByName('BPCode').Value := Trim(MXCode.Text); + FieldByName('BPName').Value := Trim(MXName.Text); + FieldByName('BPMF').Value := Trim(BPMF.Text); + FieldByName('BPKZ').Value := Trim(BPKZ.Text); + FieldByName('BPJS').Value := Trim(BPJS.Text); + FieldByName('BPMiDu').Value := Trim(BPMiDu.Text); + FieldByName('MXCode').Value := Trim(MXCode.Text); + FieldByName('MXName').Value := Trim(MXName.Text); post; end; - MXCode.Text:=''; - MXName.Text:=''; - BPJS.Text:=''; - BPMF.Text:=''; - BPKZ.Text:=''; - BPMiDu.Text:=''; - FBPID:=''; + MXCode.Text := ''; + MXName.Text := ''; + BPJS.Text := ''; + BPMF.Text := ''; + BPKZ.Text := ''; + BPMiDu.Text := ''; + FBPID := ''; MXCode.SetFocus; ADOQueryCmd.Connection.CommitTrans; - except; + except + ; ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('ʧܣ','ʾ',0); + Application.MessageBox('ʧܣ', 'ʾ', 0); end; - Application.MessageBox('ɹ','ʾ'); + Application.MessageBox('ɹ', 'ʾ'); end; end; +//////////////////////////////////////////////////////////// +/// Ŀ¼ѡ procedure TfrmBPZDY_LRPB.cxDBTreeList1Click(Sender: TObject); begin InitGrid(); - TBDel.Visible:=False; - Panel5.Visible:=False; - if Order_Tree.FieldByName('CPLevel').AsInteger<3 then + TBDel.Visible := False; + TbCopy.Visible := False; + Panel5.Visible := False; + if Order_Tree.FieldByName('CPLevel').AsInteger < 3 then begin - // Panel5.Visible:=False; - TBAdd.Visible:=False; - end else + TBAdd.Visible := False; + end + else begin - //Panel5.Visible:=True; - //SClearData(Panel5,2); - // BPMF.Text:='160'; - //BPCF.Text:='100%P'; - // Button1.Caption:=''; - FBPID:=''; - FCPID:=Trim(Order_Tree.fieldbyname('CPID').AsString); - FCPNo:=Trim(Order_Tree.fieldbyname('CPNo').AsString); - FCPName:=Trim(Order_Tree.fieldbyname('CPName').AsString); - TBAdd.Visible:=True; - //MXCode.SetFocus; + FBPID := ''; + FCPID := Trim(Order_Tree.fieldbyname('CPID').AsString); + FCPNo := Trim(Order_Tree.fieldbyname('CPNo').AsString); + FCPName := Trim(Order_Tree.fieldbyname('CPName').AsString); + TBAdd.Visible := True; end; - Label16.Caption:=Trim(Order_Tree.fieldbyname('CPNo').AsString); + Label16.Caption := Trim(Order_Tree.fieldbyname('CPNo').AsString); end; procedure TfrmBPZDY_LRPB.MXCodeKeyPress(Sender: TObject; var Key: Char); begin - if Key=#13 then + if Key = #13 then begin MXName.SetFocus; end; @@ -1260,7 +1289,7 @@ end; procedure TfrmBPZDY_LRPB.MXNameKeyPress(Sender: TObject; var Key: Char); begin - if Key=#13 then + if Key = #13 then begin BPCF.SetFocus; end; @@ -1268,7 +1297,7 @@ end; procedure TfrmBPZDY_LRPB.BPJSKeyPress(Sender: TObject; var Key: Char); begin - if Key=#13 then + if Key = #13 then begin BPMF.SetFocus; end; @@ -1276,7 +1305,7 @@ end; procedure TfrmBPZDY_LRPB.BPMFKeyPress(Sender: TObject; var Key: Char); begin - if Key=#13 then + if Key = #13 then begin CPMiDu.SetFocus; end; @@ -1284,7 +1313,7 @@ end; procedure TfrmBPZDY_LRPB.BPKZKeyPress(Sender: TObject; var Key: Char); begin - if Key=#13 then + if Key = #13 then begin BPJS.SetFocus; end; @@ -1292,51 +1321,55 @@ end; procedure TfrmBPZDY_LRPB.BPMiDuKeyPress(Sender: TObject; var Key: Char); begin - if Key=#13 then + if Key = #13 then begin BPKZ.SetFocus; end; end; procedure TfrmBPZDY_LRPB.CYNameKeyPress(Sender: TObject; var Key: Char); -var CPID:string; +var + CPID: string; begin - if Key=#13 then + if Key = #13 then begin - if Trim(CYName.Text)='' then Exit; + if Trim(CYName.Text) = '' then + Exit; with ADOQuery2 do begin Close; sql.Clear; - sql.Add('select * from CP_YDang where CYName like '''+'%'+Trim(CYName.Text)+'%'+''''); + sql.Add('select * from CP_YDang where CYName like ''' + '%' + Trim(CYName.Text) + '%' + ''''); Open; end; - SCreateCDS20(ADOQuery2,ML_GX); - SInitCDSData20(ADOQuery2,ML_GX); + SCreateCDS20(ADOQuery2, ML_GX); + SInitCDSData20(ADOQuery2, ML_GX); end; end; procedure TfrmBPZDY_LRPB.CYNoKeyPress(Sender: TObject; var Key: Char); -var CPID:string; +var + CPID: string; begin - if Key=#13 then + if Key = #13 then begin - if Trim(CYNo.Text)='' then Exit; + if Trim(CYNo.Text) = '' then + Exit; with ADOQuery2 do begin Close; sql.Clear; - sql.Add('select * from CP_YDang where CYNo like '''+'%'+Trim(CYNo.Text)+'%'+''''); + sql.Add('select * from CP_YDang where CYNo like ''' + '%' + Trim(CYNo.Text) + '%' + ''''); Open; end; - SCreateCDS20(ADOQuery2,ML_GX); - SInitCDSData20(ADOQuery2,ML_GX); + SCreateCDS20(ADOQuery2, ML_GX); + SInitCDSData20(ADOQuery2, ML_GX); end; end; procedure TfrmBPZDY_LRPB.BPCFKeyPress(Sender: TObject; var Key: Char); begin - if Key=#13 then + if Key = #13 then begin BPMiDu.SetFocus; end; @@ -1344,7 +1377,7 @@ end; procedure TfrmBPZDY_LRPB.CPMiDuKeyPress(Sender: TObject; var Key: Char); begin - if Key=#13 then + if Key = #13 then begin BPPrice.SetFocus; end; @@ -1352,22 +1385,20 @@ end; procedure TfrmBPZDY_LRPB.FormDestroy(Sender: TObject); begin - frmBPZDY_LRPB:=nil; + frmBPZDY_LRPB := nil; end; -procedure TfrmBPZDY_LRPB.TV1FocusedRecordChanged( - Sender: TcxCustomGridTableView; APrevFocusedRecord, - AFocusedRecord: TcxCustomGridRecord; - ANewItemRecordFocusingChanged: Boolean); +procedure TfrmBPZDY_LRPB.TV1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean); begin - Panel5.Visible:=False; - TBAdd.Visible:=False; - TBDel.Visible:=False; + Panel5.Visible := False; + TBAdd.Visible := False; + TbCopy.Visible := False; + TBDel.Visible := False; end; procedure TfrmBPZDY_LRPB.BPPriceKeyPress(Sender: TObject; var Key: Char); begin - if Key=#13 then + if Key = #13 then begin BPNote.SetFocus; end; @@ -1375,11 +1406,36 @@ end; procedure TfrmBPZDY_LRPB.BPNoteKeyPress(Sender: TObject; var Key: Char); begin - if Key=#13 then + if Key = #13 then begin Button1.SetFocus; end; end; +procedure TfrmBPZDY_LRPB.TbCopyClick(Sender: TObject); +begin + + Panel5.Visible := True; + BPMF.Text := Trim(ClientDataSet1.fieldbyname('BPMF').AsString); + BPKZ.Text := Trim(ClientDataSet1.fieldbyname('BPKZ').AsString); + BPCF.Text := Trim(ClientDataSet1.fieldbyname('BPCF').AsString); + BPJS.Text := Trim(ClientDataSet1.fieldbyname('BPJS').AsString); + BPMiDu.Text := Trim(ClientDataSet1.fieldbyname('BPMiDu').AsString); + CPMiDu.Text := Trim(ClientDataSet1.fieldbyname('CPMiDu').AsString); + MXCode.Text := Trim(ClientDataSet1.FieldByName('MXCode').AsString); + MXName.Text := Trim(ClientDataSet1.FieldByName('MXName').AsString); + IFHS.Text := Trim(ClientDataSet1.FieldByName('IFHS').AsString); + BPPrice.Text := Trim(ClientDataSet1.FieldByName('BPPrice').AsString); + BPNote.Text := Trim(ClientDataSet1.FieldByName('BPNote').AsString); + FBPID := ''; + FCPID := Trim(ClientDataSet1.fieldbyname('CPID').AsString); + FCPNo := Trim(ClientDataSet1.fieldbyname('CPNo').AsString); + FCPName := Trim(ClientDataSet1.fieldbyname('CPName').AsString); + MXCode.SetFocus; + Button1.Caption := ''; + +end; + end. + diff --git a/样品新云翔(YPGLBOM.dll)/U_CPAdd.pas b/样品新云翔(YPGLBOM.dll)/U_CPAdd.pas index 8a45e17..4f7ff3b 100644 --- a/样品新云翔(YPGLBOM.dll)/U_CPAdd.pas +++ b/样品新云翔(YPGLBOM.dll)/U_CPAdd.pas @@ -336,6 +336,7 @@ type function ColJGSaveData(FMXCYID: string): Boolean; procedure Appenddata(); procedure XJGenXin(); + procedure ReadINIFile(); { Private declarations } public FCYID, FCYCode, FCPID, FCPNO, FCPName: string; @@ -2701,6 +2702,17 @@ begin end; end; +procedure TfrmCPAdd.ReadINIFile(); +var + programIni:Tinifile; //ļ + FileName:string; +begin + FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI'; + programIni:=Tinifile.create(FileName); + server:=programIni.ReadString('SERVER','ַ','127.0.0.1'); + programIni.Free; +end; + procedure TfrmCPAdd.ToolButton3Click(Sender: TObject); var fHandle: THandle; diff --git a/样品新云翔(YPGLBOM.dll)/U_CPAdd_ZLR.pas b/样品新云翔(YPGLBOM.dll)/U_CPAdd_ZLR.pas index b11370c..c24547e 100644 --- a/样品新云翔(YPGLBOM.dll)/U_CPAdd_ZLR.pas +++ b/样品新云翔(YPGLBOM.dll)/U_CPAdd_ZLR.pas @@ -305,6 +305,7 @@ type procedure Appenddata(); procedure XJGenXin(); procedure MXGYSSave(); + procedure ReadINIFile(); { Private declarations } public FCYID, FCYCode, FCPID, FCPNO, FCPName: string; @@ -2386,6 +2387,17 @@ begin end; end; +procedure TfrmCPAdd_ZLR.ReadINIFile(); +var + programIni:Tinifile; //ļ + FileName:string; +begin + FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI'; + programIni:=Tinifile.create(FileName); + server:=programIni.ReadString('SERVER','ַ','127.0.0.1'); + programIni.Free; +end; + procedure TfrmCPAdd_ZLR.ToolButton12Click(Sender: TObject); var fHandle: THandle; diff --git a/样品新云翔(YPGLBOM.dll)/U_GetDllForm.pas b/样品新云翔(YPGLBOM.dll)/U_GetDllForm.pas index 45106cf..7030039 100644 --- a/样品新云翔(YPGLBOM.dll)/U_GetDllForm.pas +++ b/样品新云翔(YPGLBOM.dll)/U_GetDllForm.pas @@ -20,7 +20,7 @@ uses U_ZdyAttachGYSX_SJG, U_BPZdy_LRTJ, U_MLMangeTJ, U_BPZdy_LRYH, U_BPZdy_LRPB_M, U_BPZdy_LRSHK_M, U_BPZdy_Panel_RSCX, U_BPZdy_Panel_TJCX, U_MLMangeYH, U_BPZdy_LRXH_M, U_MLMangeXH, U_BPZdy_TJHXK_M3, U_HXKYH, U_HXKTJ, U_HXKYHK, - U_GYSelect, U_MLMange_XH, U_MLHZGL; + U_GYSelect, U_MLMange_XH, U_MLHZGL,U_iniParam; ///////////////////////////////////////////////////////////////// // ˵:ȡDllеô // @@ -67,23 +67,32 @@ begin SetLength(user, 255); SetLength(pswd, 255); - server := '106.14.113.234,7781'; - dtbase := 'yunxiangdata'; - user := 'sa'; - pswd := 'rightsoft@123'; - DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server; - DConString := DataBaseStr; + if Trim(DataBaseStr) = '' then + begin + server := '106.14.113.234,7781'; + dtbase := 'yunxiangdata'; + user := 'sa'; + pswd := 'rightsoft@123'; + DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server; + end + else + begin + DConString := DataBaseStr; + end; // DParameters1 := 'Ȩ'; // DParameters3:='1'; + if not ConnData() then begin result := 0; exit; end; + if IsINIFile() then ReadINIFile() else WriteINIFile; + // 崰 ״̬ if WinStyle = 0 then begin diff --git a/样品新云翔(YPGLBOM.dll)/U_iniParam.pas b/样品新云翔(YPGLBOM.dll)/U_iniParam.pas new file mode 100644 index 0000000..af3354e --- /dev/null +++ b/样品新云翔(YPGLBOM.dll)/U_iniParam.pas @@ -0,0 +1,64 @@ +unit U_iniParam; + +interface +uses + IniFiles,SysUtils; +var + Filename:string; //ļ + iParam2:integer; + bParam1:Boolean; + bParam2:Boolean; + SCXFlag:String; // ݴ˱־ȡǰ׺ ܰĸ 1,2 + SCXCount:String; //̨ + PortNoStr:string;//˿ں + DllName:string;//˿Dllļ + Function IsINIFile():Boolean; //жInIļǷ + procedure ReadINIFile(); + procedure WriteINIFile(); +implementation +/////////////////////////////////////////////////////////////////// + //ȡiniļò + // +//////////////////////////////////////////////////////////////////// +procedure ReadINIFile(); +var + programIni:Tinifile; //ļ +begin + FileName:=ExtractFilePath(Paramstr(0))+'File.INI'; + programIni:=Tinifile.create(FileName); + SCXFlag:=programIni.ReadString('','̨־','1'); + SCXCount:=programIni.ReadString('','̨','1'); + PortNoStr:=programIni.ReadString('','˿ں','com1'); + DllName:=programIni.ReadString('','˿Dllļ','JZCRS323C.DLL'); + programIni.Free; +end; + +////////////////////////////////////////////////////////////////// + //дϢINIļ + // +////////////////////////////////////////////////////////////////// +procedure WriteINIFile(); +var + programIni:Tinifile; //ļ +begin + FileName:=ExtractFilePath(Paramstr(0))+'File.INI'; + programIni:=Tinifile.create(FileName); + programIni.WriteString('','̨־',SCXFlag); + programIni.WriteString('','̨',SCXCount); + programIni.WriteString('','˿ں',PortNoStr); + programIni.WriteString('','˿Dllļ',DllName); + programIni.Free; +end; +////////////////////////////////////////////////////////////////// + //жInIļǷ +////////////////////////////////////////////////////////////////// + Function IsINIFile():Boolean; + begin + FileName:=ExtractFilePath(Paramstr(0))+'File.INI'; + if FileExists(FileName) then + Result:=true + else + Result:=false; + end; + +end. diff --git a/样品新云翔(YPGLBOM.dll)/YPGL.res b/样品新云翔(YPGLBOM.dll)/YPGL.res deleted file mode 100644 index 2d6f24c3d9a870364649288b1c0306b551768325..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 876 zcmaJ=Jx{|h5Pc?9%tTwkz(g}L7BMg|6oiDt01W(ruz1OWgw!H+AXAn~{FzE^Brlox z9gK_}J0Q&SIVr99IQ9AN-MzD~Rtx|M;amX24SU~e>Jc?cYMoANyAd5SNQg5+p~aQP zp5HA8_(Prt$CV+GqpB(v{1D!`;JAjld@@+K+i61a|MTdsd{~!%b1ms_KJEh}cpe(` z6jA?@e29>sU}iiwp;b>~TL@2U!O)h%Yr)7`8+a;b=@mD^tI-VbODr7!U{0?gh%d@~e3Ro)^HNMvvU1UHt)HYrq~&L`&fQ16Y1SeYiaObZ>3v kZ4W@7aBc_JIL8%khzs1(H@5yR{A*B1l9s#*|B4j80N@tIJOBUy diff --git a/样品新云翔(YPGLBOM.dll)/YPGLBOM.dpr b/样品新云翔(YPGLBOM.dll)/YPGLBOM.dpr index 1200476..d5929f5 100644 --- a/样品新云翔(YPGLBOM.dll)/YPGLBOM.dpr +++ b/样品新云翔(YPGLBOM.dll)/YPGLBOM.dpr @@ -53,15 +53,6 @@ uses U_RTFun in '..\Z99Dependency\RTFunAndForm\Fun\U_RTFun.pas', U_MLMangeRSSel in '..\ƻ(DyeingFinishingPlan.dll)\U_MLMangeRSSel.pas' {frmMLMangeRS}; -// U_SelfForm in '..\..\SelfForm\U_SelfForm.pas', - // U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField}, - // U_SelPrintField in '..\..\SelfForm\U_SelPrintField.pas' {frmSelPrintField}, - // U_SelPrintFieldNew in '..\..\SelfForm\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew}, - //U_FormPas in '..\CommonPas\formPas\U_FormPas.pas', - //U_CxGridSet in '..\CommonPas\cxgridPas\U_CxGridSet.pas'; - -//U_RSFormPas in '..\CommonPas\RSCommon\U_RSFormPas.pas'; - {$R *.res} procedure DllEnterPoint(dwReason: DWORD);far;stdcall; diff --git a/样品新云翔(YPGLBOM.dll)/YPGLBOM.res b/样品新云翔(YPGLBOM.dll)/YPGLBOM.res index 2d6f24c3d9a870364649288b1c0306b551768325..e84b2e499a4b82a491637e2e1c9af30b2b2b217e 100644 GIT binary patch literal 876 zcmZuw!D`h&6g_zf7>LwY5ZYZIp|tKaWGUE+#o|Ky4@H`-JS4Nzlr9Wp(O-Eb8{ux! zmA@f$)8*S$Xz_aPBzZo;OU}$abIzR^W-fGqaM-|cx^h3;?eYs$&5H8 z0z_;XtoeUb06$b!-?3#%ROq^nf^EV&?K`&pz7$EeX)&ehBaxhut$18FHn8F_mT!)B zpss6?tH0bEGDJs5!&oEj6{5FgISi0zI4+8_^3Xf#rp+dMWmyy-Jx{1loGVVt&nxbn zo2SK@FNkZ&JTHd{MDlIQqmGg9^?q=HZRb*#roJ9A7r1ou{dNBBj`FTw54OOZ6W&KX zw+XlQUHW`6a30B4>fEjjJZ{?QBu$YF2J*~Hqk$6|Ph>FEVh5Ut$S3dPq0>MPw068N zJ?FZBzm8nmoJL_ivpi>^aVuz;i`3HEL?YiC-Up)@_@bx0Bh!;{Lq;qXr~=gyU8rhU zh8McrfG!{7>oUf{F9Wb+cv!=4=EQ-4zn5W0&o3^u(jVGAgxY-x^yjN5lpYZwaZYr^ qHF2Y=cTc&C7li5t-s3gi;REpoC+x>qe;4)|0?cNSe--wM0{j7-{Ly3p literal 876 zcmaJ=Jx{|h5Pc?9%tTwkz(g}L7BMg|6oiDt01W(ruz1OWgw!H+AXAn~{FzE^Brlox z9gK_}J0Q&SIVr99IQ9AN-MzD~Rtx|M;amX24SU~e>Jc?cYMoANyAd5SNQg5+p~aQP zp5HA8_(Prt$CV+GqpB(v{1D!`;JAjld@@+K+i61a|MTdsd{~!%b1ms_KJEh}cpe(` z6jA?@e29>sU}iiwp;b>~TL@2U!O)h%Yr)7`8+a;b=@mD^tI-VbODr7!U{0?gh%d@~e3Ro)^HNMvvU1UHt)HYrq~&L`&fQ16Y1SeYiaObZ>3v kZ4W@7aBc_JIL8%khzs1(H@5yR{A*B1l9s#*|B4j80N@tIJOBUy diff --git a/样品新云翔(YPGLBOM.dll)/testDll.res b/样品新云翔(YPGLBOM.dll)/testDll.res deleted file mode 100644 index 2d6f24c3d9a870364649288b1c0306b551768325..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 876 zcmaJ=Jx{|h5Pc?9%tTwkz(g}L7BMg|6oiDt01W(ruz1OWgw!H+AXAn~{FzE^Brlox z9gK_}J0Q&SIVr99IQ9AN-MzD~Rtx|M;amX24SU~e>Jc?cYMoANyAd5SNQg5+p~aQP zp5HA8_(Prt$CV+GqpB(v{1D!`;JAjld@@+K+i61a|MTdsd{~!%b1ms_KJEh}cpe(` z6jA?@e29>sU}iiwp;b>~TL@2U!O)h%Yr)7`8+a;b=@mD^tI-VbODr7!U{0?gh%d@~e3Ro)^HNMvvU1UHt)HYrq~&L`&fQ16Y1SeYiaObZ>3v kZ4W@7aBc_JIL8%khzs1(H@5yR{A*B1l9s#*|B4j80N@tIJOBUy