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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  4. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  5. Begin VB.Form Gy_Supplier 
  6.    BorderStyle     =   1  'Fixed Single
  7.    Caption         =   "供应商设置"
  8.    ClientHeight    =   7005
  9.    ClientLeft      =   45
  10.    ClientTop       =   330
  11.    ClientWidth     =   9375
  12.    HelpContextID   =   2001
  13.    Icon            =   "公用_供应商设置.frx":0000
  14.    KeyPreview      =   -1  'True
  15.    LinkTopic       =   "Form2"
  16.    MaxButton       =   0   'False
  17.    MinButton       =   0   'False
  18.    ScaleHeight     =   7005
  19.    ScaleWidth      =   9375
  20.    StartUpPosition =   1  '所有者中心
  21.    Begin VB.Timer Timer1 
  22.       Enabled         =   0   'False
  23.       Interval        =   1
  24.       Left            =   2430
  25.       Top             =   585
  26.    End
  27.    Begin TabDlg.SSTab StTab 
  28.       Height          =   6300
  29.       Left            =   30
  30.       TabIndex        =   34
  31.       Top             =   660
  32.       Width           =   9315
  33.       _ExtentX        =   16431
  34.       _ExtentY        =   11113
  35.       _Version        =   393216
  36.       Style           =   1
  37.       Tabs            =   2
  38.       TabHeight       =   520
  39.       TabCaption(0)   =   "列表视图"
  40.       TabPicture(0)   =   "公用_供应商设置.frx":1042
  41.       Tab(0).ControlEnabled=   -1  'True
  42.       Tab(0).Control(0)=   "CzxsGrid"
  43.       Tab(0).Control(0).Enabled=   0   'False
  44.       Tab(0).ControlCount=   1
  45.       TabCaption(1)   =   "单张视图"
  46.       TabPicture(1)   =   "公用_供应商设置.frx":105E
  47.       Tab(1).ControlEnabled=   0   'False
  48.       Tab(1).Control(0)=   "Frame1"
  49.       Tab(1).ControlCount=   1
  50.       Begin VB.Frame Frame1 
  51.          Height          =   5880
  52.          Left            =   -74955
  53.          TabIndex        =   37
  54.          Top             =   315
  55.          Width           =   9210
  56.          Begin VB.CheckBox LrCheck 
  57.             Alignment       =   1  'Right Justify
  58.             Caption         =   "通过质量认证:"
  59.             Height          =   285
  60.             Index           =   0
  61.             Left            =   255
  62.             TabIndex        =   24
  63.             Top             =   4965
  64.             Width           =   1470
  65.          End
  66.          Begin VB.CheckBox LrCheck 
  67.             Alignment       =   1  'Right Justify
  68.             Caption         =   "评估标志:"
  69.             Height          =   285
  70.             Index           =   1
  71.             Left            =   4762
  72.             TabIndex        =   25
  73.             Top             =   4965
  74.             Width           =   1560
  75.          End
  76.          Begin VB.CommandButton Ydcommand1 
  77.             Height          =   300
  78.             Index           =   11
  79.             Left            =   8310
  80.             Picture         =   "公用_供应商设置.frx":107A
  81.             Style           =   1  'Graphical
  82.             TabIndex        =   70
  83.             Top             =   2430
  84.             Width           =   300
  85.          End
  86.          Begin VB.TextBox LrText 
  87.             Height          =   300
  88.             Index           =   22
  89.             Left            =   1515
  90.             TabIndex        =   22
  91.             Text            =   "10"
  92.             Top             =   4590
  93.             Width           =   2216
  94.          End
  95.          Begin VB.TextBox LrText 
  96.             Height          =   300
  97.             Index           =   23
  98.             Left            =   6105
  99.             TabIndex        =   23
  100.             Text            =   "39"
  101.             Top             =   4590
  102.             Width           =   2216
  103.          End
  104.          Begin VB.TextBox LrText 
  105.             Height          =   300
  106.             Index           =   15
  107.             Left            =   6105
  108.             TabIndex        =   15
  109.             Text            =   "3"
  110.             Top             =   3150
  111.             Width           =   2216
  112.          End
  113.          Begin VB.TextBox LrText 
  114.             Height          =   300
  115.             Index           =   21
  116.             Left            =   6105
  117.             TabIndex        =   21
  118.             Text            =   "9"
  119.             Top             =   4230
  120.             Width           =   2216
  121.          End
  122.          Begin VB.TextBox LrText 
  123.             Height          =   300
  124.             Index           =   17
  125.             Left            =   6105
  126.             TabIndex        =   17
  127.             Text            =   "5"
  128.             Top             =   3510
  129.             Width           =   2216
  130.          End
  131.          Begin VB.TextBox LrText 
  132.             Height          =   300
  133.             Index           =   19
  134.             Left            =   6105
  135.             TabIndex        =   19
  136.             Text            =   "7"
  137.             Top             =   3870
  138.             Width           =   2216
  139.          End
  140.          Begin VB.TextBox LrText 
  141.             Height          =   300
  142.             Index           =   18
  143.             Left            =   1515
  144.             TabIndex        =   18
  145.             Text            =   "6"
  146.             Top             =   3870
  147.             Width           =   2216
  148.          End
  149.          Begin VB.TextBox LrText 
  150.             Height          =   300
  151.             Index           =   16
  152.             Left            =   1515
  153.             TabIndex        =   16
  154.             Text            =   "4"
  155.             Top             =   3510
  156.             Width           =   2216
  157.          End
  158.          Begin VB.TextBox LrText 
  159.             Height          =   300
  160.             Index           =   14
  161.             Left            =   1515
  162.             TabIndex        =   14
  163.             Text            =   "2"
  164.             Top             =   3150
  165.             Width           =   2216
  166.          End
  167.          Begin VB.TextBox LrText 
  168.             Height          =   300
  169.             Index           =   20
  170.             Left            =   1515
  171.             TabIndex        =   20
  172.             Text            =   "8"
  173.             Top             =   4230
  174.             Width           =   2216
  175.          End
  176.          Begin VB.TextBox LrText 
  177.             Height          =   300
  178.             Index           =   12
  179.             Left            =   1515
  180.             TabIndex        =   12
  181.             Text            =   "40"
  182.             Top             =   2790
  183.             Width           =   2216
  184.          End
  185.          Begin VB.TextBox LrText 
  186.             Height          =   300
  187.             Index           =   10
  188.             Left            =   1515
  189.             TabIndex        =   10
  190.             Text            =   "10"
  191.             Top             =   2430
  192.             Width           =   2216
  193.          End
  194.          Begin VB.TextBox LrText 
  195.             Height          =   300
  196.             Index           =   13
  197.             Left            =   6105
  198.             TabIndex        =   13
  199.             Text            =   "80"
  200.             Top             =   2790
  201.             Width           =   2216
  202.          End
  203.          Begin VB.TextBox LrText 
  204.             Height          =   300
  205.             Index           =   11
  206.             Left            =   6105
  207.             TabIndex        =   11
  208.             Text            =   "39"
  209.             Top             =   2430
  210.             Width           =   2216
  211.          End
  212.          Begin VB.TextBox LrText 
  213.             Height          =   300
  214.             Index           =   3
  215.             Left            =   6105
  216.             TabIndex        =   3
  217.             Text            =   "3"
  218.             Top             =   990
  219.             Width           =   2216
  220.          End
  221.          Begin VB.TextBox LrText 
  222.             Height          =   300
  223.             Index           =   9
  224.             Left            =   6105
  225.             TabIndex        =   9
  226.             Text            =   "9"
  227.             Top             =   2070
  228.             Width           =   2216
  229.          End
  230.          Begin VB.TextBox LrText 
  231.             Height          =   300
  232.             Index           =   1
  233.             Left            =   6105
  234.             TabIndex        =   1
  235.             Text            =   "1"
  236.             Top             =   630
  237.             Width           =   2216
  238.          End
  239.          Begin VB.TextBox LrText 
  240.             Height          =   300
  241.             Index           =   5
  242.             Left            =   6105
  243.             TabIndex        =   5
  244.             Text            =   "5"
  245.             Top             =   1350
  246.             Width           =   2216
  247.          End
  248.          Begin VB.TextBox LrText 
  249.             Height          =   300
  250.             Index           =   7
  251.             Left            =   6105
  252.             TabIndex        =   7
  253.             Text            =   "7"
  254.             Top             =   1710
  255.             Width           =   2216
  256.          End
  257.          Begin VB.TextBox LrText 
  258.             Height          =   300
  259.             Index           =   6
  260.             Left            =   1515
  261.             TabIndex        =   6
  262.             Text            =   "6"
  263.             Top             =   1710
  264.             Width           =   2216
  265.          End
  266.          Begin VB.TextBox LrText 
  267.             Height          =   300
  268.             Index           =   4
  269.             Left            =   1515
  270.             TabIndex        =   4
  271.             Text            =   "4"
  272.             Top             =   1350
  273.             Width           =   2216
  274.          End
  275.          Begin VB.TextBox LrText 
  276.             Height          =   300
  277.             Index           =   0
  278.             Left            =   1515
  279.             TabIndex        =   0
  280.             Text            =   "0"
  281.             Top             =   630
  282.             Width           =   2216
  283.          End
  284.          Begin VB.TextBox LrText 
  285.             Height          =   300
  286.             Index           =   2
  287.             Left            =   1515
  288.             TabIndex        =   2
  289.             Text            =   "2"
  290.             Top             =   990
  291.             Width           =   2216
  292.          End
  293.          Begin VB.TextBox LrText 
  294.             Height          =   300
  295.             Index           =   8
  296.             Left            =   1515
  297.             TabIndex        =   8
  298.             Text            =   "8"
  299.             Top             =   2070
  300.             Width           =   2216
  301.          End
  302.          Begin VB.CheckBox LrCheck 
  303.             Alignment       =   1  'Right Justify
  304.             Caption         =   "停用标志:"
  305.             Height          =   285
  306.             Index           =   2
  307.             Left            =   255
  308.             TabIndex        =   26
  309.             Top             =   5280
  310.             Width           =   1470
  311.          End
  312.          Begin VB.CommandButton Ydcommand1 
  313.             Height          =   300
  314.             Index           =   19
  315.             Left            =   8310
  316.             Picture         =   "公用_供应商设置.frx":1404
  317.             Style           =   1  'Graphical
  318.             TabIndex        =   59
  319.             Top             =   3870
  320.             Width           =   300
  321.          End
  322.          Begin VB.CommandButton Ydcommand1 
  323.             Height          =   300
  324.             Index           =   18
  325.             Left            =   3720
  326.             Picture         =   "公用_供应商设置.frx":178E
  327.             Style           =   1  'Graphical
  328.             TabIndex        =   58
  329.             Top             =   3870
  330.             Width           =   300
  331.          End
  332.          Begin VB.CommandButton Ydcommand1 
  333.             Height          =   300
  334.             Index           =   22
  335.             Left            =   3720
  336.             Picture         =   "公用_供应商设置.frx":1B18
  337.             Style           =   1  'Graphical
  338.             TabIndex        =   43
  339.             Top             =   4590
  340.             Width           =   300
  341.          End
  342.          Begin VB.CommandButton Ydcommand1 
  343.             Height          =   300
  344.             Index           =   20
  345.             Left            =   3720
  346.             Picture         =   "公用_供应商设置.frx":1EA2
  347.             Style           =   1  'Graphical
  348.             TabIndex        =   42
  349.             Top             =   4230
  350.             Width           =   300
  351.          End
  352.          Begin VB.CommandButton Ydcommand1 
  353.             Height          =   300
  354.             Index           =   5
  355.             Left            =   8310
  356.             Picture         =   "公用_供应商设置.frx":222C
  357.             Style           =   1  'Graphical
  358.             TabIndex        =   41
  359.             Top             =   1350
  360.             Width           =   300
  361.          End
  362.          Begin VB.CommandButton Ydcommand1 
  363.             Height          =   300
  364.             Index           =   4
  365.             Left            =   3720
  366.             Picture         =   "公用_供应商设置.frx":25B6
  367.             Style           =   1  'Graphical
  368.             TabIndex        =   40
  369.             Top             =   1350
  370.             Width           =   300
  371.          End
  372.          Begin VB.CommandButton Ydcommand1 
  373.             Height          =   300
  374.             Index           =   3
  375.             Left            =   8310
  376.             Picture         =   "公用_供应商设置.frx":2940
  377.             Style           =   1  'Graphical
  378.             TabIndex        =   39
  379.             Top             =   990
  380.             Width           =   300
  381.          End
  382.          Begin VB.CommandButton QxCommand 
  383.             Cancel          =   -1  'True
  384.             Caption         =   "取消(&C)"
  385.             Height          =   300
  386.             Left            =   7922
  387.             TabIndex        =   28
  388.             Top             =   180
  389.             Width           =   1118
  390.          End
  391.          Begin VB.CommandButton BcCommand 
  392.             Caption         =   "保存(&S)"
  393.             Height          =   300
  394.             Left            =   6750
  395.             TabIndex        =   27
  396.             Top             =   180
  397.             Width           =   1118
  398.          End
  399.          Begin VB.CommandButton Command1 
  400.             Height          =   300
  401.             Left            =   5370
  402.             Picture         =   "公用_供应商设置.frx":2CCA
  403.             Style           =   1  'Graphical
  404.             TabIndex        =   29
  405.             Top             =   180
  406.             Width           =   300
  407.          End
  408.          Begin VB.CommandButton Command2 
  409.             Height          =   300
  410.             Left            =   5685
  411.             Picture         =   "公用_供应商设置.frx":3054
  412.             Style           =   1  'Graphical
  413.             TabIndex        =   30
  414.             Top             =   180
  415.             Width           =   300
  416.          End
  417.          Begin VB.CommandButton Command3 
  418.             Height          =   300
  419.             Left            =   5985
  420.             Picture         =   "公用_供应商设置.frx":33DE
  421.             Style           =   1  'Graphical
  422.             TabIndex        =   31
  423.             Top             =   180
  424.             Width           =   300
  425.          End
  426.          Begin VB.CommandButton Command4 
  427.             Height          =   300
  428.             Left            =   6290
  429.             Picture         =   "公用_供应商设置.frx":3768
  430.             Style           =   1  'Graphical
  431.             TabIndex        =   32
  432.             Top             =   180
  433.             Width           =   300
  434.          End
  435.          Begin VB.CommandButton Ydcommand1 
  436.             Height          =   300
  437.             Index           =   0
  438.             Left            =   3675
  439.             Picture         =   "公用_供应商设置.frx":3AF2
  440.             Style           =   1  'Graphical
  441.             TabIndex        =   38
  442.             Top             =   135
  443.             Visible         =   0   'False
  444.             Width           =   300
  445.          End
  446.          Begin VB.Label TsLabel 
  447.             AutoSize        =   -1  'True
  448.             Caption         =   "应付科目:"
  449.             Height          =   180
  450.             Index           =   21
  451.             Left            =   4762
  452.             TabIndex        =   69
  453.             Top             =   3915
  454.             Width           =   809
  455.          End
  456.          Begin VB.Label TsLabel 
  457.             AutoSize        =   -1  'True
  458.             Caption         =   "付款科目:"
  459.             Height          =   180
  460.             Index           =   20
  461.             Left            =   285
  462.             TabIndex        =   68
  463.             Top             =   3915
  464.             Width           =   810
  465.          End
  466.          Begin VB.Label TsLabel 
  467.             AutoSize        =   -1  'True
  468.             Caption         =   "最后付款日期:"
  469.             Height          =   180
  470.             Index           =   19
  471.             Left            =   285
  472.             TabIndex        =   67
  473.             Top             =   4635
  474.             Width           =   1170
  475.          End
  476.          Begin VB.Label TsLabel 
  477.             AutoSize        =   -1  'True
  478.             Caption         =   "应付余额:"
  479.             Height          =   180
  480.             Index           =   18
  481.             Left            =   4762
  482.             TabIndex        =   66
  483.             Top             =   4275
  484.             Width           =   809
  485.          End
  486.          Begin VB.Label TsLabel 
  487.             AutoSize        =   -1  'True
  488.             Caption         =   "预付科目:"
  489.             Height          =   180
  490.             Index           =   17
  491.             Left            =   285
  492.             TabIndex        =   65
  493.             Top             =   4275
  494.             Width           =   810
  495.          End
  496.          Begin VB.Label TsLabel 
  497.             AutoSize        =   -1  'True
  498.             Caption         =   "联系方式:"
  499.             Height          =   180
  500.             Index           =   16
  501.             Left            =   4762
  502.             TabIndex        =   64
  503.             Top             =   3555
  504.             Width           =   809
  505.          End
  506.          Begin VB.Label TsLabel 
  507.             AutoSize        =   -1  'True
  508.             Caption         =   "联系人:"
  509.             Height          =   180
  510.             Index           =   15
  511.             Left            =   285
  512.             TabIndex        =   63
  513.             Top             =   3555
  514.             Width           =   630
  515.          End
  516.          Begin VB.Label TsLabel 
  517.             AutoSize        =   -1  'True
  518.             Caption         =   "信用等级:"
  519.             Height          =   180
  520.             Index           =   13
  521.             Left            =   285
  522.             TabIndex        =   62
  523.             Top             =   3195
  524.             Width           =   810
  525.          End
  526.          Begin VB.Label TsLabel 
  527.             AutoSize        =   -1  'True
  528.             Caption         =   "网址:"
  529.             Height          =   180
  530.             Index           =   12
  531.             Left            =   4762
  532.             TabIndex        =   61
  533.             Top             =   3195
  534.             Width           =   449
  535.          End
  536.          Begin VB.Label TsLabel 
  537.             AutoSize        =   -1  'True
  538.             Caption         =   "最后付款金额:"
  539.             Height          =   180
  540.             Index           =   2
  541.             Left            =   4762
  542.             TabIndex        =   60
  543.             Top             =   4635
  544.             Width           =   1168
  545.          End
  546.          Begin VB.Label TsLabel 
  547.             AutoSize        =   -1  'True
  548.             Caption         =   "E-Mail:"
  549.             Height          =   180
  550.             Index           =   62
  551.             Left            =   4762
  552.             TabIndex        =   57
  553.             Top             =   2835
  554.             Width           =   629
  555.          End
  556.          Begin VB.Label TsLabel 
  557.             AutoSize        =   -1  'True
  558.             Caption         =   "发展日期:"
  559.             Height          =   180
  560.             Index           =   47
  561.             Left            =   4762
  562.             TabIndex        =   56
  563.             Top             =   2475
  564.             Width           =   809
  565.          End
  566.          Begin VB.Label TsLabel 
  567.             Alignment       =   1  'Right Justify
  568.             AutoSize        =   -1  'True
  569.             Caption         =   "法人:"
  570.             Height          =   180
  571.             Index           =   39
  572.             Left            =   285
  573.             TabIndex        =   55
  574.             Top             =   2835
  575.             Width           =   450
  576.          End
  577.          Begin VB.Label TsLabel 
  578.             AutoSize        =   -1  'True
  579.             Caption         =   "所属供应商分类:"
  580.             Height          =   180
  581.             Index           =   38
  582.             Left            =   4762
  583.             TabIndex        =   54
  584.             Top             =   1035
  585.             Width           =   1348
  586.          End
  587.          Begin VB.Label TsLabel 
  588.             AutoSize        =   -1  'True
  589.             Caption         =   "供应商简称:"
  590.             Height          =   180
  591.             Index           =   4
  592.             Left            =   285
  593.             TabIndex        =   53
  594.             Top             =   1035
  595.             Width           =   990
  596.          End
  597.          Begin VB.Label TsLabel 
  598.             AutoSize        =   -1  'True
  599.             Caption         =   "供应商编码:"
  600.             Height          =   180
  601.             Index           =   1
  602.             Left            =   285
  603.             TabIndex        =   52
  604.             Top             =   675
  605.             Width           =   990
  606.          End
  607.          Begin VB.Label TsLabel 
  608.             AutoSize        =   -1  'True
  609.             Caption         =   "供应商名称:"
  610.             Height          =   180
  611.             Index           =   3
  612.             Left            =   4762
  613.             TabIndex        =   51
  614.             Top             =   675
  615.             Width           =   988
  616.          End
  617.          Begin VB.Label TsLabel 
  618.             AutoSize        =   -1  'True
  619.             Caption         =   "所属地区:"
  620.             Height          =   180
  621.             Index           =   5
  622.             Left            =   285
  623.             TabIndex        =   50
  624.             Top             =   1395
  625.             Width           =   810
  626.          End
  627.          Begin VB.Label TsLabel 
  628.             AutoSize        =   -1  'True
  629.             Caption         =   "所属行业:"
  630.             Height          =   180
  631.             Index           =   6
  632.             Left            =   4762
  633.             TabIndex        =   49
  634.             Top             =   1395
  635.             Width           =   809
  636.          End
  637.          Begin VB.Label TsLabel 
  638.             AutoSize        =   -1  'True
  639.             Caption         =   "纳税人登记号:"
  640.             Height          =   180
  641.             Index           =   8
  642.             Left            =   285
  643.             TabIndex        =   48
  644.             Top             =   2115
  645.             Width           =   1170
  646.          End
  647.          Begin VB.Label TsLabel 
  648.             AutoSize        =   -1  'True
  649.             Caption         =   "开户银行:"
  650.             Height          =   180
  651.             Index           =   9
  652.             Left            =   4762
  653.             TabIndex        =   47
  654.             Top             =   2115
  655.             Width           =   809
  656.          End
  657.          Begin VB.Label TsLabel 
  658.             AutoSize        =   -1  'True
  659.             Caption         =   "银行账号:"
  660.             Height          =   180
  661.             Index           =   10
  662.             Left            =   285
  663.             TabIndex        =   46
  664.             Top             =   2475
  665.             Width           =   810
  666.          End
  667.          Begin VB.Label TsLabel 
  668.             AutoSize        =   -1  'True
  669.             Caption         =   "地址:"
  670.             Height          =   180
  671.             Index           =   7
  672.             Left            =   285
  673.             TabIndex        =   45
  674.             Top             =   1755
  675.             Width           =   450
  676.          End
  677.          Begin VB.Label TsLabel 
  678.             AutoSize        =   -1  'True
  679.             Caption         =   "邮政编码:"
  680.             Height          =   180
  681.             Index           =   14
  682.             Left            =   4762
  683.             TabIndex        =   44
  684.             Top             =   1755
  685.             Width           =   809
  686.          End
  687.       End
  688.       Begin VSFlex8Ctl.VSFlexGrid CzxsGrid 
  689.          Height          =   5835
  690.          Left            =   90
  691.          TabIndex        =   33
  692.          Top             =   390
  693.          Width           =   9120
  694.          _cx             =   5080
  695.          _cy             =   5080
  696.          Appearance      =   1
  697.          BorderStyle     =   1
  698.          Enabled         =   -1  'True
  699.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  700.             Name            =   "宋体"
  701.             Size            =   9
  702.             Charset         =   134
  703.             Weight          =   400
  704.             Underline       =   0   'False
  705.             Italic          =   0   'False
  706.             Strikethrough   =   0   'False
  707.          EndProperty
  708.          MousePointer    =   0
  709.          BackColor       =   -2147483643
  710.          ForeColor       =   -2147483640
  711.          BackColorFixed  =   -2147483633
  712.          ForeColorFixed  =   -2147483630
  713.          BackColorSel    =   -2147483635
  714.          ForeColorSel    =   -2147483634
  715.          BackColorBkg    =   8421504
  716.          BackColorAlternate=   -2147483643
  717.          GridColor       =   -2147483633
  718.          GridColorFixed  =   -2147483632
  719.          TreeColor       =   -2147483632
  720.          FloodColor      =   192
  721.          SheetBorder     =   -2147483642
  722.          FocusRect       =   1
  723.          HighLight       =   1
  724.          AllowSelection  =   -1  'True
  725.          AllowBigSelection=   -1  'True
  726.          AllowUserResizing=   0
  727.          SelectionMode   =   0
  728.          GridLines       =   1
  729.          GridLinesFixed  =   2
  730.          GridLineWidth   =   1
  731.          Rows            =   5000
  732.          Cols            =   10
  733.          FixedRows       =   1
  734.          FixedCols       =   0
  735.          RowHeightMin    =   0
  736.          RowHeightMax    =   0
  737.          ColWidthMin     =   0
  738.          ColWidthMax     =   0
  739.          ExtendLastCol   =   0   'False
  740.          FormatString    =   ""
  741.          ScrollTrack     =   0   'False
  742.          ScrollBars      =   3
  743.          ScrollTips      =   0   'False
  744.          MergeCells      =   0
  745.          MergeCompare    =   0
  746.          AutoResize      =   -1  'True
  747.          AutoSizeMode    =   0
  748.          AutoSearch      =   0
  749.          AutoSearchDelay =   2
  750.          MultiTotals     =   -1  'True
  751.          SubtotalPosition=   1
  752.          OutlineBar      =   0
  753.          OutlineCol      =   0
  754.          Ellipsis        =   0
  755.          ExplorerBar     =   0
  756.          PicturesOver    =   0   'False
  757.          FillStyle       =   0
  758.          RightToLeft     =   0   'False
  759.          PictureType     =   0
  760.          TabBehavior     =   0
  761.          OwnerDraw       =   0
  762.          Editable        =   0
  763.          ShowComboButton =   1
  764.          WordWrap        =   0   'False
  765.          TextStyle       =   0
  766.          TextStyleFixed  =   0
  767.          OleDragMode     =   0
  768.          OleDropMode     =   0
  769.          DataMode        =   0
  770.          VirtualData     =   -1  'True
  771.          DataMember      =   ""
  772.          ComboSearch     =   3
  773.          AutoSizeMouse   =   -1  'True
  774.          FrozenRows      =   0
  775.          FrozenCols      =   0
  776.          AllowUserFreezing=   0
  777.          BackColorFrozen =   0
  778.          ForeColorFrozen =   0
  779.          WallPaperAlignment=   9
  780.          AccessibleName  =   ""
  781.          AccessibleDescription=   ""
  782.          AccessibleValue =   ""
  783.          AccessibleRole  =   24
  784.       End
  785.    End
  786.    Begin MSComctlLib.Toolbar SzToolbar 
  787.       Align           =   1  'Align Top
  788.       Height          =   555
  789.       Left            =   0
  790.       TabIndex        =   35
  791.       Top             =   0
  792.       Width           =   9375
  793.       _ExtentX        =   16536
  794.       _ExtentY        =   979
  795.       ButtonWidth     =   820
  796.       ButtonHeight    =   926
  797.       AllowCustomize  =   0   'False
  798.       Appearance      =   1
  799.       Style           =   1
  800.       ImageList       =   "ImageList1"
  801.       _Version        =   393216
  802.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  803.          NumButtons      =   13
  804.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  805.             Caption         =   "设置"
  806.             Key             =   "ymsz"
  807.             ImageKey        =   "sz"
  808.          EndProperty
  809.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  810.             Caption         =   "打印"
  811.             Key             =   "dy"
  812.             Object.ToolTipText     =   "点击或按Ctrl+P打印表格"
  813.             ImageKey        =   "dy"
  814.          EndProperty
  815.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  816.             Caption         =   "预览"
  817.             Key             =   "yl"
  818.             ImageKey        =   "yl"
  819.          EndProperty
  820.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  821.             Style           =   3
  822.          EndProperty
  823.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  824.             Caption         =   "增加"
  825.             Key             =   "zj"
  826.             Object.ToolTipText     =   "点击或按Ctrl+A增加记录"
  827.             ImageKey        =   "xz"
  828.          EndProperty
  829.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  830.             Caption         =   "修改"
  831.             Key             =   "xg"
  832.             ImageKey        =   "xg"
  833.          EndProperty
  834.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  835.             Caption         =   "删除"
  836.             Key             =   "sc"
  837.             Object.ToolTipText     =   "点击或按Ctrl+D删除当前记录"
  838.             ImageKey        =   "sc"
  839.          EndProperty
  840.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  841.             Style           =   3
  842.          EndProperty
  843.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  844.             Caption         =   "查询"
  845.             Key             =   "cx"
  846.             ImageIndex      =   24
  847.          EndProperty
  848.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  849.             Caption         =   "刷新"
  850.             Key             =   "sx"
  851.             ImageKey        =   "sx"
  852.          EndProperty
  853.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  854.             Style           =   3
  855.          EndProperty
  856.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  857.             Caption         =   "帮助"
  858.             Key             =   "bz"
  859.             ImageKey        =   "bz"
  860.          EndProperty
  861.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  862.             Caption         =   "退出"
  863.             Key             =   "fh"
  864.             ImageKey        =   "tc"
  865.          EndProperty
  866.       EndProperty
  867.       BorderStyle     =   1
  868.       Begin MSComctlLib.Toolbar GsToolbar 
  869.          Height          =   525
  870.          Left            =   6870
  871.          TabIndex        =   36
  872.          Top             =   0
  873.          Width           =   2475
  874.          _ExtentX        =   4366
  875.          _ExtentY        =   926
  876.          ButtonWidth     =   1455
  877.          ButtonHeight    =   926
  878.          AllowCustomize  =   0   'False
  879.          Appearance      =   1
  880.          Style           =   1
  881.          ImageList       =   "ImageList1"
  882.          _Version        =   393216
  883.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  884.             NumButtons      =   3
  885.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  886.                Caption         =   "保存格式"
  887.                Key             =   "bcgs"
  888.                ImageKey        =   "bcgs"
  889.             EndProperty
  890.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  891.                Caption         =   "默认列宽"
  892.                Key             =   "hfmrgs"
  893.                ImageKey        =   "mrlk"
  894.             EndProperty
  895.             BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  896.                Caption         =   "显示项目"
  897.                Key             =   "szxsxm"
  898.                ImageKey        =   "xsxm"
  899.             EndProperty
  900.          EndProperty
  901.       End
  902.    End
  903.    Begin MSComctlLib.ImageList ImageList1 
  904.       Left            =   0
  905.       Top             =   420
  906.       _ExtentX        =   1005
  907.       _ExtentY        =   1005
  908.       BackColor       =   -2147483643
  909.       ImageWidth      =   16
  910.       ImageHeight     =   16
  911.       MaskColor       =   12632256
  912.       _Version        =   393216
  913.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  914.          NumListImages   =   29
  915.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  916.             Picture         =   "公用_供应商设置.frx":3E7C
  917.             Key             =   "sz"
  918.          EndProperty
  919.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  920.             Picture         =   "公用_供应商设置.frx":4216
  921.             Key             =   "dy"
  922.          EndProperty
  923.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  924.             Picture         =   "公用_供应商设置.frx":45B0
  925.             Key             =   "yl"
  926.          EndProperty
  927.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  928.             Picture         =   "公用_供应商设置.frx":494A
  929.             Key             =   "xg"
  930.          EndProperty
  931.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  932.             Picture         =   "公用_供应商设置.frx":4CE4
  933.             Key             =   "zh"
  934.          EndProperty
  935.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  936.             Picture         =   "公用_供应商设置.frx":507E
  937.             Key             =   "sh"
  938.          EndProperty
  939.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  940.             Picture         =   "公用_供应商设置.frx":5418
  941.             Key             =   "bc"
  942.          EndProperty
  943.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  944.             Picture         =   "公用_供应商设置.frx":57B2
  945.             Key             =   "fq"
  946.          EndProperty
  947.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  948.             Picture         =   "公用_供应商设置.frx":5B4C
  949.             Key             =   "bz"
  950.          EndProperty
  951.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  952.             Picture         =   "公用_供应商设置.frx":5EE6
  953.             Key             =   "tc"
  954.          EndProperty
  955.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  956.             Picture         =   "公用_供应商设置.frx":6280
  957.             Key             =   "bcgs"
  958.          EndProperty
  959.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  960.             Picture         =   "公用_供应商设置.frx":661A
  961.             Key             =   "mrlk"
  962.          EndProperty
  963.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  964.             Picture         =   "公用_供应商设置.frx":69B4
  965.             Key             =   "xsxm"
  966.          EndProperty
  967.          BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  968.             Picture         =   "公用_供应商设置.frx":6D4E
  969.             Key             =   "first"
  970.          EndProperty
  971.          BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  972.             Picture         =   "公用_供应商设置.frx":70E8
  973.             Key             =   "prev"
  974.          EndProperty
  975.          BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  976.             Picture         =   "公用_供应商设置.frx":7482
  977.             Key             =   "next"
  978.          EndProperty
  979.          BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  980.             Picture         =   "公用_供应商设置.frx":781C
  981.             Key             =   "last"
  982.          EndProperty
  983.          BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  984.             Picture         =   "公用_供应商设置.frx":7BB6
  985.             Key             =   "xx"
  986.          EndProperty
  987.          BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  988.             Picture         =   "公用_供应商设置.frx":7F50
  989.             Key             =   "define"
  990.          EndProperty
  991.          BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  992.             Picture         =   "公用_供应商设置.frx":82EA
  993.             Key             =   "exec"
  994.          EndProperty
  995.          BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  996.             Picture         =   "公用_供应商设置.frx":8684
  997.             Key             =   "xz"
  998.          EndProperty
  999.          BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  1000.             Picture         =   "公用_供应商设置.frx":8A1E
  1001.             Key             =   "sc"
  1002.          EndProperty
  1003.          BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  1004.             Picture         =   "公用_供应商设置.frx":8DB8
  1005.             Key             =   "sx"
  1006.          EndProperty
  1007.          BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  1008.             Picture         =   "公用_供应商设置.frx":9152
  1009.             Key             =   "cx"
  1010.          EndProperty
  1011.          BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  1012.             Picture         =   "公用_供应商设置.frx":94EC
  1013.             Key             =   "zd"
  1014.          EndProperty
  1015.          BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  1016.             Picture         =   "公用_供应商设置.frx":9886
  1017.             Key             =   "dz"
  1018.          EndProperty
  1019.          BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  1020.             Picture         =   "公用_供应商设置.frx":9C20
  1021.             Key             =   "ph"
  1022.          EndProperty
  1023.          BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  1024.             Picture         =   "公用_供应商设置.frx":9FBA
  1025.             Key             =   "fz"
  1026.          EndProperty
  1027.          BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  1028.             Picture         =   "公用_供应商设置.frx":A354
  1029.             Key             =   "dw"
  1030.          EndProperty
  1031.       EndProperty
  1032.    End
  1033. End
  1034. Attribute VB_Name = "Gy_Supplier"
  1035. Attribute VB_GlobalNameSpace = False
  1036. Attribute VB_Creatable = False
  1037. Attribute VB_PredeclaredId = True
  1038. Attribute VB_Exposed = False
  1039. '*******************************************************
  1040. '*    模 块 名 称 :供应商档案设置
  1041. '*    功 能 描 述 :设置往来供应商档案
  1042. '*    程序员姓名  :徐强
  1043. '*    最后修改人  :徐强
  1044. '*    最后修改时间:2001/11/27
  1045. '*    备        注:
  1046. '*******************************************************
  1047. Dim Rec_CodeSet As New ADODB.Recordset   '编码设置表
  1048. Dim jdzygs As Integer                    '控件焦点转移个数
  1049. Dim Lrzt As Integer                      '录入状态标志(0-非录入状态 1-增加 2-修改)
  1050. Dim ReportTitle As String                '报表主标题
  1051. Dim Str_RightEdit As String              '编辑(新增、修改、删除)权限索引
  1052. '以下为固定使用变量(网格)
  1053. Dim Cxnrrec As New ADODB.Recordset       '显示查询内容动态集
  1054. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  1055. Dim GridCode As String                   '显示网格网格代码
  1056. Dim GridInf() As Variant                 '整个网格设置信息
  1057. Dim Tsxx As String                       '系统提示信息
  1058. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  1059. Dim Sjhgd As Double                      '网格数据行高度
  1060. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  1061. Dim GridStr()  As String                 '网格列信息(字符型)
  1062. Dim GridInt() As Integer                 '网格列信息(整型)
  1063. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  1064. '以下为固定使用变量(文本框)
  1065. Dim Textvar() As Variant                 '存储变体型文本框信息
  1066. Dim Textboolean() As Boolean             '存储布尔型文本框信息
  1067. Dim Textint() As Integer                 '存储整型文本框信息
  1068. Dim Textstr() As String                  '存储字符型文本框信息
  1069. Dim Max_Text_Index As Integer            '最大录入文本框索引值
  1070. Dim TextGroupCode As String              '文本框录入分组编码
  1071. Dim TextValiLock As Boolean              '文本框失去焦点是否进行有效性控制判断
  1072. Dim TextValiJudgeLock() As Boolean       '文本框录入有效性判断控制锁
  1073. Dim CurTextIndex As Integer              '当前文本框索引值
  1074. Dim TextChangeLock As Boolean            '文本框内容变换控制锁
  1075. Dim Bln_Cancel As Boolean                '取消按钮信息传递
  1076. Dim str_SupplierName As String           '供应商名称
  1077. Private Sub Form_KeyPress(KeyAscii As Integer)   '控 制 焦 点 转 移
  1078.     jdzygs = 34
  1079.     
  1080.     Select Case KeyAscii
  1081.         Case vbKeyReturn
  1082.             If Kjjdzy(jdzygs) Then
  1083.                 KeyAscii = 0
  1084.             End If
  1085.         Case 39           '屏蔽"'"
  1086.             KeyAscii = 0
  1087.    End Select
  1088.    
  1089. End Sub
  1090. Private Sub Form_Load()
  1091.   
  1092.     '打印报表标题信息
  1093.     ReportTitle = "供 应 商 设 置"
  1094.      
  1095.     '调入打印页面设置窗体
  1096.     XtReportCode = "Gy_Supplier"
  1097.     Load Dyymctbl
  1098.     
  1099.     '以下为文本框处理程序(读入文本框录入信息)
  1100.     TextGroupCode = "Gy_Supplier"
  1101.     Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())
  1102.     Call Wbkcsh
  1103.     
  1104.     '调入网格设置信息
  1105.     GridCode = "Gy_Supplier"
  1106.     Call BzWgcsh(CzxsGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  1107.     Qslz = GridInf(1)
  1108.     Sjhgd = GridInf(2)
  1109.     Szzls = CzxsGrid.Cols - 1
  1110.     
  1111.     '填 充 网 格
  1112.        
  1113.     '初始化toolbar,tab卡状态
  1114.     StTab.Tab = 0
  1115.     StTab.TabEnabled(1) = False
  1116.     Frame1.Enabled = False
  1117.      
  1118.     '设置为非录入状态
  1119.     Lrzt = 0
  1120.     
  1121.     '编辑(新增、修改、删除)权限索引
  1122.     Str_RightEdit = "Gy_Supplier_Edit"
  1123. End Sub
  1124.  
  1125. Private Sub Cxnrtcwg(Optional Sqlstr As String)                                '查询内容填充网格
  1126.     Dim Jsqte As Long                '查询临时使用变量
  1127.   
  1128.     '为加快显示速度,将网格刷新动作冻结
  1129.     CzxsGrid.Redraw = False
  1130.   
  1131.     '[>>查询连接串
  1132.     If Sqlstr = "" Then
  1133.         Sqlstr = "SELECT * FROM Gy_V_Supplier order by suppliercode"
  1134.     End If
  1135.     '<<]
  1136.     Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1137.     
  1138.     With Cxnrrec
  1139.         CzxsGrid.Rows = CzxsGrid.FixedRows
  1140.         If .EOF And .BOF Then
  1141.             CzxsGrid.Redraw = True
  1142.             Exit Sub
  1143.         End If
  1144.         
  1145.         Jsqte = CzxsGrid.FixedRows
  1146.         
  1147.         Do While Not .EOF
  1148.             CzxsGrid.AddItem ""
  1149.             Call Jltcwg(Cxnrrec, Jsqte)                              '调入填充网格子过程
  1150.             CzxsGrid.RowHeight(Jsqte) = Sjhgd                        '设置网格高度
  1151.             .MoveNext
  1152.             Jsqte = Jsqte + 1
  1153.         Loop
  1154.     End With
  1155.   
  1156.     '将网格刷新动作解冻
  1157.     CzxsGrid.Redraw = True
  1158.     
  1159. End Sub
  1160. Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long)           '记录内容填充网格
  1161.     '[>>以下为自定义部分
  1162.     With Jlbrec
  1163.         CzxsGrid.TextMatrix(Rowjsq, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("suppliercode") & "")            '供应商编码
  1164.         CzxsGrid.TextMatrix(Rowjsq, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("supplierName") & "")            '供应商名称
  1165.         CzxsGrid.TextMatrix(Rowjsq, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("supplierforshort") & "")        '供应商简称
  1166.         CzxsGrid.TextMatrix(Rowjsq, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("suppliersortname") & "")        '所属分类
  1167.         CzxsGrid.TextMatrix(Rowjsq, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("areaname") & "")                '所属地区
  1168.         CzxsGrid.TextMatrix(Rowjsq, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("tradename") & "")               '所属行业
  1169.         CzxsGrid.TextMatrix(Rowjsq, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("address") & "")                 '地址
  1170.         CzxsGrid.TextMatrix(Rowjsq, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("postcode") & "")                '邮政编码
  1171.         CzxsGrid.TextMatrix(Rowjsq, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("taxpayer") & "")                '纳税人登记
  1172.         CzxsGrid.TextMatrix(Rowjsq, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("Bank") & "")                    '开户银行
  1173.         CzxsGrid.TextMatrix(Rowjsq, Sydz("011", GridStr(), Szzls)) = Trim(.Fields("BankAccount") & "")             '银行帐号
  1174.         CzxsGrid.TextMatrix(Rowjsq, Sydz("012", GridStr(), Szzls)) = Format(.Fields("relationdate") & "", "yyyy-mm-dd")   '发展日期
  1175.         CzxsGrid.TextMatrix(Rowjsq, Sydz("013", GridStr(), Szzls)) = Trim(.Fields("fictperson") & "")              '法人
  1176.         CzxsGrid.TextMatrix(Rowjsq, Sydz("014", GridStr(), Szzls)) = Trim(.Fields("email") & "")                   'email
  1177.         CzxsGrid.TextMatrix(Rowjsq, Sydz("015", GridStr(), Szzls)) = Trim(.Fields("contactperson") & "")           '联系人
  1178.         CzxsGrid.TextMatrix(Rowjsq, Sydz("016", GridStr(), Szzls)) = Trim(.Fields("contacttype") & "")             '联系方式
  1179.         CzxsGrid.TextMatrix(Rowjsq, Sydz("017", GridStr(), Szzls)) = Trim(.Fields("creditgrade") & "")             '信用等级
  1180.         CzxsGrid.TextMatrix(Rowjsq, Sydz("018", GridStr(), Szzls)) = Trim(.Fields("isrz") & "")                    '是否用过质量认证
  1181.         CzxsGrid.TextMatrix(Rowjsq, Sydz("019", GridStr(), Szzls)) = Trim(.Fields("evalflag") & "")                '评估标志
  1182.         CzxsGrid.TextMatrix(Rowjsq, Sydz("020", GridStr(), Szzls)) = Trim(.Fields("stopflag") & "")                '停用标志
  1183.     End With
  1184.     '以上为自定义部分<<]
  1185.     
  1186. End Sub
  1187. Private Sub Form_Unload(Cancel As Integer)             '窗体卸载
  1188.     Set Cxnrrec = Nothing
  1189.     Set Rec_CodeSet = Nothing
  1190.     Unload Dyymctbl
  1191.     Gy_SupplierQuery.UnloadCheck = 1
  1192.     Unload Gy_SupplierQuery
  1193. End Sub
  1194. Private Function Bclrsj() As Boolean                   '判断录入数据有效性,并保存数据
  1195.     Dim Jsqte As Integer
  1196.     Dim I As Long
  1197.     Dim str_tmp As String
  1198.     Dim likenum As Long
  1199.     Dim rs As New ADODB.Recordset
  1200.     Dim intyesno As Integer
  1201.     
  1202.     '对文本框录入内容进行为零和为空判断(固定不变)
  1203.     With Rec_CodeSet
  1204.     
  1205.         For Jsqte = 0 To Max_Text_Index
  1206.             If Textint(Jsqte, 8) = 1 Then     '字段不能为空
  1207.                 If Len(Trim(LrText(Jsqte).Text)) = 0 Then
  1208.                     Tsxx = Textstr(Jsqte, 7) & "不能为空!"
  1209.                     Call Xtxxts(Tsxx, 0, 1)
  1210.                     LrText(Jsqte).SetFocus
  1211.                     Bclrsj = False
  1212.                     Exit Function
  1213.                 End If
  1214.             Else
  1215.                 If Textint(Jsqte, 8) = 2 Then   '字段不能为零
  1216.                     If Val(Trim(LrText(Jsqte).Text)) = 0 Then
  1217.                         Tsxx = Textstr(Jsqte, 7) & "不能为零!"
  1218.                         Call Xtxxts(Tsxx, 0, 1)
  1219.                         LrText(Jsqte).SetFocus
  1220.                         Bclrsj = False
  1221.                         Exit Function
  1222.                     End If
  1223.                 End If
  1224.             End If
  1225.         Next Jsqte
  1226.     
  1227.         '对需要进行事后判断的文本框录入内容进行有效性判断 (固定不变)
  1228.         For Jsqte = 0 To Max_Text_Index
  1229.             If Textint(Jsqte, 9) = 0 Or Textint(Jsqte, 9) = 2 Then
  1230.                 If Not TextYxxpd(Jsqte) Then
  1231.                     Exit Function
  1232.                 End If
  1233.             End If
  1234.         Next Jsqte
  1235.    
  1236.         If Lrzt = 1 Then  '增 加
  1237.         '******************************************
  1238.         '计算供应商名称相似率(相同字的个数/长度)
  1239.         likenum = 0
  1240.         j = 0
  1241.         'rs用于取出相似率
  1242.         rs.Open "select itemvalue from gy_accinformation where itemcode='gy_supplier'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1243.         If .State = 1 Then .Close
  1244.         .Open "SELECT suppliername FROM gy_supplier ", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1245.         str_tmp = Trim(LrText(1))
  1246.         Do While Not .EOF
  1247.             For I = 1 To Len(str_tmp)
  1248.                 If InStr(1, Trim(.Fields("suppliername")), Mid(str_tmp, I, 1)) Then
  1249.                     likenum = likenum + 1
  1250.                 End If
  1251.             Next
  1252.             
  1253.             If likenum * 100# / Len(str_tmp) > Val(rs("itemvalue")) Then
  1254.                 suppliername = suppliername & "        " & Trim(.Fields("suppliername")) & "     " & Chr(13)
  1255.             End If
  1256.             likenum = 0
  1257.             .MoveNext
  1258.         Loop
  1259.         If Len(suppliername) > 0 Then
  1260.             Tsxx = "存在相似的供应商名称:" & Chr(13) & suppliername & "要继续吗?"
  1261.                 If Xtxxts(Tsxx, 1, 2) = vbNo Then
  1262.                     LrText(1).SetFocus
  1263.                     Bclrsj = False
  1264.                     Exit Function
  1265.                 End If
  1266.         End If
  1267.         Set rs = Nothing
  1268.         '****************************************************
  1269.             '[>>判断编码是否重复
  1270.             If .State = 1 Then .Close
  1271.             .Open "SELECT * FROM Gy_Supplier WHERE suppliercode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1272.     
  1273.             If Not .EOF Then
  1274.                 Tsxx = "供应商编码重复!"
  1275.                 Call Xtxxts(Tsxx, 0, 1)
  1276.                 LrText(0).SetFocus
  1277.                 Bclrsj = False
  1278.                 Exit Function
  1279.             End If
  1280.     
  1281.             If .State = 1 Then .Close
  1282.             .Open "SELECT * FROM Gy_Supplier WHERE suppliername= '" + Trim(LrText(1).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1283.     
  1284.             '判断记录内容无误后,将记录内容写入数据表
  1285.             On Error GoTo Swcwcl
  1286.     
  1287.             Cw_DataEnvi.DataConnect.BeginTrans
  1288.    
  1289.             .AddNew
  1290.             .Fields("suppliercode") = Trim(LrText(0).Text)      '供应商编码
  1291.             .Fields("suppliername") = Trim(LrText(1).Text)      '供应商名称
  1292.             .Fields("supplierforshort") = Trim(LrText(2))       '简称
  1293.             .Fields("suppliersort") = Trim(LrText(3).Tag)       '所属分类
  1294.             If Trim(LrText(4).Tag) <> "" Then
  1295.                 .Fields("areacode") = Trim(LrText(4).Tag)       '地区编码
  1296.             Else
  1297.                 .Fields("areacode") = Null
  1298.             End If
  1299.             If Trim(LrText(5).Tag) <> "" Then
  1300.                 .Fields("tradecode") = Trim(LrText(5).Tag)      '行业编码
  1301.             Else
  1302.                 .Fields("tradecode") = Null
  1303.             End If
  1304.             .Fields("address") = Trim(LrText(6))                '地址
  1305.             .Fields("postcode") = Trim(LrText(7))               '邮政编码
  1306.             .Fields("taxpayer") = Trim(LrText(8).Text)          '纳税人登记号
  1307.             .Fields("bank") = Trim(LrText(9).Text)              '开户银行
  1308.             .Fields("BankAccount") = Trim(LrText(10).Text)      '银行账号
  1309.             If IsDate(Trim(LrText(11).Text)) Then               '发展日期
  1310.                 .Fields("relationdate") = Trim(LrText(11).Text)
  1311.             Else
  1312.                 .Fields("relationdate") = Null
  1313.             End If
  1314.             .Fields("fictperson") = Trim(LrText(12).Text)       '法人
  1315.             .Fields("email") = Trim(LrText(13).Text)
  1316.             .Fields("creditgrade") = Trim(LrText(14).Text)      '信用等级
  1317.             .Fields("worknet") = Trim(LrText(15).Text)          '网址
  1318.             
  1319.             .Fields("contactperson") = Trim(LrText(16).Text)    '联系人
  1320.             .Fields("contacttype") = Trim(LrText(17).Text)      '联系方式
  1321.             If Trim(LrText(18).Text) <> "" Then
  1322.                 .Fields("rpacccode") = Trim(LrText(18).Tag)     '付款科目
  1323.             Else
  1324.                 .Fields("rpacccode") = Null
  1325.             End If
  1326.             If Trim(LrText(19).Text) <> "" Then
  1327.                 .Fields("apacccode") = Trim(LrText(19).Tag)     '应付科目
  1328.             Else
  1329.                 .Fields("apacccode") = Null
  1330.             End If
  1331.             If Trim(LrText(20).Text) <> "" Then
  1332.                 .Fields("ppacccode") = Trim(LrText(20).Tag)     '预付科目
  1333.             Else
  1334.                 .Fields("ppacccode") = Null
  1335.             End If
  1336.             .Fields("payment") = Val(LrText(21).Text)           '应付余额
  1337.             If IsDate(Trim(LrText(22).Text)) Then               '最后付款日期
  1338.                 .Fields("lastpaymentdate") = Trim(LrText(22).Text)
  1339.             Else
  1340.                 .Fields("lastpaymentdate") = Null
  1341.             End If
  1342.             .Fields("lastpaymentmoney") = Val(LrText(23))       '最后付款金额
  1343. '
  1344.             If LrCheck(0).Value Then    '是否通过质量认证
  1345.                 .Fields("isRz") = 1
  1346.             Else
  1347.                 .Fields("isrz") = 0
  1348.             End If
  1349.             If LrCheck(1).Value Then    '评估标志
  1350.                 .Fields("evalflag") = 1
  1351.             Else
  1352.                 .Fields("evalflag") = 0
  1353.             End If
  1354.             If LrCheck(2).Value Then    '停用标志
  1355.                 .Fields("stopflag") = 1
  1356.             Else
  1357.                 .Fields("stopflag") = 0
  1358.             End If
  1359.             .Update
  1360.             Cw_DataEnvi.DataConnect.CommitTrans
  1361.             '将记录加入网格
  1362.             Sqlstr = "SELECT * FROM Gy_V_Supplier WHERE suppliercode= '" + Trim(LrText(0).Text) + "'"
  1363.             Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1364.    
  1365.             With CzxsGrid
  1366.                 .AddItem ""
  1367.                 .RowHeight(.Rows - 1) = Sjhgd
  1368.                 .Select .Rows - 1, Qslz
  1369.                 Call Jltcwg(Cxnrrec, .Rows - 1)
  1370.             End With
  1371.             Tsxx = "保存完毕!"
  1372.             Call Xtxxts(Tsxx, 0, 4)
  1373.             
  1374.             Call Cshlrxx(1)
  1375.             LrText(0).SetFocus
  1376.             '将网格按编码排序
  1377.             With CzxsGrid
  1378.                 .Col = Sydz("001", GridStr(), Szzls)
  1379.                 CzxsGrid.Sort = flexSortStringAscending
  1380.             End With
  1381.             '<<]
  1382.     
  1383.         Else  '否则为修改记录
  1384.  
  1385.         '******************************************
  1386.         '计算供应商名称相似率(相同字的个数/长度)
  1387.         If str_SupplierName <> Trim(LrText(1)) Then '如果供应商名称有改变
  1388.             likenum = 0
  1389.             j = 0
  1390.             'rs用于取出相似率
  1391.             rs.Open "select itemvalue from gy_accinformation where itemcode='gy_supplier'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1392.             
  1393.             If .State = 1 Then .Close
  1394.             .Open "SELECT suppliername FROM gy_supplier where suppliercode<>'" & Trim(LrText(0).Text) & "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1395.             str_tmp = Trim(LrText(1))
  1396.             Do While Not .EOF
  1397.                 For I = 1 To Len(str_tmp)
  1398.                     If InStr(1, Trim(.Fields("suppliername")), Mid(str_tmp, I, 1)) Then
  1399.                         likenum = likenum + 1
  1400.                     End If
  1401.                 Next
  1402.                 
  1403.                 If likenum * 100# / Len(str_tmp) > Val(rs("itemvalue")) Then
  1404.                     suppliername = suppliername & "        " & Trim(.Fields("suppliername")) & "     " & Chr(13)
  1405.                 End If
  1406.                 likenum = 0
  1407.                 .MoveNext
  1408.             Loop
  1409.             If Len(suppliername) > 0 Then
  1410.                 Tsxx = "存在相似的供应商名称:" & Chr(13) & suppliername & "要继续吗?"
  1411.                 If Xtxxts(Tsxx, 1, 2) = vbNo Then
  1412.                     LrText(1).SetFocus
  1413.                     Bclrsj = False
  1414.                     Exit Function
  1415.                 End If
  1416.             End If
  1417.             Set rs = Nothing
  1418.         End If
  1419.        '****************************************************
  1420.             On Error GoTo Swcwcl
  1421.             Cw_DataEnvi.DataConnect.BeginTrans
  1422.             If .State = 1 Then .Close
  1423.             .Open "SELECT * FROM Gy_Supplier WHERE suppliercode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1424.      
  1425.             If Not .EOF Then
  1426.                 .Fields("suppliername") = Trim(LrText(1).Text)      '供应商名称
  1427.                 .Fields("supplierforshort") = Trim(LrText(2))       '简称
  1428.                 .Fields("suppliersort") = Trim(LrText(3).Tag)       '所属分类
  1429.                 If Trim(LrText(4).Tag) <> "" Then
  1430.                     .Fields("areacode") = Trim(LrText(4).Tag)       '地区编码
  1431.                 Else
  1432.                     .Fields("areacode") = Null
  1433.                 End If
  1434.                 If Trim(LrText(5).Tag) <> "" Then
  1435.                     .Fields("tradecode") = Trim(LrText(5).Tag)      '行业编码
  1436.                 Else
  1437.                     .Fields("tradecode") = Null
  1438.                 End If
  1439.                 .Fields("address") = Trim(LrText(6))                '地址
  1440.                 .Fields("postcode") = Trim(LrText(7))               '邮政编码
  1441.                 .Fields("taxpayer") = Trim(LrText(8).Text)          '纳税人登记号
  1442.                 .Fields("bank") = Trim(LrText(9).Text)              '开户银行
  1443.                 .Fields("BankAccount") = Trim(LrText(10).Text)      '银行账号
  1444.                 If IsDate(Trim(LrText(11).Text)) Then               '发展日期
  1445.                     .Fields("relationdate") = Trim(LrText(11).Text)
  1446.                 Else
  1447.                     .Fields("relationdate") = Null
  1448.                 End If
  1449.                 .Fields("fictperson") = Trim(LrText(12).Text)       '法人
  1450.                 .Fields("email") = Trim(LrText(13).Text)
  1451.                 .Fields("creditgrade") = Trim(LrText(14).Text)      '信用等级
  1452.                 .Fields("worknet") = Trim(LrText(15).Text)          '网址
  1453.                 
  1454.                 .Fields("contactperson") = Trim(LrText(16).Text)    '联系人
  1455.                 .Fields("contacttype") = Trim(LrText(17).Text)      '联系方式
  1456.                 If Trim(LrText(18).Text) <> "" Then
  1457.                     .Fields("rpacccode") = Trim(LrText(18).Tag)     '付款科目
  1458.                 Else
  1459.                     .Fields("rpacccode") = Null
  1460.                 End If
  1461.                 If Trim(LrText(19).Text) <> "" Then
  1462.                     .Fields("apacccode") = Trim(LrText(19).Tag)     '应付科目
  1463.                 Else
  1464.                     .Fields("apacccode") = Null
  1465.                 End If
  1466.                 If Trim(LrText(20).Text) <> "" Then
  1467.                     .Fields("ppacccode") = Trim(LrText(20).Tag)     '预付科目
  1468.                 Else
  1469.                     .Fields("ppacccode") = Null
  1470.                 End If
  1471.                 .Fields("payment") = Val(LrText(21).Text)           '应付余额
  1472.                 If IsDate(Trim(LrText(22).Text)) Then               '最后付款日期
  1473.                     .Fields("lastpaymentdate") = Trim(LrText(22).Text)
  1474.                 Else
  1475.                     .Fields("lastpaymentdate") = Null
  1476.                 End If
  1477.                 .Fields("lastpaymentmoney") = Val(LrText(23))       '最后付款金额
  1478.     '
  1479.                 If LrCheck(0).Value Then   '是否通过质量认证
  1480.                     .Fields("isRz") = 1
  1481.                 Else
  1482.                     .Fields("isrz") = 0
  1483.                 End If
  1484.                 If LrCheck(1).Value Then   '评估标志
  1485.                     .Fields("evalflag") = 1
  1486.                 Else
  1487.                     .Fields("evalflag") = 0
  1488.                 End If
  1489.                 If LrCheck(2).Value Then   '停用标志
  1490.                     .Fields("stopflag") = 1
  1491.                 Else
  1492.                     .Fields("stopflag") = 0
  1493.                 End If
  1494.                 .Update
  1495.             End If
  1496.              Cw_DataEnvi.DataConnect.CommitTrans
  1497.    
  1498.             '刷新当前网格
  1499.             Sqlstr = "SELECT * FROM Gy_V_Supplier WHERE suppliercode= '" + Trim(LrText(0).Text) + "'"
  1500.             Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1501.    
  1502.             With CzxsGrid
  1503.                 Call Jltcwg(Cxnrrec, .Row)
  1504.             End With
  1505.    
  1506.         End If
  1507.      
  1508.         '保存记录成功,函数返回真值
  1509.         Bclrsj = True
  1510.         Exit Function
  1511.         
  1512.     End With
  1513.  
  1514. Swcwcl:
  1515.      Cw_DataEnvi.DataConnect.RollbackTrans
  1516.      
  1517.      Tsxx = "存盘过程中出现错误,程序自动恢复保存前状态!"
  1518.      Call Xtxxts(Tsxx, 0, 1)
  1519.      
  1520.      Exit Function
  1521.      
  1522. End Function
  1523. Private Function Cshlrxx(lrztxx As Integer) As Boolean              '初始化录入字段信息
  1524.     Dim RecTemp As New ADODB.Recordset
  1525.     TextChangeLock = True       '关闭文本框Chang事件
  1526.     Call mmkn
  1527.     str_SupplierName = ""
  1528.     If lrztxx = 1 Then
  1529.     
  1530.         '增加新记录时将文本框清空
  1531.         For Jsqte = 0 To Max_Text_Index
  1532.             If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
  1533.                 LrText(Jsqte).Text = ""
  1534.                 LrText(Jsqte).Tag = ""
  1535.             End If
  1536.             TextValiJudgeLock(Jsqte) = True
  1537.         Next Jsqte
  1538.     
  1539.         '[>>
  1540.         '在此处可添加新增记录时初始化设置
  1541.         '<<]
  1542.     Else
  1543.     
  1544.         '修改记录时根据记录关键字(编码)从数据表中读入其他字段内容
  1545.         With RecTemp
  1546.             Sqlstr = "SELECT * FROM Gy_V_Supplier Where suppliercode='" & Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) & "'"
  1547.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1548.        
  1549.             '记录如存在则读入其内容,否则提示记录已被其他人删除
  1550.             If Not RecTemp.EOF Then
  1551.                 Call ShowData(RecTemp)
  1552.             Else
  1553.                 Tsxx = "该记录已经被其他人删除,请刷新当前数据!"
  1554.                 Call Xtxxts(Tsxx, 0, 4)
  1555.                 Call Cancel
  1556.                 TextChangeLock = False
  1557.                 Exit Function
  1558.             End If
  1559.         End With
  1560.     End If
  1561.     
  1562.     Cshlrxx = True
  1563.     TextChangeLock = False
  1564.     
  1565. End Function
  1566. Private Sub ShowData(rs As ADODB.Recordset)
  1567.     With rs
  1568.         LrText(0) = Trim(.Fields("suppliercode") & "")                  '供应商编码
  1569.         LrText(1) = Trim(.Fields("suppliername") & "")                  '供应商名称
  1570.         LrText(2) = Trim(.Fields("supplierforshort") & "")              '供应商简称
  1571.         LrText(3) = Trim(.Fields("suppliersortname") & "")              '分类
  1572.         LrText(4) = Trim(.Fields("areaname") & "")                      '地区
  1573.         LrText(5) = Trim(.Fields("tradename") & "")                     '行业
  1574.         LrText(6) = Trim(.Fields("address") & "")                       '地址
  1575.         LrText(7) = Trim(.Fields("postcode") & "")                      '邮政编码
  1576.         LrText(8) = Trim(.Fields("taxpayer") & "")                      '纳税人登记号
  1577.         LrText(9) = Trim(.Fields("bank") & "")                          '开户银行
  1578.         LrText(10) = Trim(.Fields("BankAccount") & "")                  '银行账号
  1579.         LrText(11) = Format(.Fields("relationdate") & "", "yyyy-mm-dd") '发展日期                   '发展日期
  1580.         LrText(12) = Trim(.Fields("fictperson"))                        '法人
  1581.         LrText(13) = Trim(.Fields("email") & "")                        'email
  1582.         LrText(14) = Trim(.Fields("creditgrade") & "")                  '信用等级
  1583.         LrText(15) = Trim(.Fields("worknet") & "")                      '网址
  1584.         LrText(16) = Trim(.Fields("contactperson") & "")                '联系人
  1585.         LrText(17) = Trim(.Fields("contacttype") & "")                  '联系方式
  1586.         LrText(18) = Trim(.Fields("rpaccname") & "")                    '付款科目
  1587.         LrText(19) = Trim(.Fields("apaccname") & "")                    '应付科目
  1588.         LrText(20) = Trim(.Fields("ppaccname") & "")                    '预付科目
  1589.         LrText(21) = Trim(.Fields("payment") & "")                      '应付余额
  1590.         If IsDate(Trim(.Fields("lastpaymentdate"))) Then
  1591.             LrText(22) = Trim(.Fields("lastpaymentdate"))               '最后付款日期
  1592.         Else
  1593.             LrText(22) = ""
  1594.         End If
  1595.         LrText(23) = Trim(.Fields("lastpaymentmoney") & "")             '最后付款金额
  1596.         If .Fields("isrz") Then        '是否通过质量认证
  1597.             LrCheck(0).Value = 1
  1598.         Else
  1599.             LrCheck(0).Value = 0
  1600.         End If
  1601.         If .Fields("evalflag") Then   '评估标志
  1602.             LrCheck(1).Value = 1
  1603.         Else
  1604.             LrCheck(1).Value = 0
  1605.         End If
  1606.         If .Fields("stopflag") Then   '停用标志
  1607.             LrCheck(2).Value = 1
  1608.         Else
  1609.             LrCheck(2).Value = 0
  1610.         End If
  1611.         str_SupplierName = LrText(1)
  1612.     End With
  1613. End Sub
  1614. Private Sub Scdqjl()                 '删 除 当 前 记 录
  1615.     Dim Yhanswer As Integer
  1616.     
  1617.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1618.     If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  1619.         Exit Sub
  1620.     End If
  1621.     
  1622.     '非数据行不能删除
  1623.     If CzxsGrid.Row < CzxsGrid.FixedRows Then
  1624.         Exit Sub
  1625.     End If
  1626.   
  1627.     '用户确认是否删除记录
  1628.     Tsxx = "请确认是否删除当前记录?"
  1629.     Yhanswer = Xtxxts(Tsxx, 2, 2)
  1630.     
  1631.     If Yhanswer = 2 Then
  1632.         Exit Sub
  1633.     End If
  1634.     On Error GoTo Cwcl
  1635.   
  1636.     Cw_DataEnvi.DataConnect.BeginTrans
  1637.     '[>>以下需自定义部分
  1638.     Cw_DataEnvi.DataConnect.Execute "delete Gy_Supplier where suppliercode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
  1639.     '以上为自定义部分<<]
  1640.   
  1641.     Cw_DataEnvi.DataConnect.CommitTrans
  1642.     CzxsGrid.RemoveItem CzxsGrid.Row
  1643.     Exit Sub
  1644.   
  1645. Cwcl:
  1646.     Cw_DataEnvi.DataConnect.RollbackTrans
  1647.     
  1648.     If Err.Number = -2147217873 Then                '(-2147217873 为SQL Server 2000通过建立外键产生的错误号)
  1649.         Tsxx = "此供应商已经被使用,不能删除!"
  1650.         Call Xtxxts(Tsxx, 0, 1)
  1651.         Exit Sub
  1652.     Else
  1653.         Tsxx = "出现未知情况,此供应商不能被删除!"
  1654.         Call Xtxxts(Tsxx, 0, 1)
  1655.         Exit Sub
  1656.     End If
  1657.     
  1658. End Sub
  1659. '*******************以下区域为编写自定义过程区域**********************
  1660. '*******************以上区域为编写自定义过程区域**********************
  1661. '******************以下为基本处理程序(固定不变)************************'
  1662. Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)        '支持热键操作
  1663.     If Shift = 2 Then
  1664.         Select Case UCase(Chr(KeyCode))
  1665.             Case "P"                                                                          'Ctrl+P 打印
  1666.                 If SzToolbar.Buttons("dy").Visible And SzToolbar.Buttons("dy").Enabled Then
  1667.                     Call bbyl(False)
  1668.                 End If
  1669.             Case "A"                                                                          'Ctrl+A 增加
  1670.                 '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1671.                 If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  1672.                     Exit Sub
  1673.                 End If
  1674.                 If SzToolbar.Buttons("zj").Visible And SzToolbar.Buttons("zj").Enabled Then
  1675.                     Call Toolbjzt
  1676.                     Lrzt = 1
  1677.                     Call Cshlrxx(Lrzt)
  1678.                     LrText(0).Enabled = True
  1679.                     LrText(0).SetFocus
  1680.                 End If
  1681.             Case "D"                                                                          'Ctrl+D 删除
  1682.                 If SzToolbar.Buttons("sc").Visible And SzToolbar.Buttons("sc").Enabled Then
  1683.                     Call Scdqjl
  1684.                 End If
  1685.         End Select
  1686.     End If
  1687.     
  1688. End Sub
  1689. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  1690.    
  1691.     Select Case Button.Key
  1692.         Case "ymsz"                                          '页面设置
  1693.             Dyymctbl.Show 1
  1694.         Case "yl"                                            '预 览
  1695.             Call bbyl(True)
  1696.         Case "dy"                                            '打 印
  1697.             Call bbyl(False)
  1698.         Case "zj"                                            '增 加
  1699.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1700.             If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  1701.                 Exit Sub
  1702.             End If
  1703.             Call Toolbjzt
  1704.             Lrzt = 1
  1705.             Call Cshlrxx(Lrzt)
  1706.             
  1707.             LrText(0).Enabled = True
  1708.             LrText(0).SetFocus
  1709.         Case "xg"                                            '修 改
  1710.             Call Xgdqjl
  1711.         Case "sc"                                            '删 除
  1712.             Call Scdqjl
  1713.         Case "cx"                                            '查询
  1714.             Gy_SupplierQuery.Show 1
  1715.         Case "sx"                                            '刷 新
  1716.             Call Cxnrtcwg
  1717.         Case "bz"                                            '帮 助
  1718.             Call F1bz
  1719.         Case "fh"                                            '退 出
  1720.             Unload Me
  1721.         End Select
  1722.         
  1723. End Sub
  1724. Private Sub CzxsGrid_DblClick()                            '修改当前编码记录
  1725.     Call Xgdqjl
  1726.   
  1727. End Sub
  1728. Private Sub Xgdqjl()                                       '修改当前编码记录
  1729.     
  1730.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1731.     If Not Security_Log(Str_RightEdit, Xtczybm, 1, True, False) Then
  1732.         BcCommand.Enabled = False
  1733.     End If
  1734.     
  1735.     If CzxsGrid.Row < CzxsGrid.FixedRows Then
  1736.         Exit Sub
  1737.     End If
  1738.     
  1739.     Call Toolbjzt
  1740.     Call mmkn
  1741.     Lrzt = 2
  1742.     
  1743.     If Cshlrxx(Lrzt) Then
  1744.         LrText(1).SetFocus
  1745.         LrText(0).Enabled = False
  1746.     End If
  1747.   
  1748. End Sub
  1749. Private Sub Toolbjzt()                                     'Toolbar状态(编辑状态)
  1750.     StTab.TabEnabled(1) = True
  1751.     StTab.Tab = 1
  1752.     Frame1.Enabled = True
  1753.     StTab.TabEnabled(0) = False
  1754.     CzxsGrid.Enabled = False
  1755.   
  1756.     With SzToolbar
  1757.         .Buttons("ymsz").Enabled = False
  1758.         .Buttons("dy").Enabled = False
  1759.         .Buttons("yl").Enabled = False
  1760.         .Buttons("zj").Enabled = False
  1761.         .Buttons("xg").Enabled = False
  1762.         .Buttons("sc").Enabled = False
  1763.         .Buttons("sx").Enabled = False
  1764.         .Buttons("cx").Enabled = False
  1765.     End With
  1766.   
  1767. End Sub
  1768. Private Sub Toolfbjzt()                                    'Toolbar状态(非编辑状态)
  1769.     StTab.TabEnabled(0) = True
  1770.     StTab.Tab = 0
  1771.     CzxsGrid.Enabled = True
  1772.     Frame1.Enabled = False
  1773.     StTab.TabEnabled(1) = False
  1774.     Lrzt = 0
  1775.     
  1776.     With SzToolbar
  1777.         .Buttons("ymsz").Enabled = True
  1778.         .Buttons("dy").Enabled = True
  1779.         .Buttons("yl").Enabled = True
  1780.         .Buttons("zj").Enabled = True
  1781.         .Buttons("xg").Enabled = True
  1782.         .Buttons("sc").Enabled = True
  1783.         .Buttons("sx").Enabled = True
  1784.         .Buttons("cx").Enabled = True
  1785.     End With
  1786.   
  1787. End Sub
  1788. Private Sub BcCommand_Click()                                           '保 存
  1789.     If Not Bclrsj Then
  1790.         Exit Sub
  1791.     End If
  1792.   
  1793.     If Lrzt = 2 Then
  1794.         Call Toolfbjzt
  1795.     End If
  1796.   
  1797. End Sub
  1798. Private Sub QxCommand_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)       '取消
  1799.   
  1800.     '避免执行Click程序
  1801.     Bln_Cancel = True
  1802.   
  1803.     Call Cancel
  1804.     
  1805. End Sub
  1806. Private Sub QxCommand_Click()                                                                         '取消
  1807.  
  1808.     If Bln_Cancel Then
  1809.         Bln_Cancel = False
  1810.         Exit Sub
  1811.     End If
  1812.  
  1813.     Call Cancel
  1814.     
  1815. End Sub
  1816. Private Sub Cancel()                                                                                  '取消
  1817.   
  1818.     '文本框加锁
  1819.     For Jsqte = 0 To Max_Text_Index
  1820.         TextValiJudgeLock(Jsqte) = True
  1821.     Next Jsqte
  1822.   
  1823.     Call Toolfbjzt
  1824.     
  1825. End Sub
  1826. Private Sub CzxsGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  1827.     
  1828.     FnBln_RefreshArray Col, Position, GridStr(), GridInf()
  1829. End Sub
  1830. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)   '表格格式设置(通用)
  1831.     
  1832.     Select Case Button.Key
  1833.         Case "bcgs"                                       '保存表格格式
  1834.             Call Bcwggs(CzxsGrid, GridCode, GridStr())
  1835.         Case "hfmrgs"                                     '恢复默认格式
  1836.             Call Hfmrgs(CzxsGrid, GridCode, GridStr())
  1837.         Case "szxsxm"                                     '设置显示项目
  1838.             Call Szxsxm(CzxsGrid, GridCode)
  1839.     End Select
  1840.     
  1841. End Sub
  1842. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1843.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1844.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1845.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1846.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1847.     ReDim Bbxbt(1 To Bbxbtgs)
  1848.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1849.     
  1850.     If Bbbwhgs <> 0 Then
  1851.         ReDim Bbbwh(1 To Bbbwhgs)
  1852.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1853.     End If
  1854.     
  1855.     Bbzbt = ReportTitle
  1856.     Bbxbt(1) = " "
  1857.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1858.     
  1859.     Call Scyxsjb(CzxsGrid)                               '生成报表数据
  1860.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1861.   
  1862.     If Not bbylte Then
  1863.         Unload DY_Tybbyldy
  1864.     End If
  1865.     
  1866. End Sub
  1867. '************以下为文本框录入处理程序(固定不变部分)*************'
  1868. Private Sub Wbklrwbcl(Index As Integer)    '文本框录入事后处理程序
  1869.     '以下为依据实际情况自定义部分[
  1870.   
  1871.         '在此填写文本框录入事后处理程序
  1872.    
  1873.     ']以上为依据实际情况自定义部分
  1874.     
  1875. End Sub
  1876. Private Sub LrText_Change(Index As Integer)
  1877.     '屏蔽程序改变控制
  1878.     If TextChangeLock Then
  1879.         Exit Sub
  1880.     End If
  1881.     
  1882.     TextValiJudgeLock(Index) = False    '打开有效性判断锁
  1883.     
  1884.     '限制字段录入长度
  1885.           
  1886.     TextChangeLock = True  '加锁(防止执行Lrtext_Change)
  1887.     Call TextChangeLimit(LrText(Index), Textint(Index, 1))  '去掉无效字符
  1888.     Select Case Textint(Index, 1)
  1889.         Case 8, 11      '金额型
  1890.             Call Sjgskz(LrText(Index), Xtjezws - Xtjexsws - 1, Xtjexsws)
  1891.         Case 9, 12      '数量型
  1892.             Call Sjgskz(LrText(Index), Xtslzws - Xtslxsws - 1, Xtslxsws)
  1893.         Case 10          '单价型
  1894.             Call Sjgskz(LrText(Index), Xtdjzws - Xtdjxsws - 1, Xtdjxsws)
  1895.         Case Else        '其他小数类型控制
  1896.             If Textint(Index, 6) <> 0 Or Textint(Index, 7) <> 0 Then
  1897.                 Call Sjgskz(LrText(Index), Textint(Index, 6), Textint(Index, 7))
  1898.             End If
  1899.     End Select
  1900.         
  1901.     TextChangeLock = False '解锁
  1902.     
  1903. End Sub
  1904. Private Sub LrText_GotFocus(Index As Integer)                                                 '文本框得到焦点,显示相应信息
  1905.    
  1906.     Call TextShow(Index)
  1907.     CurTextIndex = Index
  1908.     LrText(Index).SelStart = Len(LrText(Index))
  1909.    
  1910. End Sub
  1911. Private Sub LrText_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)            '字段按F2键提供帮助
  1912.    
  1913.     Select Case KeyCode
  1914.          Case vbKeyF2
  1915.              Call Text_Help(Index)
  1916.     End Select
  1917.    
  1918. End Sub
  1919. Private Sub LrText_KeyPress(Index As Integer, KeyAscii As Integer)                            '文本框录入事中控制
  1920.    
  1921.     Call InputFieldLimit(LrText(Index), Textint(Index, 1), KeyAscii)
  1922. End Sub
  1923. Private Sub LrText_LostFocus(Index As Integer)                                                '文本框失去焦点
  1924.     Dim RecTemp As New ADODB.Recordset
  1925.     '显示相应信息但不能进行有效性判断
  1926.     '[>>
  1927.     If Index = 0 And Lrzt = 1 Then '增加时,用户输入物料编码,显示此物料编码对应的记录
  1928.         Sqlstr = "SELECT * FROM Gy_V_Supplier Where suppliercode='" & Trim(LrText(0)) & "'"
  1929.         
  1930.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1931.         
  1932.         '记录如存在则读入其内容,否则提示记录已被其他人删除
  1933.         If Not RecTemp.EOF Then
  1934.             Call ShowData(RecTemp)
  1935.         End If
  1936.     End If
  1937.     '<<]
  1938. End Sub
  1939. Private Sub Timer1_Timer()
  1940.      Dim Sqlstr As String
  1941.      Timer1.Enabled = False
  1942.      Xt_Wait.Show
  1943.      Xt_Wait.Refresh
  1944.     
  1945.      '加快显示速度
  1946.      CzxsGrid.Redraw = False
  1947.     
  1948.      '生成查询结果
  1949.      Dim Str_QueryCondi As String
  1950.      Dim Jsqte As Integer
  1951.     
  1952.      With Gy_SupplierQuery
  1953.          Str_QueryCondi = " where 1=1 "
  1954.          For Jsqte = 0 To 5
  1955.             Select Case Jsqte
  1956.               Case 0  '供应商名称
  1957.                 If Trim(.LrText(0).Text) <> "" Then
  1958.                  Str_QueryCondi = Str_QueryCondi & " and suppliername like '%" & Trim(.LrText(0)) & "%'"
  1959.                 End If
  1960.               Case 1  '所属地区
  1961.                 If Trim(.LrText(1).Text) <> "" Then
  1962.                  Str_QueryCondi = Str_QueryCondi & " and suppliersort='" & Trim(.LrText(1).Tag) & "'"
  1963.                 End If
  1964.               Case 2   '所属行业
  1965.                  If Trim(.LrText(2).Text) <> "" Then
  1966.                     Str_QueryCondi = Str_QueryCondi & " and areacode='" & Trim(.LrText(2).Tag) & "'"
  1967.                  End If
  1968.               Case 3    '分管部门
  1969.                 If Trim(.LrText(3).Text) <> "" Then
  1970.                     Str_QueryCondi = Str_QueryCondi & " and tradecode= '" & Trim(.LrText(3).Tag) & "'"
  1971.                 End If
  1972.               Case 4    '应付余额
  1973.                 If Trim(.LrText(4).Text) <> "" Then
  1974.                     Str_QueryCondi = Str_QueryCondi & " and payment>= " & Trim(.LrText(4))
  1975.                 End If
  1976.               Case 5    '应付余额
  1977.                 If Trim(.LrText(5).Text) <> "" Then
  1978.                     Str_QueryCondi = Str_QueryCondi & " and payment<= " & Trim(.LrText(5))
  1979.                 End If
  1980.             End Select
  1981.     
  1982.         Next
  1983.         If .Lrcomb(0).ListIndex = 1 Then
  1984.             Str_QueryCondi = Str_QueryCondi & " and isrz=1"
  1985.         ElseIf .Lrcomb(0).ListIndex = 2 Then
  1986.             Str_QueryCondi = Str_QueryCondi & " and isrz=0"
  1987.         End If
  1988.         If .Lrcomb(1).ListIndex = 1 Then
  1989.             Str_QueryCondi = Str_QueryCondi & " and evalflag=1"
  1990.         ElseIf .Lrcomb(1).ListIndex = 2 Then
  1991.             Str_QueryCondi = Str_QueryCondi & " and evalflag=0"
  1992.         End If
  1993.         
  1994.        '查询连接串
  1995.       Sqlstr = "SELECT * from Gy_v_Supplier  " & Str_QueryCondi & " order by suppliercode"
  1996.     
  1997.        Call Cxnrtcwg(Sqlstr)
  1998.       
  1999.      End With
  2000.    
  2001.     CzxsGrid.Redraw = True
  2002.     Xt_Wait.Hide
  2003. End Sub
  2004. Private Sub Ydcommand1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)     '按钮提供帮助
  2005.     
  2006.     Call Text_Help(Index)
  2007.     
  2008. End Sub
  2009. Private Sub Text_Help(Index As Integer)                                                       '录入字段帮助
  2010.   
  2011.     If Not Textboolean(Index, 1) Then
  2012.         Exit Sub
  2013.     End If
  2014.    
  2015.     '调用帮助
  2016.     Call Drbmhelp(Textint(Index, 2), Textstr(Index, 4), Trim(LrText(Index).Text))
  2017.   
  2018.     '根据设置选择显示编码和名称,并进行存储
  2019.     If Len(Xtfhcs) <> 0 Then
  2020.         If Textint(Index, 3) = 1 Then
  2021.             LrText(Index).Text = Xtfhcsfz
  2022.             LrText(Index).Tag = Xtfhcs
  2023.         Else
  2024.             LrText(Index).Text = Xtfhcs
  2025.             LrText(Index).Tag = Xtfhcsfz
  2026.         End If
  2027.     End If
  2028.    
  2029.     LrText(Index).SetFocus
  2030.     
  2031. End Sub
  2032. Private Sub TextShow(Index As Integer)        '文本框得到焦点,显示相应信息
  2033.     '填写文本框得到焦点,进行相应信息处理程序
  2034.    
  2035. End Sub
  2036. Private Sub Wbkcsh()                          '录入文本框初始化
  2037.     Dim Jsqte As Integer
  2038.   
  2039.     '最大录入文本框索引值
  2040.     Max_Text_Index = Textvar(1)
  2041.   
  2042.     ReDim TextValiJudgeLock(Max_Text_Index)
  2043.     
  2044.     For Jsqte = 0 To Max_Text_Index
  2045.      
  2046.         If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
  2047.             If Textboolean(Jsqte, 1) Then
  2048.                 If Jsqte <> 0 And Not Textboolean(Jsqte, 3) Then
  2049.                     Load Ydcommand1(Jsqte)
  2050.                 End If
  2051.                 Ydcommand1(Jsqte).Visible = True
  2052.                 Ydcommand1(Jsqte).Move LrText(Jsqte).Left + LrText(Jsqte).Width, LrText(Jsqte).Top
  2053.             End If
  2054.             TextChangeLock = True
  2055.             LrText(Jsqte).Text = ""
  2056.             LrText(Jsqte).Tag = ""
  2057.             
  2058.             If Textint(Jsqte, 5) <> 0 Then
  2059.                 LrText(Jsqte).MaxLength = Textint(Jsqte, 5)
  2060.             End If
  2061.             
  2062.             TextChangeLock = False
  2063.         End If
  2064.         
  2065.         TextValiJudgeLock(Jsqte) = True
  2066.     Next Jsqte
  2067.     
  2068. End Sub
  2069. Private Function TextYxxpd(Index As Integer) As Boolean           '文本框有效性判断
  2070.     Dim Sqlstr As String
  2071.     Dim Findrec As ADODB.Recordset
  2072.   
  2073.     '文本框内容未曾改变不进行有效性判断
  2074.     If TextValiJudgeLock(Index) Then
  2075.         TextYxxpd = True
  2076.         Exit Function
  2077.     End If
  2078.   
  2079.     '文本框内容为空认为有效,并清空其Tag值
  2080.     If Trim(LrText(Index)) = "" Then
  2081.         LrText(Index).Tag = ""
  2082.         Call Wbklrwbcl(Index)
  2083.         TextValiJudgeLock(Index) = True
  2084.         TextYxxpd = True
  2085.         Exit Function
  2086.     End If
  2087.   
  2088.     '可在此加入不做有效性判断的理由
  2089.   
  2090.     Select Case Textint(Index, 4)
  2091.         Case 1      '编码型
  2092.             Sqlstr = Trim(Textstr(Index, 5))
  2093.             Sqlstr = Replace(Sqlstr, "@", "'" + Trim(LrText(Index).Text) + "'")
  2094.             Set Findrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  2095.          
  2096.             If Findrec.EOF Then
  2097.                 Call Xtxxts(Trim(Textstr(Index, 6)), 0, 1)
  2098.                 LrText(Index).SetFocus
  2099.                 Exit Function
  2100.             Else
  2101.                 Select Case Textint(Index, 3)
  2102.                     Case 0
  2103.                         If Len(Trim(Textstr(Index, 2))) <> 0 Then
  2104.                             LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
  2105.                         End If
  2106.                         If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
  2107.                             LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
  2108.                         End If
  2109.                     Case 1
  2110.                         If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
  2111.                             LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
  2112.                         End If
  2113.                         If Len(Trim(Textstr(Index, 2))) <> 0 Then
  2114.                             LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
  2115.                         End If
  2116.                 End Select
  2117.             End If
  2118.             
  2119.         Case 2      '日期型
  2120.             If IsDate(LrText(Index).Text) Then
  2121.                 LrText(Index).Text = Format(LrText(Index).Text, "yyyy-mm-dd")
  2122.                 If Val(Mid(LrText(Index), 1, 4)) < 1900 Then
  2123.                     LrText(Index).Text = "1900" + Mid(LrText(Index), 5, 6)
  2124.                 End If
  2125.             Else
  2126.                 Tsxx = "非法公历日期!(格式:" + Format(Date, "yyyy-mm-dd") + ")"
  2127.                 Call Xtxxts(Tsxx, 0, 1)
  2128.                 LrText(Index).SetFocus
  2129.                 Exit Function
  2130.             End If
  2131.             
  2132.         Case 3      '其他类型
  2133.         
  2134.     End Select
  2135.     
  2136.     '如果有效则加锁,用户不改变内容则不再进行有效性判断
  2137.     TextValiJudgeLock(Index) = True
  2138.     '调用文本框事后处理程序
  2139.     Call Wbklrwbcl(Index)
  2140.    
  2141.     '有效性判断通过则返回True
  2142.     TextYxxpd = True
  2143.    
  2144. End Function
  2145. '[<<
  2146. Private Sub Command1_Click()
  2147.     CzxsGrid.Row = CzxsGrid.FixedRows
  2148.     Call mmkn
  2149.     Lrzt = 2
  2150.     If Cshlrxx(Lrzt) Then
  2151.         LrText(1).SetFocus
  2152.         LrText(0).Enabled = False
  2153.     End If
  2154. End Sub
  2155. Private Sub Command2_Click()
  2156.     If CzxsGrid.Row = CzxsGrid.FixedRows Then
  2157.         Exit Sub
  2158.     Else
  2159.         CzxsGrid.Row = CzxsGrid.Row - 1
  2160.     End If
  2161.     Call mmkn
  2162.     Lrzt = 2
  2163.     If Cshlrxx(Lrzt) Then
  2164.         LrText(1).SetFocus
  2165.         LrText(0).Enabled = False
  2166.     End If
  2167. End Sub
  2168. Private Sub Command3_Click()
  2169.     If CzxsGrid.Row = CzxsGrid.Rows - 1 Then
  2170.         Exit Sub
  2171.     Else
  2172.         CzxsGrid.Row = CzxsGrid.Row + 1
  2173.     End If
  2174.     Call mmkn
  2175.     Lrzt = 2
  2176.     If Cshlrxx(Lrzt) Then
  2177.         LrText(1).SetFocus
  2178.         LrText(0).Enabled = False
  2179.     End If
  2180. End Sub
  2181. Private Sub Command4_Click()
  2182.     CzxsGrid.Row = CzxsGrid.Rows - 1
  2183.     Call mmkn
  2184.     Lrzt = 2
  2185.     If Cshlrxx(Lrzt) Then
  2186.         LrText(1).SetFocus
  2187.         LrText(0).Enabled = False
  2188.     End If
  2189. End Sub
  2190. Private Sub mmkn()
  2191.             If CzxsGrid.Rows = CzxsGrid.FixedRows Then
  2192.                Command1.Enabled = False    '首张
  2193.                Command2.Enabled = False     '上张
  2194.                Command3.Enabled = False     '下张
  2195.                Command4.Enabled = False     '末张
  2196.             ElseIf CzxsGrid.Rows - 1 = CzxsGrid.FixedRows Then
  2197.                Command1.Enabled = False    '首张
  2198.                Command2.Enabled = False     '上张
  2199.                Command3.Enabled = False     '下张
  2200.                Command4.Enabled = False     '末张
  2201.             ElseIf CzxsGrid.Row = CzxsGrid.Rows - 1 Then
  2202.                Command1.Enabled = True     '首张
  2203.                Command2.Enabled = True      '上张
  2204.                Command3.Enabled = False     '下张
  2205.                Command4.Enabled = False     '末张
  2206.             ElseIf CzxsGrid.Row = CzxsGrid.FixedRows Then
  2207.                Command1.Enabled = False    '首张
  2208.                Command2.Enabled = False     '上张
  2209.                Command3.Enabled = True      '下张
  2210.                Command4.Enabled = True     '末张
  2211.             ElseIf CzxsGrid.Row <> CzxsGrid.Rows - 1 And CzxsGrid.Row <> CzxsGrid.FixedRows Then
  2212.                Command1.Enabled = True   '首张
  2213.                Command2.Enabled = True     '上张
  2214.                Command3.Enabled = True     '下张
  2215.                Command4.Enabled = True     '末张
  2216.             End If
  2217. End Sub
  2218. '>>]