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

企业管理

开发平台:

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