++
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:75k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{65A39231-6133-11D1-BAA2-444553540000}#1.0#0"; "VSLIGHT6.OCX"
  3. Object = "{D76D7128-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "VSOCX7.OCX"
  4. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  5. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  6. Begin VB.Form Khgl_Title 
  7.    Caption         =   "考核类别设置"
  8.    ClientHeight    =   7110
  9.    ClientLeft      =   60
  10.    ClientTop       =   345
  11.    ClientWidth     =   10290
  12.    HelpContextID   =   2312006
  13.    Icon            =   "考核类别设置.frx":0000
  14.    KeyPreview      =   -1  'True
  15.    LinkTopic       =   "Form2"
  16.    ScaleHeight     =   7110
  17.    ScaleWidth      =   10290
  18.    StartUpPosition =   2  '屏幕中心
  19.    Begin MSComctlLib.ImageList ImageList2 
  20.       Left            =   780
  21.       Top             =   750
  22.       _ExtentX        =   1005
  23.       _ExtentY        =   1005
  24.       BackColor       =   -2147483643
  25.       ImageWidth      =   16
  26.       ImageHeight     =   16
  27.       MaskColor       =   12632256
  28.       _Version        =   393216
  29.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  30.          NumListImages   =   4
  31.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  32.             Picture         =   "考核类别设置.frx":1042
  33.             Key             =   "T"
  34.          EndProperty
  35.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  36.             Picture         =   "考核类别设置.frx":191C
  37.             Key             =   "C"
  38.          EndProperty
  39.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  40.             Picture         =   "考核类别设置.frx":21F6
  41.             Key             =   "Cl"
  42.          EndProperty
  43.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  44.             Picture         =   "考核类别设置.frx":3248
  45.             Key             =   "O"
  46.          EndProperty
  47.       EndProperty
  48.    End
  49.    Begin VB.PictureBox picSplitter 
  50.       BackColor       =   &H00C0C0C0&
  51.       BorderStyle     =   0  'None
  52.       FillColor       =   &H00808080&
  53.       BeginProperty Font 
  54.          Name            =   "MS Sans Serif"
  55.          Size            =   8.25
  56.          Charset         =   0
  57.          Weight          =   400
  58.          Underline       =   0   'False
  59.          Italic          =   0   'False
  60.          Strikethrough   =   0   'False
  61.       EndProperty
  62.       Height          =   6360
  63.       Left            =   2850
  64.       ScaleHeight     =   2769.417
  65.       ScaleMode       =   0  'User
  66.       ScaleWidth      =   468
  67.       TabIndex        =   14
  68.       Top             =   660
  69.       Visible         =   0   'False
  70.       Width           =   45
  71.    End
  72.    Begin MSComctlLib.TreeView TreeView 
  73.       Height          =   6435
  74.       Left            =   30
  75.       TabIndex        =   13
  76.       Top             =   660
  77.       Width           =   2775
  78.       _ExtentX        =   4895
  79.       _ExtentY        =   11351
  80.       _Version        =   393217
  81.       Indentation     =   617
  82.       LabelEdit       =   1
  83.       Style           =   7
  84.       ImageList       =   "ImageList2"
  85.       Appearance      =   1
  86.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  87.          Name            =   "宋体"
  88.          Size            =   9
  89.          Charset         =   134
  90.          Weight          =   400
  91.          Underline       =   0   'False
  92.          Italic          =   0   'False
  93.          Strikethrough   =   0   'False
  94.       EndProperty
  95.    End
  96.    Begin TabDlg.SSTab StTab 
  97.       Height          =   6435
  98.       Left            =   2880
  99.       TabIndex        =   10
  100.       Top             =   660
  101.       Width           =   7380
  102.       _ExtentX        =   13018
  103.       _ExtentY        =   11351
  104.       _Version        =   393216
  105.       Style           =   1
  106.       Tabs            =   2
  107.       TabHeight       =   520
  108.       TabCaption(0)   =   "列表视图"
  109.       TabPicture(0)   =   "考核类别设置.frx":35E2
  110.       Tab(0).ControlEnabled=   -1  'True
  111.       Tab(0).Control(0)=   "CzxsGrid"
  112.       Tab(0).Control(0).Enabled=   0   'False
  113.       Tab(0).ControlCount=   1
  114.       TabCaption(1)   =   "单张视图"
  115.       TabPicture(1)   =   "考核类别设置.frx":35FE
  116.       Tab(1).ControlEnabled=   0   'False
  117.       Tab(1).Control(0)=   "Lbl_codescheme"
  118.       Tab(1).Control(1)=   "TsLabel(1)"
  119.       Tab(1).Control(2)=   "TsLabel(0)"
  120.       Tab(1).Control(3)=   "Label1(7)"
  121.       Tab(1).Control(4)=   "TsLabel(2)"
  122.       Tab(1).Control(5)=   "TsLabel(3)"
  123.       Tab(1).Control(6)=   "TsLabel(4)"
  124.       Tab(1).Control(7)=   "TsLabel(6)"
  125.       Tab(1).Control(8)=   "TsLabel(5)"
  126.       Tab(1).Control(9)=   "BcCommand"
  127.       Tab(1).Control(10)=   "LrText(0)"
  128.       Tab(1).Control(11)=   "QxCommand"
  129.       Tab(1).Control(12)=   "LrText(1)"
  130.       Tab(1).Control(13)=   "LrText(2)"
  131.       Tab(1).Control(14)=   "LrText(3)"
  132.       Tab(1).Control(15)=   "LrText(4)"
  133.       Tab(1).Control(16)=   "LrText(5)"
  134.       Tab(1).Control(17)=   "Opt_LockFlag(0)"
  135.       Tab(1).Control(18)=   "Opt_LockFlag(1)"
  136.       Tab(1).Control(19)=   "Ydcommand1(2)"
  137.       Tab(1).Control(20)=   "Ydcommand1(3)"
  138.       Tab(1).ControlCount=   21
  139.       Begin VB.CommandButton Ydcommand1 
  140.          Height          =   300
  141.          Index           =   3
  142.          Left            =   -70725
  143.          Picture         =   "考核类别设置.frx":361A
  144.          Style           =   1  'Graphical
  145.          TabIndex        =   17
  146.          Top             =   1680
  147.          Visible         =   0   'False
  148.          Width           =   300
  149.       End
  150.       Begin VB.CommandButton Ydcommand1 
  151.          Height          =   300
  152.          Index           =   2
  153.          Left            =   -70725
  154.          Picture         =   "考核类别设置.frx":39A4
  155.          Style           =   1  'Graphical
  156.          TabIndex        =   16
  157.          Top             =   1320
  158.          Visible         =   0   'False
  159.          Width           =   300
  160.       End
  161.       Begin VB.OptionButton Opt_LockFlag 
  162.          Caption         =   "上限封闭"
  163.          Height          =   255
  164.          Index           =   1
  165.          Left            =   -72405
  166.          TabIndex        =   9
  167.          Top             =   2873
  168.          Width           =   1095
  169.       End
  170.       Begin VB.OptionButton Opt_LockFlag 
  171.          Caption         =   "下限封闭"
  172.          Height          =   255
  173.          Index           =   0
  174.          Left            =   -73530
  175.          TabIndex        =   8
  176.          Top             =   2873
  177.          Width           =   1095
  178.       End
  179.       Begin VB.TextBox LrText 
  180.          Height          =   300
  181.          Index           =   5
  182.          Left            =   -73530
  183.          TabIndex        =   5
  184.          Text            =   "5"
  185.          Top             =   2460
  186.          Width           =   3135
  187.       End
  188.       Begin VB.TextBox LrText 
  189.          Height          =   300
  190.          Index           =   4
  191.          Left            =   -73530
  192.          TabIndex        =   4
  193.          Text            =   "4"
  194.          Top             =   2070
  195.          Width           =   3135
  196.       End
  197.       Begin VB.TextBox LrText 
  198.          Height          =   300
  199.          Index           =   3
  200.          Left            =   -73545
  201.          TabIndex        =   3
  202.          Text            =   "3"
  203.          Top             =   1665
  204.          Width           =   2835
  205.       End
  206.       Begin VB.TextBox LrText 
  207.          Height          =   270
  208.          Index           =   2
  209.          Left            =   -73545
  210.          TabIndex        =   2
  211.          Text            =   "2"
  212.          Top             =   1305
  213.          Width           =   2835
  214.       End
  215.       Begin VB.TextBox LrText 
  216.          Height          =   300
  217.          Index           =   1
  218.          Left            =   -73530
  219.          TabIndex        =   1
  220.          Text            =   "1"
  221.          Top             =   930
  222.          Width           =   3135
  223.       End
  224.       Begin VB.CommandButton QxCommand 
  225.          Cancel          =   -1  'True
  226.          Caption         =   "取消(&C)"
  227.          Height          =   300
  228.          Left            =   -71580
  229.          TabIndex        =   7
  230.          Top             =   3810
  231.          Width           =   1120
  232.       End
  233.       Begin VB.TextBox LrText 
  234.          Height          =   300
  235.          Index           =   0
  236.          Left            =   -73530
  237.          TabIndex        =   0
  238.          Text            =   "0"
  239.          Top             =   540
  240.          Width           =   1618
  241.       End
  242.       Begin VB.CommandButton BcCommand 
  243.          Caption         =   "保存(&S)"
  244.          Height          =   300
  245.          Left            =   -72810
  246.          TabIndex        =   6
  247.          Top             =   3810
  248.          Width           =   1120
  249.       End
  250.       Begin VSFlex8Ctl.VSFlexGrid CzxsGrid 
  251.          Height          =   5835
  252.          Left            =   120
  253.          TabIndex        =   15
  254.          Top             =   480
  255.          Width           =   7155
  256.          _ExtentX        =   12621
  257.          _ExtentY        =   10292
  258.          Appearance      =   1
  259.          BorderStyle     =   1
  260.          Enabled         =   -1  'True
  261.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  262.             Name            =   "宋体"
  263.             Size            =   9
  264.             Charset         =   134
  265.             Weight          =   400
  266.             Underline       =   0   'False
  267.             Italic          =   0   'False
  268.             Strikethrough   =   0   'False
  269.          EndProperty
  270.          MousePointer    =   0
  271.          BackColor       =   -2147483643
  272.          ForeColor       =   -2147483640
  273.          BackColorFixed  =   -2147483633
  274.          ForeColorFixed  =   -2147483630
  275.          BackColorSel    =   -2147483635
  276.          ForeColorSel    =   -2147483634
  277.          BackColorBkg    =   8421504
  278.          BackColorAlternate=   -2147483643
  279.          GridColor       =   -2147483633
  280.          GridColorFixed  =   -2147483632
  281.          TreeColor       =   -2147483632
  282.          FloodColor      =   192
  283.          SheetBorder     =   -2147483642
  284.          FocusRect       =   1
  285.          HighLight       =   1
  286.          AllowSelection  =   -1  'True
  287.          AllowBigSelection=   -1  'True
  288.          AllowUserResizing=   0
  289.          SelectionMode   =   0
  290.          GridLines       =   1
  291.          GridLinesFixed  =   2
  292.          GridLineWidth   =   1
  293.          Rows            =   5000
  294.          Cols            =   10
  295.          FixedRows       =   1
  296.          FixedCols       =   0
  297.          RowHeightMin    =   0
  298.          RowHeightMax    =   0
  299.          ColWidthMin     =   0
  300.          ColWidthMax     =   0
  301.          ExtendLastCol   =   0   'False
  302.          FormatString    =   ""
  303.          ScrollTrack     =   0   'False
  304.          ScrollBars      =   3
  305.          ScrollTips      =   0   'False
  306.          MergeCells      =   0
  307.          MergeCompare    =   0
  308.          AutoResize      =   -1  'True
  309.          AutoSizeMode    =   0
  310.          AutoSearch      =   0
  311.          MultiTotals     =   -1  'True
  312.          SubtotalPosition=   1
  313.          OutlineBar      =   0
  314.          OutlineCol      =   0
  315.          Ellipsis        =   0
  316.          ExplorerBar     =   0
  317.          PicturesOver    =   0   'False
  318.          FillStyle       =   0
  319.          RightToLeft     =   0   'False
  320.          PictureType     =   0
  321.          TabBehavior     =   0
  322.          OwnerDraw       =   0
  323.          Editable        =   0   'False
  324.          ShowComboButton =   -1  'True
  325.          WordWrap        =   0   'False
  326.          TextStyle       =   0
  327.          TextStyleFixed  =   0
  328.          OleDragMode     =   0
  329.          OleDropMode     =   0
  330.          DataMode        =   0
  331.          VirtualData     =   -1  'True
  332.       End
  333.       Begin VB.Label TsLabel 
  334.          AutoSize        =   -1  'True
  335.          Caption         =   "备注:"
  336.          Height          =   180
  337.          Index           =   5
  338.          Left            =   -74445
  339.          TabIndex        =   26
  340.          Top             =   2520
  341.          Width           =   450
  342.       End
  343.       Begin VB.Label TsLabel 
  344.          AutoSize        =   -1  'True
  345.          Caption         =   "封闭类型:"
  346.          Height          =   180
  347.          Index           =   6
  348.          Left            =   -74445
  349.          TabIndex        =   25
  350.          Top             =   2910
  351.          Width           =   810
  352.       End
  353.       Begin VB.Label TsLabel 
  354.          AutoSize        =   -1  'True
  355.          Caption         =   "保留小数:"
  356.          Height          =   180
  357.          Index           =   4
  358.          Left            =   -74445
  359.          TabIndex        =   24
  360.          Top             =   2130
  361.          Width           =   810
  362.       End
  363.       Begin VB.Label TsLabel 
  364.          AutoSize        =   -1  'True
  365.          Caption         =   "测评规则:"
  366.          Height          =   180
  367.          Index           =   3
  368.          Left            =   -74445
  369.          TabIndex        =   23
  370.          Top             =   1740
  371.          Width           =   810
  372.       End
  373.       Begin VB.Label TsLabel 
  374.          AutoSize        =   -1  'True
  375.          Caption         =   "创建时间:"
  376.          Height          =   180
  377.          Index           =   2
  378.          Left            =   -74445
  379.          TabIndex        =   22
  380.          Top             =   1350
  381.          Width           =   810
  382.       End
  383.       Begin VB.Label Label1 
  384.          AutoSize        =   -1  'True
  385.          Caption         =   "编码方案:"
  386.          Height          =   180
  387.          Index           =   7
  388.          Left            =   -74445
  389.          TabIndex        =   21
  390.          Top             =   3270
  391.          Width           =   810
  392.       End
  393.       Begin VB.Label TsLabel 
  394.          AutoSize        =   -1  'True
  395.          Caption         =   "类别编码:"
  396.          Height          =   180
  397.          Index           =   0
  398.          Left            =   -74445
  399.          TabIndex        =   20
  400.          Top             =   600
  401.          Width           =   810
  402.       End
  403.       Begin VB.Label TsLabel 
  404.          AutoSize        =   -1  'True
  405.          Caption         =   "类别名称:"
  406.          Height          =   180
  407.          Index           =   1
  408.          Left            =   -74445
  409.          TabIndex        =   19
  410.          Top             =   990
  411.          Width           =   810
  412.       End
  413.       Begin VB.Label Lbl_codescheme 
  414.          AutoSize        =   -1  'True
  415.          Height          =   180
  416.          Left            =   -73530
  417.          TabIndex        =   18
  418.          Top             =   3270
  419.          Width           =   1530
  420.       End
  421.    End
  422.    Begin MSComctlLib.Toolbar SzToolbar 
  423.       Align           =   1  'Align Top
  424.       Height          =   570
  425.       Left            =   0
  426.       TabIndex        =   11
  427.       Top             =   0
  428.       Width           =   10290
  429.       _ExtentX        =   18150
  430.       _ExtentY        =   1005
  431.       ButtonWidth     =   820
  432.       ButtonHeight    =   953
  433.       AllowCustomize  =   0   'False
  434.       Appearance      =   1
  435.       Style           =   1
  436.       ImageList       =   "ImageList1"
  437.       _Version        =   393216
  438.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  439.          NumButtons      =   20
  440.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  441.             Caption         =   "设置"
  442.             Key             =   "ymsz"
  443.             ImageKey        =   "sz"
  444.          EndProperty
  445.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  446.             Caption         =   "打印"
  447.             Key             =   "dy"
  448.             Object.ToolTipText     =   "点击或按Ctrl+P打印表格"
  449.             ImageKey        =   "dy"
  450.          EndProperty
  451.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  452.             Caption         =   "预览"
  453.             Key             =   "yl"
  454.             ImageKey        =   "yl"
  455.          EndProperty
  456.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  457.             Style           =   3
  458.          EndProperty
  459.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  460.             Caption         =   "增加"
  461.             Key             =   "zj"
  462.             Object.ToolTipText     =   "点击或按Ctrl+A增加记录"
  463.             ImageKey        =   "xz"
  464.          EndProperty
  465.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  466.             Caption         =   "修改"
  467.             Key             =   "xg"
  468.             ImageKey        =   "xg"
  469.          EndProperty
  470.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  471.             Caption         =   "删除"
  472.             Key             =   "sc"
  473.             Object.ToolTipText     =   "点击或按Ctrl+D删除当前记录"
  474.             ImageKey        =   "sc"
  475.          EndProperty
  476.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  477.             Style           =   3
  478.          EndProperty
  479.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  480.             Caption         =   "刷新"
  481.             Key             =   "sx"
  482.             ImageKey        =   "sx"
  483.          EndProperty
  484.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  485.             Style           =   3
  486.          EndProperty
  487.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  488.             Caption         =   "指标"
  489.             Key             =   "zb"
  490.             ImageKey        =   "zb"
  491.          EndProperty
  492.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  493.             Caption         =   "要素"
  494.             Key             =   "ys"
  495.             ImageKey        =   "ys"
  496.          EndProperty
  497.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  498.             Caption         =   "测评"
  499.             Key             =   "cp"
  500.             ImageKey        =   "cp"
  501.          EndProperty
  502.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  503.             Caption         =   "对象"
  504.             Key             =   "dx"
  505.             ImageKey        =   "dx"
  506.          EndProperty
  507.          BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  508.             Caption         =   "关闭"
  509.             Key             =   "gb"
  510.             ImageKey        =   "gb"
  511.          EndProperty
  512.          BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  513.             Style           =   3
  514.          EndProperty
  515.          BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  516.             Caption         =   "拷贝"
  517.             Key             =   "kb"
  518.             ImageKey        =   "kb"
  519.          EndProperty
  520.          BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  521.             Style           =   3
  522.          EndProperty
  523.          BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  524.             Caption         =   "帮助"
  525.             Key             =   "bz"
  526.             ImageKey        =   "bz"
  527.          EndProperty
  528.          BeginProperty Button20 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  529.             Caption         =   "退出"
  530.             Key             =   "fh"
  531.             ImageKey        =   "tc"
  532.          EndProperty
  533.       EndProperty
  534.       BorderStyle     =   1
  535.       Begin MSComctlLib.Toolbar GsToolbar 
  536.          Height          =   540
  537.          Left            =   7800
  538.          TabIndex        =   12
  539.          Top             =   0
  540.          Width           =   2475
  541.          _ExtentX        =   4366
  542.          _ExtentY        =   953
  543.          ButtonWidth     =   1455
  544.          ButtonHeight    =   953
  545.          AllowCustomize  =   0   'False
  546.          Appearance      =   1
  547.          Style           =   1
  548.          ImageList       =   "ImageList1"
  549.          _Version        =   393216
  550.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  551.             NumButtons      =   3
  552.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  553.                Caption         =   "保存格式"
  554.                Key             =   "bcgs"
  555.                ImageKey        =   "bcgs"
  556.             EndProperty
  557.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  558.                Caption         =   "默认列宽"
  559.                Key             =   "hfmrgs"
  560.                ImageKey        =   "mrlk"
  561.             EndProperty
  562.             BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  563.                Caption         =   "显示项目"
  564.                Key             =   "szxsxm"
  565.                ImageKey        =   "xsxm"
  566.             EndProperty
  567.          EndProperty
  568.       End
  569.    End
  570.    Begin MSComctlLib.ImageList ImageList1 
  571.       Left            =   2070
  572.       Top             =   480
  573.       _ExtentX        =   1005
  574.       _ExtentY        =   1005
  575.       BackColor       =   -2147483643
  576.       ImageWidth      =   16
  577.       ImageHeight     =   16
  578.       MaskColor       =   12632256
  579.       _Version        =   393216
  580.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  581.          NumListImages   =   35
  582.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  583.             Picture         =   "考核类别设置.frx":3D2E
  584.             Key             =   "sz"
  585.          EndProperty
  586.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  587.             Picture         =   "考核类别设置.frx":40C8
  588.             Key             =   "dy"
  589.          EndProperty
  590.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  591.             Picture         =   "考核类别设置.frx":4462
  592.             Key             =   "yl"
  593.          EndProperty
  594.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  595.             Picture         =   "考核类别设置.frx":47FC
  596.             Key             =   "xg"
  597.          EndProperty
  598.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  599.             Picture         =   "考核类别设置.frx":4B96
  600.             Key             =   "zh"
  601.          EndProperty
  602.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  603.             Picture         =   "考核类别设置.frx":4F30
  604.             Key             =   "sh"
  605.          EndProperty
  606.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  607.             Picture         =   "考核类别设置.frx":52CA
  608.             Key             =   "bc"
  609.          EndProperty
  610.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  611.             Picture         =   "考核类别设置.frx":5664
  612.             Key             =   "fq"
  613.          EndProperty
  614.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  615.             Picture         =   "考核类别设置.frx":59FE
  616.             Key             =   "bz"
  617.          EndProperty
  618.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  619.             Picture         =   "考核类别设置.frx":5D98
  620.             Key             =   "tc"
  621.          EndProperty
  622.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  623.             Picture         =   "考核类别设置.frx":6132
  624.             Key             =   "bcgs"
  625.          EndProperty
  626.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  627.             Picture         =   "考核类别设置.frx":64CC
  628.             Key             =   "mrlk"
  629.          EndProperty
  630.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  631.             Picture         =   "考核类别设置.frx":6866
  632.             Key             =   "xsxm"
  633.          EndProperty
  634.          BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  635.             Picture         =   "考核类别设置.frx":6C00
  636.             Key             =   "first"
  637.          EndProperty
  638.          BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  639.             Picture         =   "考核类别设置.frx":6F9A
  640.             Key             =   "prev"
  641.          EndProperty
  642.          BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  643.             Picture         =   "考核类别设置.frx":7334
  644.             Key             =   "next"
  645.          EndProperty
  646.          BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  647.             Picture         =   "考核类别设置.frx":76CE
  648.             Key             =   "last"
  649.          EndProperty
  650.          BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  651.             Picture         =   "考核类别设置.frx":7A68
  652.             Key             =   "xx"
  653.          EndProperty
  654.          BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  655.             Picture         =   "考核类别设置.frx":7E02
  656.             Key             =   "define"
  657.          EndProperty
  658.          BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  659.             Picture         =   "考核类别设置.frx":819C
  660.             Key             =   "exec"
  661.          EndProperty
  662.          BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  663.             Picture         =   "考核类别设置.frx":8536
  664.             Key             =   "xz"
  665.          EndProperty
  666.          BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  667.             Picture         =   "考核类别设置.frx":88D0
  668.             Key             =   "sc"
  669.          EndProperty
  670.          BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  671.             Picture         =   "考核类别设置.frx":8C6A
  672.             Key             =   "sx"
  673.          EndProperty
  674.          BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  675.             Picture         =   "考核类别设置.frx":9004
  676.             Key             =   "cx"
  677.          EndProperty
  678.          BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  679.             Picture         =   "考核类别设置.frx":939E
  680.             Key             =   "zd"
  681.          EndProperty
  682.          BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  683.             Picture         =   "考核类别设置.frx":9738
  684.             Key             =   "dz"
  685.          EndProperty
  686.          BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  687.             Picture         =   "考核类别设置.frx":9AD2
  688.             Key             =   "ph"
  689.          EndProperty
  690.          BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  691.             Picture         =   "考核类别设置.frx":9E6C
  692.             Key             =   "fz"
  693.          EndProperty
  694.          BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  695.             Picture         =   "考核类别设置.frx":A206
  696.             Key             =   "dw"
  697.          EndProperty
  698.          BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  699.             Picture         =   "考核类别设置.frx":A5A0
  700.             Key             =   "gb"
  701.          EndProperty
  702.          BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  703.             Picture         =   "考核类别设置.frx":A93A
  704.             Key             =   "cp"
  705.          EndProperty
  706.          BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  707.             Picture         =   "考核类别设置.frx":ACD4
  708.             Key             =   "dx"
  709.          EndProperty
  710.          BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  711.             Picture         =   "考核类别设置.frx":B06E
  712.             Key             =   "zb"
  713.          EndProperty
  714.          BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  715.             Picture         =   "考核类别设置.frx":B408
  716.             Key             =   "ys"
  717.          EndProperty
  718.          BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  719.             Picture         =   "考核类别设置.frx":B7A2
  720.             Key             =   "kb"
  721.          EndProperty
  722.       EndProperty
  723.    End
  724.    Begin VB.Image imgSplitter 
  725.       Height          =   6465
  726.       Left            =   2820
  727.       MousePointer    =   9  'Size W E
  728.       Top             =   630
  729.       Width           =   90
  730.    End
  731. End
  732. Attribute VB_Name = "Khgl_Title"
  733. Attribute VB_GlobalNameSpace = False
  734. Attribute VB_Creatable = False
  735. Attribute VB_PredeclaredId = True
  736. Attribute VB_Exposed = False
  737. '*******************************************************
  738. '*    模 块 名 称 :考核类别设置
  739. '*    功 能 描 述 :分级设置
  740. '*    程序员姓名  :张洪军
  741. '*    最后修改人  :张洪军
  742. '*    最后修改时间:2001/11/11
  743. '*    备        注:封版
  744. '*******************************************************
  745. Dim mbMoving As Boolean
  746. Const sglSplitLimit = 1000
  747. Dim Rec_CodeSet As New ADODB.Recordset   '编码设置表
  748. Dim jdzygs As Integer                    '控件焦点转移个数
  749. Dim Lrzt As Integer                      '录入状态标志(0-非录入状态 1-增加 2-修改)
  750. Dim ReportTitle As String                '报表主标题
  751.   
  752. '以下为固定使用变量(网格)
  753. Dim Cxnrrec As New ADODB.Recordset       '显示查询内容动态集
  754. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  755. Dim GridCode As String                   '显示网格网格代码
  756. Dim GridInf() As Variant                 '整个网格设置信息
  757. Dim Tsxx As String                       '系统提示信息
  758. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  759. Dim Sjhgd As Double                      '网格数据行高度
  760. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  761. Dim GridStr()  As String                 '网格列信息(字符型)
  762. Dim GridInt() As Integer                 '网格列信息(整型)
  763. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  764. '以下为固定使用变量(文本框)
  765. Dim Textvar() As Variant                 '存储变体型文本框信息
  766. Dim Textboolean() As Boolean             '存储布尔型文本框信息
  767. Dim Textint() As Integer                 '存储整型文本框信息
  768. Dim Textstr() As String                  '存储字符型文本框信息
  769. Dim Max_Text_Index As Integer            '最大录入文本框索引值
  770. Dim TextGroupCode As String              '文本框录入分组编码
  771. Dim TextValiLock As Boolean              '文本框失去焦点是否进行有效性控制判断
  772. Dim TextValiJudgeLock() As Boolean       '文本框录入有效性判断控制锁
  773. Dim CurTextIndex As Integer              '当前文本框索引值
  774. Dim TextChangeLock As Boolean            '文本框内容变换控制锁
  775. Dim Bln_Cancel As Boolean                '取消按钮信息传递
  776. Dim nodX As Node
  777. Dim CodSchemeIndex As String             '编码方案编码
  778. Dim CodScheme As String                  '编码方案
  779. Dim ParentCode As String                 '上级编码
  780. Dim CodeLevel As Integer                 '编码级次
  781. Private Sub CzxsGrid_Click()
  782.     
  783.     Dim count As Integer
  784.     With CzxsGrid
  785.         If Trim(.TextMatrix(.Row, Sydz("001", GridStr(), Szzls))) <> "" And .Rows <> .FixedRows Then
  786.             TreeView.Nodes("T" & Trim(.TextMatrix(.Row, Sydz("001", GridStr(), Szzls)))).Selected = True
  787.             TreeView.SetFocus
  788.         End If
  789.     End With
  790.     '设置工具条
  791.     Call toolkhlb
  792.     
  793. End Sub
  794. Private Sub Form_KeyPress(KeyAscii As Integer)   '控 制 焦 点 转 移
  795.     
  796.     jdzygs = 10
  797.     Select Case KeyAscii
  798.         Case vbKeyReturn
  799.             If Kjjdzy(jdzygs) Then
  800.                 KeyAscii = 0
  801.             End If
  802.         Case 39           '屏蔽"'"
  803.             KeyAscii = 0
  804.     End Select
  805. End Sub
  806. Private Sub Form_Load()
  807.     
  808.     SizeControls imgSplitter.Left
  809.   
  810.     CodSchemeIndex = "Khgl_Title"
  811.     Add_Tree
  812.     Text_CodScheme
  813.   
  814.     '打印报表标题信息
  815.     ReportTitle = "考核类别设置"
  816.    
  817.     '调入打印页面设置窗体
  818.     XtReportCode = "Khgl_Title"
  819.     Load Dyymctbl
  820.   
  821.     '以下为文本框处理程序(读入文本框录入信息)
  822.     TextGroupCode = "Khgl_Title"
  823.     Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())
  824.     Call Wbkcsh
  825.   
  826.     '调入网格设置信息
  827.     GridCode = "Khgl_Title"
  828.     Call BzWgcsh(CzxsGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  829.     Qslz = GridInf(1)
  830.     Sjhgd = GridInf(2)
  831.     Szzls = CzxsGrid.Cols - 1
  832.   
  833.     '填 充 网 格
  834.     Call Cxnrtcwg
  835.      
  836.     '初始化toolbar,tab卡状态
  837.     StTab.Tab = 0
  838.     StTab.TabEnabled(1) = False
  839.     '设置工具条
  840.     Call toolkhlb
  841.     
  842.     'Frame1.Enabled = False
  843.    
  844.     '设置为非录入状态
  845.     Lrzt = 0
  846.     
  847. End Sub
  848. Private Sub Cxnrtcwg()                               '查询内容填充网格
  849.     
  850.     Dim Sqlstr As String              '查询连接串
  851.     Dim Jsqte As Long                 '查询临时使用变量
  852.   
  853.     '为加快显示速度,将网格刷新动作冻结
  854.     CzxsGrid.Redraw = False
  855.   
  856.     '[>>查询连接串
  857.     Sqlstr = "SELECT * FROM Kh_v_Title order by TitleCode"
  858.   
  859.     '<<]
  860.   
  861.     Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  862.     With Cxnrrec
  863.         CzxsGrid.Rows = CzxsGrid.FixedRows
  864.         If .EOF And .BOF Then
  865.             CzxsGrid.Redraw = True
  866.             Exit Sub
  867.         End If
  868.         Jsqte = CzxsGrid.FixedRows
  869.         Do While Not .EOF
  870.             CzxsGrid.AddItem ""
  871.             Call Jltcwg(Cxnrrec, Jsqte)                              '调入填充网格子过程
  872.             CzxsGrid.RowHeight(Jsqte) = Sjhgd                        '设置网格高度
  873.             .MoveNext
  874.             Jsqte = Jsqte + 1
  875.         Loop
  876.     End With
  877.     '<<张洪军增加于2001.1.30
  878.     Call toolkhlb
  879.     '张洪军增加于2001.1.30 >>
  880.     '将网格刷新动作解冻
  881.     CzxsGrid.Redraw = True
  882. End Sub
  883. Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long)           '记录内容填充网格
  884.         
  885.     '[>>以下为自定义部分
  886.     With Jlbrec
  887.         CzxsGrid.TextMatrix(Rowjsq, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("TitleCode") & "")            '类别编码
  888.         CzxsGrid.TextMatrix(Rowjsq, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("TitleName") & "")            '类别名称
  889.         CzxsGrid.TextMatrix(Rowjsq, Sydz("003", GridStr(), Szzls)) = Format(Trim(.Fields("CreateTime") & ""), "yyyy-mm-dd")          '创建时间
  890.         CzxsGrid.TextMatrix(Rowjsq, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("CheckName") & "")            '测评规则
  891.         CzxsGrid.TextMatrix(Rowjsq, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("TitleDigit") & "")           '保留小数
  892.         If Trim(.Fields("LockFlag") & "") = True Then
  893.             CzxsGrid.TextMatrix(Rowjsq, Sydz("006", GridStr(), Szzls)) = "上限封闭"                             '封闭类型
  894.         Else
  895.             CzxsGrid.TextMatrix(Rowjsq, Sydz("006", GridStr(), Szzls)) = "下限封闭"                             '封闭类型
  896.         End If
  897.         CzxsGrid.TextMatrix(Rowjsq, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("Remark") & "")                '备注
  898.         CzxsGrid.TextMatrix(Rowjsq, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("CodeLevel") & "")             '级次
  899.         
  900.         If (.Fields("EndFlag")) = True Then
  901.             CzxsGrid.TextMatrix(Rowjsq, Sydz("009", GridStr(), Szzls)) = 1                                       '末级标志
  902.         Else
  903.             CzxsGrid.TextMatrix(Rowjsq, Sydz("009", GridStr(), Szzls)) = 0                                       '末级标志
  904.         End If
  905.         
  906.         
  907.         CzxsGrid.TextMatrix(Rowjsq, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("ComputeFlag") & "")           '计算标志
  908.         CzxsGrid.TextMatrix(Rowjsq, Sydz("011", GridStr(), Szzls)) = Trim(.Fields("CloseFlag") & "")             '关闭标志
  909.     End With
  910.     '以上为自定义部分<<]
  911. End Sub
  912. Private Sub Form_Resize()
  913.     
  914.     On Error Resume Next
  915.     Dim St_tab As Integer
  916.     If Me.Height < 7000 Then Me.Height = 7000
  917.     If Me.Width < 10500 Then Me.Width = 10500
  918.     StTab.Width = Me.Width - (TreeView.Width + 300)
  919.     StTab.Height = Me.Height - (StTab.Top + 400)
  920.     TreeView.Height = Me.Height - (TreeView.Top + 400)
  921.     imgSplitter.Height = TreeView.Height
  922.     St_tab = StTab.Tab
  923.     StTab.Tab = 0
  924.     CzxsGrid.Width = StTab.Width - CzxsGrid.Left * 2
  925.     CzxsGrid.Height = StTab.Height - 600
  926.     StTab.Tab = St_tab
  927.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  928. End Sub
  929. Private Sub Form_Unload(Cancel As Integer)             '窗体卸载
  930.     
  931.     Set Cxnrrec = Nothing
  932.     Set Rec_CodeSet = Nothing
  933.     Unload Dyymctbl
  934. End Sub
  935. Private Function Bclrsj() As Boolean                   '判断录入数据有效性,并保存数据
  936.     
  937.     Dim Jsqte As Integer
  938.   
  939.     '对文本框录入内容进行为零和为空判断(固定不变)
  940.     With Rec_CodeSet
  941.         For Jsqte = 0 To Max_Text_Index
  942.             If Textint(Jsqte, 8) = 1 Then     '字段不能为空
  943.                 If Len(Trim(LrText(Jsqte).Text)) = 0 Then
  944.                     Tsxx = Textstr(Jsqte, 7) & "不能为空!"
  945.                     Call Xtxxts(Tsxx, 0, 1)
  946.                     LrText(Jsqte).SetFocus
  947.                     Bclrsj = False
  948.                     Exit Function
  949.                 End If
  950.             Else
  951.                 If Textint(Jsqte, 8) = 2 Then   '字段不能为零
  952.                     If Val(Trim(LrText(Jsqte).Text)) = 0 Then
  953.                         Tsxx = Textstr(Jsqte, 7) & "不能为零!"
  954.                         Call Xtxxts(Tsxx, 0, 1)
  955.                         LrText(Jsqte).SetFocus
  956.                         Bclrsj = False
  957.                         Exit Function
  958.                     End If
  959.                 End If
  960.             End If
  961.         Next Jsqte
  962.     
  963.         '对需要进行事后判断的文本框录入内容进行有效性判断 (固定不变)
  964.         For Jsqte = 0 To Max_Text_Index
  965.             If Textint(Jsqte, 9) = 0 Or Textint(Jsqte, 9) = 2 Then
  966.                 If Not TextYxxpd(Jsqte) Then
  967.                     Exit Function
  968.                 End If
  969.             End If
  970.         Next Jsqte
  971.    
  972.         If Lrzt = 1 Then  '增 加
  973.         
  974.             '[>>判断编码是否重复
  975.             If .State = 1 Then .Close
  976.             .Open "SELECT * FROM Kh_Title WHERE TitleCode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  977.             If Not .EOF Then
  978.                 Tsxx = "类别编码重复!"
  979.                 Call Xtxxts(Tsxx, 0, 1)
  980.                 LrText(0).SetFocus
  981.                 Bclrsj = False
  982.                 Exit Function
  983.             End If
  984.     
  985.             '判断名称是否重复
  986.             If .State = 1 Then .Close
  987.             .Open "SELECT * FROM Kh_Title WHERE TitleName= '" + Trim(LrText(1).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  988.             If Not .EOF Then
  989.                 Tsxx = "类别名称重复!"
  990.                 Call Xtxxts(Tsxx, 0, 1)
  991.                 LrText(1).SetFocus
  992.                 Bclrsj = False
  993.                 Exit Function
  994.             End If
  995.             '判断记录内容无误后,将记录内容写入数据表
  996.             On Error GoTo Swcwcl
  997.     
  998.             Cw_DataEnvi.DataConnect.BeginTrans
  999.    
  1000.             .AddNew
  1001.             .Fields("TitleCode") = Trim(LrText(0).Text)    '类别编码
  1002.             .Fields("TitleName") = Trim(LrText(1).Text)    '类别名称
  1003.             .Fields("CreateTime") = Trim(LrText(2).Text)    '创建日期
  1004.             .Fields("CheckCode") = Trim(LrText(3).Tag)     '测评规则
  1005.             .Fields("TitleDigit") = Trim(LrText(4).Text)    '保留小数
  1006.             If Opt_LockFlag(0).Value = True Then
  1007.                 .Fields("LockFlag") = 0                    '下限封闭
  1008.             Else
  1009.                 .Fields("LockFlag") = 1                    '上限封闭
  1010.             End If
  1011.             .Fields("Remark") = Trim(LrText(5).Text)       '备注
  1012.             .Fields("ParentCode") = ParentCode             '上级编码
  1013.             .Fields("CodeLevel") = CodeLevel               '编码级次
  1014.             .Fields("ComputeFlag") = 0                     '计算标志
  1015.             .Fields("CloseFlag") = 0                       '关闭标志
  1016.      
  1017.             .Update
  1018.             Cw_DataEnvi.DataConnect.Execute "update Kh_Title set EndFlag=0  where TitleCode='" & ParentCode & "'"
  1019.     
  1020.             Cw_DataEnvi.DataConnect.CommitTrans
  1021.             If CodeLevel <> 1 Then
  1022.                 Set nodX = TreeView.Nodes.Add("T" & ParentCode, 4, "T" & LrText(0).Text, "(" & Trim(LrText(0).Text) & ")" & Trim(LrText(1).Text), "C")
  1023.                 nodX.EnsureVisible
  1024.             Else
  1025.                 Set nodX = TreeView.Nodes.Add("T", 4, "T" & LrText(0).Text, "(" & Trim(LrText(0).Text) & ")" & Trim(LrText(1).Text), "C")
  1026.             End If
  1027.             ParentCode = "": CodeLevel = 0
  1028.    
  1029.    
  1030.             '将记录加入网格
  1031.             Call Cxnrtcwg
  1032.             Tsxx = "保存完毕!"
  1033.             Call Xtxxts(Tsxx, 0, 4)
  1034.             Call Cshlrxx(1)
  1035.             LrText(0).SetFocus
  1036.             '将网格按编码排序
  1037.             With CzxsGrid
  1038.                 .Col = Sydz("001", GridStr(), Szzls)
  1039.                 CzxsGrid.Sort = flexSortStringAscending
  1040.             End With
  1041.             '<<]
  1042.     
  1043.         Else  '否则为修改记录
  1044.  
  1045.             If .State = 1 Then .Close
  1046.             .Open "SELECT * FROM Kh_Title WHERE TitleName= '" + Trim(LrText(1).Text) + "' and TitleCode<>'" & Trim(LrText(0).Text) & "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1047.             If Not .EOF Then
  1048.                 Tsxx = "类别名称重复!"
  1049.                 Call Xtxxts(Tsxx, 0, 1)
  1050.                 LrText(1).SetFocus
  1051.                 Bclrsj = False
  1052.                 Exit Function
  1053.             End If
  1054.             On Error GoTo Swcwcl
  1055.             Cw_DataEnvi.DataConnect.BeginTrans
  1056.             If .State = 1 Then .Close
  1057.             .Open "SELECT * FROM Kh_Title WHERE TitleCode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1058.             If Not .EOF Then
  1059.                 .Fields("TitleName") = Trim(LrText(1).Text)     '类别名称
  1060.                 .Fields("CreateTime") = Trim(LrText(2).Text)    '创建日期
  1061.                 .Fields("CheckCode") = Trim(LrText(3).Tag)      '测评规则
  1062.                 .Fields("TitleDigit") = Trim(LrText(4).Text)    '保留小数
  1063.                 If Opt_LockFlag(0).Value = True Then
  1064.                     .Fields("LockFlag") = 0                     '下限封闭
  1065.                 Else
  1066.                     .Fields("LockFlag") = 1                     '上限封闭
  1067.                 End If
  1068.                 .Fields("Remark") = Trim(LrText(5).Text)        '备注
  1069.             
  1070.                 .Update
  1071.             End If
  1072.             TreeView.Nodes("T" & Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls)))).Text = "(" & Trim(LrText(0).Text) & ")" & Trim(LrText(1).Text)
  1073.             Cw_DataEnvi.DataConnect.CommitTrans
  1074.    
  1075.             '刷新当前网格
  1076.             Sqlstr = "SELECT * FROM Kh_v_Title WHERE TitleCode= '" + Trim(LrText(0).Text) + "'"
  1077.             Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1078.             With CzxsGrid
  1079.                 Call Jltcwg(Cxnrrec, .Row)
  1080.             End With
  1081.    
  1082.         End If
  1083.      
  1084.         '保存记录成功,函数返回真值
  1085.         Bclrsj = True
  1086.         Exit Function
  1087.     End With
  1088.  
  1089. Swcwcl:
  1090.     Cw_DataEnvi.DataConnect.RollbackTrans
  1091.     Tsxx = "存盘过程中出现错误,程序自动恢复保存前状态!"
  1092.     Call Xtxxts(Tsxx, 0, 1)
  1093.     Exit Function
  1094. End Function
  1095. Private Function Cshlrxx(lrztxx As Integer) As Boolean              '初始化录入字段信息
  1096.     
  1097.     TextChangeLock = True       '关闭文本框Chang事件
  1098.     If lrztxx = 1 Then
  1099.         '增加新记录时将文本框清空
  1100.         For Jsqte = 0 To Max_Text_Index
  1101.             
  1102.             If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
  1103.                 LrText(Jsqte).Text = ""
  1104.                 LrText(Jsqte).Tag = ""
  1105.             End If
  1106.             TextValiJudgeLock(Jsqte) = True
  1107.         Next Jsqte
  1108.         '[>>
  1109.         '在此处可添加新增记录时初始化设置
  1110.         '<<]
  1111.     Else
  1112.         '修改记录时根据记录关键字(编码)从数据表中读入其他字段内容
  1113.         With RecTemp
  1114.             Sqlstr = "SELECT * FROM Kh_v_Title Where TitleCode='" & Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) & "'"
  1115.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1116.             '记录如存在则读入其内容,否则提示记录已被其他人删除
  1117.             If Not RecTemp.EOF Then
  1118.                 LrText(0).Text = Trim(.Fields("TitleCode") & "")            '类别编码
  1119.                 LrText(1).Text = Trim(.Fields("TitleName") & "")            '类别名称
  1120.                 LrText(2).Text = Trim(.Fields("CreateTime") & "")           '创建时间
  1121.                 LrText(3).Tag = Trim(.Fields("CheckCode") & "")             '测评规则编码
  1122.                 LrText(3).Text = Trim(.Fields("CheckName") & "")            '测评规则名称
  1123.                 LrText(4).Text = Trim(.Fields("TitleDigit") & "")           '小数位数
  1124.                 If Trim(.Fields("LockFlag") & "") = False Then              '封闭类型
  1125.                     Opt_LockFlag(0).Value = True
  1126.                 Else
  1127.                     Opt_LockFlag(1).Value = True
  1128.                 End If
  1129.                 LrText(5).Text = Trim(.Fields("Remark") & "")               '备注
  1130.             Else
  1131.                 Tsxx = "该记录已经被其他人删除,请刷新当前数据!"
  1132.                 Call Xtxxts(Tsxx, 0, 4)
  1133.                 Call Cancel
  1134.                 TextChangeLock = False
  1135.                 Exit Function
  1136.             End If
  1137.         End With
  1138.     End If
  1139.     Cshlrxx = True
  1140.     TextChangeLock = False
  1141. End Function
  1142. Private Sub Scdqjl()                 '删 除 当 前 记 录
  1143.     
  1144.     Dim yhAnswer As Integer
  1145.     Dim aDo_Rec As New Recordset
  1146.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1147.     If Not Security_Log("Khgl_Title_edit", Xtczybm, 1) Then
  1148.         Exit Sub
  1149.     End If
  1150.     '非数据行不能删除
  1151.     If CzxsGrid.Row < CzxsGrid.FixedRows Then
  1152.         Exit Sub
  1153.     End If
  1154.     
  1155.     If Val(Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("011", GridStr(), Szzls)))) = 1 Then
  1156.         Tsxx = "该考核类别已经关闭,不能删除"
  1157.         Call Xtxxts(Tsxx, 0, 1)
  1158.         Exit Sub
  1159.     End If
  1160.   
  1161.     '用户确认是否删除记录
  1162.     Tsxx = "请确认是否删除当前记录?"
  1163.     yhAnswer = Xtxxts(Tsxx, 2, 2)
  1164.     If yhAnswer = 2 Then
  1165.         Exit Sub
  1166.     End If
  1167.   
  1168.     Set aDo_Rec = Cw_DataEnvi.DataConnect.Execute("select * from Kh_Title where ParentCode='" & Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) & "'")
  1169.     If aDo_Rec.RecordCount > 0 Then
  1170.         aDo_Rec.Close
  1171.         Tsxx = "该项有下级,不能删除!"
  1172.         Call Xtxxts(Tsxx, 0, 1)
  1173.         Exit Sub
  1174.     End If
  1175.     aDo_Rec.Close
  1176.   
  1177.     On Error GoTo Cwcl
  1178.   
  1179.     Cw_DataEnvi.DataConnect.BeginTrans
  1180.  
  1181.     '[>>以下需自定义部分
  1182.     '<<张洪军增加于2001.1.30
  1183.     Cw_DataEnvi.DataConnect.Execute "delete Kh_Object where TitleCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
  1184.     Cw_DataEnvi.DataConnect.Execute "delete Kh_Appraise where TitleCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
  1185.     Cw_DataEnvi.DataConnect.Execute "delete Kh_ValMark where TitleCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
  1186.     Cw_DataEnvi.DataConnect.Execute "delete Kh_Target where TitleCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
  1187.     '张洪军增加于2001.1.30 >>
  1188.     Cw_DataEnvi.DataConnect.Execute "delete Kh_Title where TitleCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
  1189.     '=================
  1190.     Dim i As Integer, LevelLeng As Integer
  1191.     For i = 1 To Len(CodScheme)
  1192.         LevelLeng = LevelLeng + Val(Mid(CodScheme, i, 1))
  1193.         If Len(Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls)))) = LevelLeng Then
  1194.             If i = 1 Then Exit For
  1195.             '----------------
  1196.             Set aDo_Rec = Cw_DataEnvi.DataConnect.Execute("select * from Kh_Title where ParentCode='" & Mid(Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))), 1, LevelLeng - Val(Mid(CodScheme, i, 1))) & "'")
  1197.             If aDo_Rec.RecordCount = 0 Then
  1198.                 Cw_DataEnvi.DataConnect.Execute ("update Kh_Title set EndFlag=1 where TitleCode='" & Mid(Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))), 1, LevelLeng - Val(Mid(CodScheme, i, 1))) & "'")
  1199.             End If
  1200.             Exit For
  1201.         End If
  1202.     Next i
  1203.     '=================
  1204.   
  1205.     Add_Tree
  1206.     '以上为自定义部分<<]
  1207.   
  1208.     Cw_DataEnvi.DataConnect.CommitTrans
  1209.   
  1210.     '将记录加入网格
  1211.     Call Cxnrtcwg
  1212.     
  1213.     Exit Sub
  1214.   
  1215. Cwcl:
  1216.     Cw_DataEnvi.DataConnect.RollbackTrans
  1217.     If Err.Number = -2147217873 Then                '(-2147217873 为SQL Server 2000通过建立外键产生的错误号)
  1218.         Tsxx = "该考核类别已经被使用,不能删除!"
  1219.         Call Xtxxts(Tsxx, 0, 1)
  1220.         Exit Sub
  1221.     Else
  1222.         Tsxx = "出现未知情况,该类别不能被删除!"
  1223.         Call Xtxxts(Tsxx, 0, 1)
  1224.         Exit Sub
  1225.     End If
  1226. End Sub
  1227. '*******************以下区域为编写自定义过程区域**********************
  1228. Private Sub toolkhlb()
  1229.     Dim int_endflag   As Integer           '末级标志
  1230.     Dim int_CodeLevel   As Integer         '编码级次
  1231.     Dim int_ComputeFlag   As Integer       '计算标志
  1232.     Dim int_CloseFlag   As Integer         '关闭标志
  1233.     '控制指标、要素、测评、对象、关闭按钮是否可用
  1234.     With SzToolbar
  1235.         If CzxsGrid.Row > 0 Then
  1236.             int_CodeLevel = Val(Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("008", GridStr(), Szzls))))
  1237.             int_endflag = Val(Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("009", GridStr(), Szzls))))
  1238.             int_ComputeFlag = Val(Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("010", GridStr(), Szzls))))
  1239.             int_CloseFlag = Val(Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("011", GridStr(), Szzls))))
  1240.             If int_CodeLevel = 1 Then
  1241.                 .Buttons("zb").Enabled = True
  1242.                 .Buttons("ys").Enabled = True
  1243.                 .Buttons("cp").Enabled = True
  1244.             Else
  1245.                 .Buttons("zb").Enabled = False
  1246.                 .Buttons("ys").Enabled = False
  1247.                 .Buttons("cp").Enabled = False
  1248.             End If
  1249.             If int_endflag = 1 And int_CloseFlag = 0 Then
  1250.                 .Buttons("dx").Enabled = True
  1251.             Else
  1252.                 .Buttons("dx").Enabled = False
  1253.                 
  1254.             End If
  1255.             If int_ComputeFlag = 1 And int_endflag = 1 And int_CloseFlag = 0 Then
  1256.                 .Buttons("gb").Enabled = True
  1257.             Else
  1258.                 .Buttons("gb").Enabled = False
  1259.             End If
  1260.             
  1261.         Else
  1262.             .Buttons("zb").Enabled = False
  1263.             .Buttons("ys").Enabled = False
  1264.             .Buttons("cp").Enabled = False
  1265.             .Buttons("dx").Enabled = False
  1266.             .Buttons("gb").Enabled = False
  1267.         End If
  1268.     End With
  1269. End Sub
  1270. '函数dykhlb,调用考核类别的指标、要素、测评、对象窗体
  1271. '参数考核类别索引khlbsy,有效值为zb,ys,cp,dx。
  1272. Private Sub dykhlb(khlbsy As String)
  1273.     Dim str_Temp As String                 '考核类别编码
  1274.     Dim rec_Recordset As New Recordset     '临时记录集
  1275.     
  1276.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1277.     If Not Security_Log("Khgl_Title_edit", Xtczybm, 1) Then
  1278.         Exit Sub
  1279.     End If
  1280.             
  1281.     If CzxsGrid.Row <= 0 Then
  1282.         Exit Sub
  1283.     End If
  1284.     
  1285.     '当前考核类别
  1286.     str_Temp = Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls)))
  1287.     
  1288.     If Len(Trim(str_Temp)) = 0 Then
  1289.         Tsxx = "请选择考核类别!"
  1290.         Call Xtxxts(Tsxx, 0, 1)
  1291.         Exit Sub
  1292.     End If
  1293.     Select Case khlbsy
  1294.         Case "zb"
  1295.             '设置考核类别编码
  1296.             Khgl_Target.str_TitleCode = str_Temp
  1297.             '设置考核类别名称
  1298.             Khgl_Target.tsLabel(0).Caption = Khgl_Target.tsLabel(0).Caption + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("002", GridStr(), Szzls)))
  1299.             Khgl_Target.Show 1
  1300.             
  1301.         Case "ys"
  1302.             '设置考核类别编码
  1303.             Khgl_ValMark.str_TitleCode = str_Temp
  1304.             '设置考核类别名称
  1305.             Khgl_ValMark.tsLabel(0).Caption = Khgl_ValMark.tsLabel(0).Caption + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("002", GridStr(), Szzls)))
  1306.             Khgl_ValMark.Show 1
  1307.             
  1308.         Case "cp"
  1309.             '设置考核类别编码
  1310.             Khgl_Appraise.str_TitleCode = str_Temp
  1311.             '设置考核类别名称
  1312.             Khgl_Appraise.tsLabel(0).Caption = Khgl_Appraise.tsLabel(0).Caption + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("002", GridStr(), Szzls)))
  1313.             Khgl_Appraise.Show 1
  1314.             
  1315.         Case "dx"
  1316.             '设置考核类别编码
  1317.             Khgl_Object.str_TitleCode = str_Temp
  1318.             '设置考核类别名称
  1319.             Khgl_Object.tsLabel(0).Caption = Khgl_Object.tsLabel(0).Caption + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("002", GridStr(), Szzls)))
  1320.             Khgl_Object.Show 1
  1321.         Case "gb"
  1322.             '计算标志=0不允许关闭
  1323.             If Val(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("010", GridStr(), Szzls))) = 0 Then
  1324.                 Tsxx = "该考核类别没有计算,不能关闭!"
  1325.                 Call Xtxxts(Tsxx, 0, 1)
  1326.                 Exit Sub
  1327.             End If
  1328.             '关闭标志=1不能再次关闭
  1329.             If Val(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("011", GridStr(), Szzls))) = 1 Then
  1330.                 Tsxx = "该考核类别已经关闭,不能再次关闭!"
  1331.                 Call Xtxxts(Tsxx, 0, 1)
  1332.                 Exit Sub
  1333.             End If
  1334.             
  1335.             rec_Recordset.Open "SELECT * FROM Kh_Title WHERE TitleCode= '" + str_Temp + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1336.             If Not rec_Recordset.EOF Then
  1337.                 rec_Recordset.Fields("CloseFlag") = 1
  1338.                 rec_Recordset.Update
  1339.                 Tsxx = "该考核类别关闭成功!"
  1340.                 Call Xtxxts(Tsxx, 0, 4)
  1341.             End If
  1342.             rec_Recordset.Close
  1343.             '刷新网格
  1344.             Call Cxnrtcwg
  1345.             
  1346.         Case "kb"
  1347.             '编码方案
  1348.             Khgl_CopyTitle.CodScheme = CodScheme
  1349.             Khgl_CopyTitle.Lbl_codescheme = Me.Lbl_codescheme.Caption
  1350.             '考核类别编码列号
  1351.             Khgl_CopyTitle.int_col = Sydz("001", GridStr(), Szzls)
  1352.             
  1353.             Set rec_Recordset = Cw_DataEnvi.DataConnect.Execute("SELECT * FROM Kh_v_Title where TitleCode='" & Trim(str_Temp) & "'")
  1354.     
  1355.             '设置考核类别编码
  1356.             Khgl_CopyTitle.LrText(6).Text = str_Temp
  1357.             '设置考核类别名称
  1358.             Khgl_CopyTitle.LrText(7).Text = rec_Recordset.Fields("TitleName")
  1359.             
  1360.             Khgl_CopyTitle.LrText(0).Text = str_Temp
  1361.             Khgl_CopyTitle.LrText(1).Text = rec_Recordset.Fields("TitleName")
  1362.             Khgl_CopyTitle.LrText(2).Text = Format(Xtrq, "yyyy-mm-dd")
  1363.             Khgl_CopyTitle.LrText(3).Tag = rec_Recordset.Fields("CheckCode")    '测评规则
  1364.             Khgl_CopyTitle.LrText(3).Text = rec_Recordset.Fields("CheckName")    '测评规则
  1365.             Khgl_CopyTitle.LrText(4).Text = rec_Recordset.Fields("TitleDigit")    '保留小数
  1366.             If rec_Recordset.Fields("LockFlag") = True Then
  1367.                 Khgl_CopyTitle.Opt_LockFlag(1).Value = True
  1368.             Else
  1369.                 Khgl_CopyTitle.Opt_LockFlag(0).Value = True
  1370.             End If
  1371.             rec_Recordset.Close
  1372.             
  1373.             Khgl_CopyTitle.Show 1
  1374.                          
  1375.             '填 充 网 格
  1376.             Call Cxnrtcwg
  1377.             Add_Tree
  1378.             
  1379.             Exit Sub
  1380.     End Select
  1381. End Sub
  1382.            
  1383. '*******************以上区域为编写自定义过程区域**********************
  1384. '******************以下为基本处理程序(固定不变)************************'
  1385. Private Sub Add_Tree() '添加树项
  1386.     Dim aDo_Sort As New Recordset
  1387.     TreeView.Nodes.Clear
  1388.     TreeView.Nodes.Add , 4, "T", "考核类别", "T"
  1389.     
  1390.     Set aDo_Sort = Cw_DataEnvi.DataConnect.Execute("select a.*,mj=(select count(*) from Kh_Title where Kh_Title.ParentCode=a.TitleCode) from Kh_Title a order by a.TitleCode")
  1391.     
  1392.     With aDo_Sort
  1393.         Do While Not .EOF
  1394.             If Trim("" & aDo_Sort!ParentCode) = "" Then
  1395.                 If !mj < 1 Then
  1396.                     Set nodX = TreeView.Nodes.Add("T", 4, "T" & Trim(.Fields("TitleCode")), "(" & Trim(.Fields("TitleCode")) & ")" & Trim(.Fields("TitleName")), "C")
  1397.                 Else
  1398.                     Set nodX = TreeView.Nodes.Add("T", 4, "T" & Trim(.Fields("TitleCode")), "(" & Trim(.Fields("TitleCode")) & ")" & Trim(.Fields("TitleName")), "Cl")
  1399.                 End If
  1400.                 nodX.EnsureVisible
  1401.             Else
  1402.                 If !mj < 1 Then
  1403.                     Set nodX = TreeView.Nodes.Add("T" & Trim(!ParentCode), 4, "T" & Trim(.Fields("TitleCode")), "(" & Trim(.Fields("TitleCode")) & ")" & Trim(.Fields("TitleName")), "C")
  1404.                 Else
  1405.                     Set nodX = TreeView.Nodes.Add("T" & Trim(!ParentCode), 4, "T" & Trim(.Fields("TitleCode")), "(" & Trim(.Fields("TitleCode")) & ")" & Trim(.Fields("TitleName")), "Cl")
  1406.                 End If
  1407.             End If
  1408.             .MoveNext
  1409.         Loop
  1410.     End With
  1411.     
  1412.    
  1413. End Sub
  1414.  
  1415. '编码方案
  1416. Private Sub Text_CodScheme()
  1417.     
  1418.     Dim aDo_Sort As New Recordset
  1419.     Dim i As Integer, h As Integer
  1420.     Set aDo_Sort = Cw_DataEnvi.DataConnect.Execute("select * from Gy_CodeScheme where ItemCode='" & Trim(CodSchemeIndex) & "'")
  1421.     CodScheme = Trim(aDo_Sort!CodeScheme)
  1422.     aDo_Sort.Close
  1423.     '-------------
  1424.     StTab.Tab = 1
  1425.     Lbl_codescheme.Caption = ""
  1426.     For i = 1 To Len(CodScheme)
  1427.         For h = 1 To Val(Mid(CodScheme, i, 1))
  1428.             Lbl_codescheme = Lbl_codescheme & "*"
  1429.         Next
  1430.         Lbl_codescheme = Lbl_codescheme & " "
  1431.     Next i
  1432.     Lbl_codescheme = Trim(Lbl_codescheme)
  1433. End Sub
  1434. Private Sub imgSplitter_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1435.     
  1436.     With imgSplitter
  1437.         picSplitter.Move .Left, .Top, .Width  2, .Height - 20
  1438.     End With
  1439.     picSplitter.Visible = True
  1440.     mbMoving = True
  1441. End Sub
  1442. Private Sub imgSplitter_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1443.     
  1444.     Dim sglPos As Single
  1445.     If mbMoving Then
  1446.         sglPos = X + imgSplitter.Left
  1447.         If sglPos < sglSplitLimit Then
  1448.             picSplitter.Left = sglSplitLimit
  1449.         ElseIf sglPos > Me.Width - sglSplitLimit Then
  1450.             picSplitter.Left = Me.Width - sglSplitLimit
  1451.         Else
  1452.             picSplitter.Left = sglPos
  1453.         End If
  1454.     End If
  1455. End Sub
  1456. Private Sub imgSplitter_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1457.     
  1458.     SizeControls picSplitter.Left
  1459.     picSplitter.Visible = False
  1460.     mbMoving = False
  1461.    ' StTab.Refresh
  1462. End Sub
  1463. Private Sub SizeControls(X As Single)
  1464.     
  1465.     On Error Resume Next
  1466.     '设置 Width 属性
  1467.     If X < 2000 Then X = 2000
  1468.     If X > (Me.Width - 5000) Then X = Me.Width - 5000
  1469.     TreeView.Width = X - 100
  1470.     imgSplitter.Left = X
  1471.     StTab.Left = X + 40
  1472.     StTab.Width = Me.Width - (TreeView.Width + 300)
  1473.     '设置 Top 属性
  1474.     TreeView.Top = tbToolBar.Height + picTitles.Height
  1475.     StTab.Top = TreeView.Top
  1476.     '设置 height 属性
  1477.     TreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles.Height)
  1478.     'Frame1.Width = StTab.Width - Frame1.Left * 2
  1479.     Dim St_tab As Integer
  1480.     St_tab = StTab.Tab
  1481.     StTab.Tab = 0
  1482.     CzxsGrid.Width = StTab.Width - CzxsGrid.Left * 2
  1483.     StTab.Tab = St_tab
  1484.     StTab.Height = TreeView.Height
  1485.     imgSplitter.Top = TreeView.Top
  1486.     imgSplitter.Height = TreeView.Height
  1487. End Sub
  1488. Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)        '支持热键操作
  1489.     
  1490.     If Shift = 2 Then
  1491.         Select Case UCase(Chr(KeyCode))
  1492.             Case "P"                                                                          'Ctrl+P 打印
  1493.                 If SzToolbar.Buttons("dy").Visible And SzToolbar.Buttons("dy").Enabled Then
  1494.                     Call bbyl(False)
  1495.                 End If
  1496.             Case "A"                                                                          'Ctrl+A 增加
  1497.                 '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1498.                 If Not Security_Log("Khgl_Title_edit", Xtczybm, 1) Then
  1499.                     Exit Sub
  1500.                 End If
  1501.                 If SzToolbar.Buttons("zj").Visible And SzToolbar.Buttons("zj").Enabled Then
  1502.                     Call Toolbjzt
  1503.                     Lrzt = 1
  1504.                     Call Cshlrxx(Lrzt)
  1505.                     LrText(0).Enabled = True
  1506.                     LrText(0).SetFocus
  1507.                    
  1508.                 End If
  1509.             Case "D"                                                                          'Ctrl+D 删除
  1510.                 If SzToolbar.Buttons("sc").Visible And SzToolbar.Buttons("sc").Enabled Then
  1511.                     Call Scdqjl
  1512.                 End If
  1513.         End Select
  1514.     End If
  1515. End Sub
  1516. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  1517.     
  1518.     Select Case Button.Key
  1519.         Case "ymsz"                                          '页面设置
  1520.             Dyymctbl.Show 1
  1521.         Case "yl"                                            '预 览
  1522.             Call bbyl(True)
  1523.         Case "dy"                                            '打 印
  1524.             Call bbyl(False)
  1525.         Case "zj"                                            '增 加
  1526.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1527.             If Not Security_Log("Khgl_Title_edit", Xtczybm, 1) Then
  1528.                 Exit Sub
  1529.             End If
  1530.             Call Toolbjzt
  1531.             Lrzt = 1
  1532.             Call Cshlrxx(Lrzt)
  1533.             If CzxsGrid.Row > 0 Then
  1534.                 LrText(0) = Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls)))
  1535.             End If
  1536.             LrText(0).Enabled = True
  1537.             LrText(0).SetFocus
  1538.             Opt_LockFlag(0).Value = True
  1539.             LrText(3).Enabled = True
  1540.             Ydcommand1(3).Enabled = True
  1541.         Case "xg"                                            '修 改
  1542.             Call Xgdqjl
  1543.         Case "sc"                                            '删 除
  1544.             Call Scdqjl
  1545.         Case "sx"                                            '刷 新
  1546.             Call Cxnrtcwg
  1547.             Add_Tree
  1548.             
  1549.         Case "zb"                                           '指标
  1550.             Call dykhlb("zb")
  1551.             
  1552.         Case "ys"                                           '要素
  1553.             Call dykhlb("ys")
  1554.             
  1555.         Case "cp"                                           '测评
  1556.             Call dykhlb("cp")
  1557.             
  1558.         Case "dx"                                           '对象
  1559.             Call dykhlb("dx")
  1560.             
  1561.         Case "gb"                                           '关闭
  1562.             Call dykhlb("gb")
  1563.             
  1564.         Case "kb"                                           '拷贝
  1565.             Call dykhlb("kb")
  1566.             
  1567.             
  1568.         Case "bz"                                            '帮 助
  1569.             Call F1bz
  1570.         Case "fh"                                            '退 出
  1571.             Unload Me
  1572.     End Select
  1573. End Sub
  1574. Private Sub CzxsGrid_DblClick()                            '修改当前编码记录
  1575.     Call Xgdqjl
  1576. End Sub
  1577. Private Sub Xgdqjl()                                       '修改当前编码记录
  1578.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1579.     If Not Security_Log("Khgl_Title_edit", Xtczybm, 1) Then
  1580.         Exit Sub
  1581.     End If
  1582.     If CzxsGrid.Row < CzxsGrid.FixedRows Then
  1583.         Exit Sub
  1584.     End If
  1585.     If Val(Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("011", GridStr(), Szzls)))) = 1 Then
  1586.         Tsxx = "该考核类别已经关闭,不能修改"
  1587.         Call Xtxxts(Tsxx, 0, 1)
  1588.         Exit Sub
  1589.     End If
  1590.     Call Toolbjzt
  1591.     Lrzt = 2
  1592.     If Cshlrxx(Lrzt) Then
  1593.         LrText(1).SetFocus
  1594.         LrText(0).Enabled = False
  1595.     End If
  1596.     LrText(3).Enabled = False
  1597.     Ydcommand1(3).Enabled = False
  1598. End Sub
  1599. Private Sub Toolbjzt()                                     'Toolbar状态(编辑状态)
  1600.     
  1601.     StTab.TabEnabled(1) = True
  1602.     StTab.Tab = 1
  1603.     StTab.TabEnabled(0) = False
  1604.     CzxsGrid.Enabled = False
  1605.     With SzToolbar
  1606.         .Buttons("ymsz").Enabled = False
  1607.         .Buttons("dy").Enabled = False
  1608.         .Buttons("yl").Enabled = False
  1609.         .Buttons("zj").Enabled = False
  1610.         .Buttons("xg").Enabled = False
  1611.         .Buttons("sc").Enabled = False
  1612.         .Buttons("sx").Enabled = False
  1613.         .Buttons("zb").Enabled = False
  1614.         .Buttons("ys").Enabled = False
  1615.         .Buttons("cp").Enabled = False
  1616.         .Buttons("dx").Enabled = False
  1617.         .Buttons("gb").Enabled = False
  1618.         .Buttons("kb").Enabled = False
  1619.     End With
  1620.     TreeView.Enabled = False
  1621. End Sub
  1622. Private Sub Toolfbjzt()                                    'Toolbar状态(非编辑状态)
  1623.     
  1624.     StTab.TabEnabled(0) = True
  1625.     StTab.Tab = 0
  1626.     CzxsGrid.Enabled = True
  1627.     StTab.TabEnabled(1) = False
  1628.     Lrzt = 0
  1629.     With SzToolbar
  1630.         .Buttons("ymsz").Enabled = True
  1631.         .Buttons("dy").Enabled = True
  1632.         .Buttons("yl").Enabled = True
  1633.         .Buttons("zj").Enabled = True
  1634.         .Buttons("xg").Enabled = True
  1635.         .Buttons("sc").Enabled = True
  1636.         .Buttons("sx").Enabled = True
  1637.         .Buttons("kb").Enabled = True
  1638.     End With
  1639.     '设置工具条
  1640.     Call toolkhlb
  1641.     TreeView.Enabled = True
  1642. End Sub
  1643. Private Sub BcCommand_Click()                                           '保 存
  1644.     
  1645.     If Not Bclrsj Then
  1646.         Exit Sub
  1647.     End If
  1648.     If Lrzt = 2 Then
  1649.         Call Toolfbjzt
  1650.     End If
  1651.     
  1652. End Sub
  1653. Private Sub QxCommand_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)       '取消
  1654.     
  1655.     '避免执行Click程序
  1656.     Bln_Cancel = True
  1657.   
  1658.     Call Cancel
  1659.     
  1660. End Sub
  1661. Private Sub QxCommand_Click()                                                                         '取消
  1662.     
  1663.     If Bln_Cancel Then
  1664.         Bln_Cancel = False
  1665.         Exit Sub
  1666.     End If
  1667.  
  1668.     Call Cancel
  1669. End Sub
  1670. Private Sub Cancel()                                                                                  '取消
  1671.     
  1672.     '文本框加锁
  1673.     For Jsqte = 0 To Max_Text_Index
  1674.         TextValiJudgeLock(Jsqte) = True
  1675.     Next Jsqte
  1676.   
  1677.     Call Toolfbjzt
  1678.     
  1679. End Sub
  1680. Private Sub CzxsGrid_AfterMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  1681.     FnBln_RefreshArray Col, Position, GridStr(), GridInf()
  1682. End Sub
  1683. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)   '表格格式设置(通用)
  1684.     
  1685.     Select Case Button.Key
  1686.         Case "bcgs"                                       '保存表格格式
  1687.             Call Bcwggs(CzxsGrid, GridCode, GridStr())
  1688.         Case "hfmrgs"                                     '恢复默认格式
  1689.             Call Hfmrgs(CzxsGrid, GridCode, GridStr())
  1690.         Case "szxsxm"                                     '设置显示项目
  1691.             Call Szxsxm(CzxsGrid, GridCode)
  1692.     End Select
  1693. End Sub
  1694. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1695.   
  1696.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1697.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1698.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1699.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1700.     ReDim Bbxbt(1 To Bbxbtgs)
  1701.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1702.     If Bbbwhgs <> 0 Then
  1703.         ReDim Bbbwh(1 To Bbbwhgs)
  1704.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1705.     End If
  1706.     Bbzbt = ReportTitle
  1707.     Bbxbt(1) = " "
  1708.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1709.     Call Scyxsjb(CzxsGrid)                               '生成报表数据
  1710.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1711.     If Not bbylte Then
  1712.         Unload DY_Tybbyldy
  1713.     End If
  1714. End Sub
  1715. '************以下为文本框录入处理程序(固定不变部分)*************'
  1716. Private Sub Wbklrwbcl(Index As Integer)    '文本框录入事后处理程序
  1717.     '以下为依据实际情况自定义部分[
  1718.     
  1719.     '在此填写文本框录入事后处理程序
  1720.     
  1721.     ']以上为依据实际情况自定义部分
  1722. End Sub
  1723. Private Sub LrText_Change(Index As Integer)
  1724.     
  1725.     '屏蔽程序改变控制
  1726.     If TextChangeLock Then
  1727.         Exit Sub
  1728.     End If
  1729.     
  1730.     TextValiJudgeLock(Index) = False    '打开有效性判断锁
  1731.         
  1732.     '限制字段录入长度
  1733.     TextChangeLock = True  '加锁(防止执行Lrtext_Change)
  1734.     Select Case Textint(Index, 1)
  1735.         Case 8, 11      '金额型
  1736.             Call Sjgskz(LrText(Index), Xtjezws - Xtjexsws - 1, Xtjexsws)
  1737.         Case 9, 12      '数量型
  1738.             Call Sjgskz(LrText(Index), Xtslzws - Xtslxsws - 1, Xtslxsws)
  1739.         Case 10          '单价型
  1740.             Call Sjgskz(LrText(Index), Xtdjzws - Xtdjxsws - 1, Xtdjxsws)
  1741.         Case Else        '其他小数类型控制
  1742.             If Textint(Index, 6) <> 0 Or Textint(Index, 7) <> 0 Then
  1743.                 Call Sjgskz(LrText(Index), Textint(Index, 6), Textint(Index, 7))
  1744.             End If
  1745.     End Select
  1746.         
  1747.     TextChangeLock = False '解锁
  1748. End Sub
  1749. Private Sub LrText_GotFocus(Index As Integer)                                                 '文本框得到焦点,显示相应信息
  1750.     
  1751.     Call TextShow(Index)
  1752.     CurTextIndex = Index
  1753.     LrText(Index).SelStart = Len(LrText(Index))
  1754. End Sub
  1755. Private Sub LrText_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)            '字段按F2键提供帮助
  1756.     
  1757.     Select Case KeyCode
  1758.         Case vbKeyF2
  1759.             Call Text_Help(Index)
  1760.     End Select
  1761. End Sub
  1762. Private Sub LrText_KeyPress(Index As Integer, KeyAscii As Integer)                            '文本框录入事中控制
  1763.     Call InputFieldLimit(LrText(Index), Textint(Index, 1), KeyAscii)
  1764. End Sub
  1765. Private Sub LrText_LostFocus(Index As Integer)                                                '文本框失去焦点
  1766.     '显示相应信息但不能进行有效性判断
  1767. End Sub
  1768. Private Sub TreeView_Collapse(ByVal Node As MSComctlLib.Node)
  1769.     
  1770.     If Node.Index <> 1 And Node.Key <> "T" Then
  1771.         Node.Image = "Cl"
  1772.     End If
  1773. End Sub
  1774. Private Sub TreeView_Expand(ByVal Node As MSComctlLib.Node)
  1775.     
  1776.     If Node.Index <> 1 And Node.Key <> "T" Then
  1777.         Node.Image = "O"
  1778.     End If
  1779. End Sub
  1780. Private Sub TreeView_NodeClick(ByVal Node As MSComctlLib.Node)
  1781.     
  1782.     Dim code_row As Integer
  1783.     With CzxsGrid
  1784.         code_row = .FindRow(Trim(Mid(TreeView.SelectedItem.Key, 2)), , Sydz("001", GridStr(), Szzls))
  1785.         If code_row <> -1 Then
  1786.             .Select code_row, 0
  1787.         End If
  1788.     End With
  1789.     '设置工具条
  1790.     Call toolkhlb
  1791.     
  1792. End Sub
  1793. Private Sub Ydcommand1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)     '按钮提供帮助
  1794.     Call Text_Help(Index)
  1795. End Sub
  1796. Private Sub Text_Help(Index As Integer)                                                       '录入字段帮助
  1797.     
  1798.     If Not Textboolean(Index, 1) Then
  1799.         Exit Sub
  1800.     End If
  1801.    
  1802.     '调用帮助
  1803.     Call Drbmhelp(Textint(Index, 2), Textstr(Index, 4), Trim(LrText(Index).Text))
  1804.   
  1805.     '根据设置选择显示编码和名称,并进行存储
  1806.     If Len(Xtfhcs) <> 0 Then
  1807.         If Textint(Index, 3) = 1 Then
  1808.             LrText(Index).Text = Xtfhcsfz
  1809.             LrText(Index).Tag = Xtfhcs
  1810.         Else
  1811.             LrText(Index).Text = Xtfhcs
  1812.             LrText(Index).Tag = Xtfhcsfz
  1813.         End If
  1814.     End If
  1815.    
  1816.     LrText(Index).SetFocus
  1817.     
  1818. End Sub
  1819. Private Sub TextShow(Index As Integer)        '文本框得到焦点,显示相应信息
  1820.     '填写文本框得到焦点,进行相应信息处理程序
  1821. End Sub
  1822. Private Sub Wbkcsh()                          '录入文本框初始化
  1823.     
  1824.     Dim Jsqte As Integer
  1825.     '最大录入文本框索引值
  1826.     Max_Text_Index = Textvar(1)
  1827.   
  1828.     ReDim TextValiJudgeLock(Max_Text_Index)
  1829.     For Jsqte = 0 To Max_Text_Index
  1830.         If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
  1831.             If Textboolean(Jsqte, 1) Then
  1832.                 If Jsqte <> 0 And Not Textboolean(Jsqte, 3) Then
  1833.                     Load Ydcommand1(Jsqte)
  1834.                 End If
  1835.                 Ydcommand1(Jsqte).Visible = True
  1836.                 Ydcommand1(Jsqte).Move LrText(Jsqte).Left + LrText(Jsqte).Width, LrText(Jsqte).Top
  1837.             End If
  1838.             TextChangeLock = True
  1839.             LrText(Jsqte).Text = ""
  1840.             LrText(Jsqte).Tag = ""
  1841.             If Textint(Jsqte, 5) <> 0 Then
  1842.                 LrText(Jsqte).MaxLength = Textint(Jsqte, 5)
  1843.             End If
  1844.             TextChangeLock = False
  1845.         End If
  1846.         TextValiJudgeLock(Jsqte) = True
  1847.     Next Jsqte
  1848. End Sub
  1849. Private Function TextYxxpd(Index As Integer) As Boolean           '文本框有效性判断
  1850.     
  1851.     Dim Sqlstr As String
  1852.     Dim Findrec As ADODB.Recordset
  1853.   
  1854.     '文本框内容未曾改变不进行有效性判断
  1855.     If TextValiJudgeLock(Index) Then
  1856.         TextYxxpd = True
  1857.         Exit Function
  1858.     End If
  1859.   
  1860.     '文本框内容为空认为有效,并清空其Tag值
  1861.     If Trim(LrText(Index)) = "" Then
  1862.         LrText(Index).Tag = ""
  1863.         Call Wbklrwbcl(Index)
  1864.         TextValiJudgeLock(Index) = True
  1865.         TextYxxpd = True
  1866.         Exit Function
  1867.     End If
  1868.   
  1869.     '可在此加入不做有效性判断的理由
  1870.   
  1871.     Select Case Textint(Index, 4)
  1872.         Case 1      '编码型
  1873.             Sqlstr = Trim(Textstr(Index, 5))
  1874.             Sqlstr = Replace(Sqlstr, "@", "'" + Trim(LrText(Index).Text) + "'")
  1875.             Set Findrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1876.             If Findrec.EOF Then
  1877.                 Call Xtxxts(Trim(Textstr(Index, 6)), 0, 1)
  1878.                 LrText(Index).SetFocus
  1879.                 Exit Function
  1880.             Else
  1881.                 Select Case Textint(Index, 3)
  1882.                     Case 0
  1883.                         If Len(Trim(Textstr(Index, 2))) <> 0 Then
  1884.                             LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
  1885.                         End If
  1886.                         If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
  1887.                             LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
  1888.                         End If
  1889.                     Case 1
  1890.                         If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
  1891.                             LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
  1892.                         End If
  1893.                         If Len(Trim(Textstr(Index, 2))) <> 0 Then
  1894.                             LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
  1895.                         End If
  1896.                 End Select
  1897.             End If
  1898.         Case 2      '日期型
  1899.             If IsDate(LrText(Index).Text) Then
  1900.                 LrText(Index).Text = Format(LrText(Index).Text, "yyyy-mm-dd")
  1901.                 If Val(Mid(LrText(Index), 1, 4)) < 1900 Then
  1902.                     LrText(Index).Text = "1900" + Mid(LrText(Index), 5, 6)
  1903.                 End If
  1904.             Else
  1905.                 Tsxx = "非法公历日期!(格式:" + Format(Date, "yyyy-mm-dd") + ")"
  1906.                 Call Xtxxts(Tsxx, 0, 1)
  1907.                 LrText(Index).SetFocus
  1908.                 Exit Function
  1909.             End If
  1910.         Case 3      '其他类型
  1911.             If Index = 0 Then
  1912.                 Dim i As Integer, LevelLeng As Integer, tf As Boolean
  1913.                 For i = 1 To Len(CodScheme)
  1914.                     LevelLeng = LevelLeng + Val(Mid(CodScheme, i, 1))
  1915.                     If Len(Trim(LrText(0))) = LevelLeng Then
  1916.                         tf = True: Exit For
  1917.                     Else
  1918.                         tf = False
  1919.                     End If
  1920.                 Next i
  1921.                 '--------------
  1922.                 If tf = False Then
  1923.                     Tsxx = "非法编码方式!  "
  1924.                     Call Xtxxts(Tsxx, 0, 1)
  1925.                     LrText(Index).SetFocus
  1926.                     Exit Function
  1927.                 End If
  1928.                 '---------------
  1929.                 If Len(Trim(LrText(0))) <> Val(Mid(CodScheme, 1, 1)) Then
  1930.                     With CzxsGrid
  1931.                         ParentCode = Mid(Trim(LrText(0)), 1, LevelLeng - Val(Mid(CodScheme, i, 1)))
  1932.                         code_row = .FindRow(ParentCode, , Sydz("001", GridStr(), Szzls))
  1933.                         If code_row = -1 Then
  1934.                             ParentCode = ""
  1935.                             Tsxx = "没有上级编码!  "
  1936.                             Call Xtxxts(Tsxx, 0, 1)
  1937.                             LrText(Index).SetFocus
  1938.                             Exit Function
  1939.                         End If
  1940.                     End With
  1941.                 End If
  1942.                 CodeLevel = i
  1943.             End If
  1944.             
  1945.             If Index = 4 Then
  1946.                 If Val(LrText(Index).Text) > 6 Then
  1947.                     Tsxx = "保留小数最大值为6!"
  1948.                     Call Xtxxts(Tsxx, 0, 1)
  1949.                     LrText(Index).SetFocus
  1950.                     Exit Function
  1951.                 End If
  1952.             End If
  1953.     End Select
  1954.     
  1955.     '如果有效则加锁,用户不改变内容则不再进行有效性判断
  1956.     TextValiJudgeLock(Index) = True
  1957.     '调用文本框事后处理程序
  1958.     Call Wbklrwbcl(Index)
  1959.    
  1960.     '有效性判断通过则返回True
  1961.     TextYxxpd = True
  1962.        
  1963. End Function