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

企业管理

开发平台:

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. Begin VB.Form JC_FrmTagSetup 
  5.    BackColor       =   &H00C0C0C0&
  6.    BorderStyle     =   1  'Fixed Single
  7.    Caption         =   "指标设置"
  8.    ClientHeight    =   6015
  9.    ClientLeft      =   675
  10.    ClientTop       =   720
  11.    ClientWidth     =   8445
  12.    HelpContextID   =   411002001
  13.    Icon            =   "基础设置_指标设置.frx":0000
  14.    KeyPreview      =   -1  'True
  15.    LinkTopic       =   "Form4"
  16.    MaxButton       =   0   'False
  17.    MinButton       =   0   'False
  18.    ScaleHeight     =   6015
  19.    ScaleWidth      =   8445
  20.    StartUpPosition =   1  '所有者中心
  21.    Begin VB.PictureBox Pic_Title 
  22.       Height          =   765
  23.       Left            =   0
  24.       Picture         =   "基础设置_指标设置.frx":1042
  25.       ScaleHeight     =   705
  26.       ScaleWidth      =   8355
  27.       TabIndex        =   4
  28.       Top             =   600
  29.       Width           =   8415
  30.       Begin VB.Label Label1 
  31.          Appearance      =   0  'Flat
  32.          AutoSize        =   -1  'True
  33.          BackColor       =   &H80000005&
  34.          BackStyle       =   0  'Transparent
  35.          Caption         =   "可编辑项目"
  36.          ForeColor       =   &H80000008&
  37.          Height          =   180
  38.          Index           =   0
  39.          Left            =   6975
  40.          TabIndex        =   9
  41.          Top             =   450
  42.          Visible         =   0   'False
  43.          Width           =   900
  44.       End
  45.       Begin VB.Label Lab_Color 
  46.          Appearance      =   0  'Flat
  47.          BackColor       =   &H00FFFF80&
  48.          BorderStyle     =   1  'Fixed Single
  49.          ForeColor       =   &H80000008&
  50.          Height          =   195
  51.          Index           =   1
  52.          Left            =   6735
  53.          TabIndex        =   8
  54.          Top             =   420
  55.          Visible         =   0   'False
  56.          Width           =   195
  57.       End
  58.       Begin VB.Label tsLabel 
  59.          AutoSize        =   -1  'True
  60.          BackColor       =   &H80000018&
  61.          BackStyle       =   0  'Transparent
  62.          Caption         =   "指标设置"
  63.          BeginProperty Font 
  64.             Name            =   "宋体"
  65.             Size            =   12
  66.             Charset         =   134
  67.             Weight          =   700
  68.             Underline       =   0   'False
  69.             Italic          =   0   'False
  70.             Strikethrough   =   0   'False
  71.          EndProperty
  72.          ForeColor       =   &H00000000&
  73.          Height          =   240
  74.          Index           =   4
  75.          Left            =   615
  76.          TabIndex        =   7
  77.          Top             =   210
  78.          Width           =   1020
  79.       End
  80.       Begin VB.Label Lab_Color 
  81.          Appearance      =   0  'Flat
  82.          BackColor       =   &H00C0E0FF&
  83.          BorderStyle     =   1  'Fixed Single
  84.          ForeColor       =   &H80000008&
  85.          Height          =   195
  86.          Index           =   0
  87.          Left            =   6735
  88.          TabIndex        =   6
  89.          Top             =   150
  90.          Visible         =   0   'False
  91.          Width           =   195
  92.       End
  93.       Begin VB.Label Label1 
  94.          Appearance      =   0  'Flat
  95.          AutoSize        =   -1  'True
  96.          BackColor       =   &H80000005&
  97.          BackStyle       =   0  'Transparent
  98.          Caption         =   "不可编辑项目"
  99.          ForeColor       =   &H80000008&
  100.          Height          =   180
  101.          Index           =   2
  102.          Left            =   6975
  103.          TabIndex        =   5
  104.          Top             =   180
  105.          Visible         =   0   'False
  106.          Width           =   1080
  107.       End
  108.    End
  109.    Begin VSFlex8Ctl.VSFlexGrid WglrGrid 
  110.       Height          =   4635
  111.       Left            =   0
  112.       TabIndex        =   1
  113.       Top             =   1380
  114.       Width           =   8415
  115.       _cx             =   5080
  116.       _cy             =   5080
  117.       Appearance      =   1
  118.       BorderStyle     =   1
  119.       Enabled         =   -1  'True
  120.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  121.          Name            =   "宋体"
  122.          Size            =   9
  123.          Charset         =   134
  124.          Weight          =   400
  125.          Underline       =   0   'False
  126.          Italic          =   0   'False
  127.          Strikethrough   =   0   'False
  128.       EndProperty
  129.       MousePointer    =   0
  130.       BackColor       =   16777215
  131.       ForeColor       =   -2147483640
  132.       BackColorFixed  =   12632256
  133.       ForeColorFixed  =   -2147483630
  134.       BackColorSel    =   -2147483635
  135.       ForeColorSel    =   -2147483634
  136.       BackColorBkg    =   -2147483636
  137.       BackColorAlternate=   16777215
  138.       GridColor       =   -2147483633
  139.       GridColorFixed  =   -2147483632
  140.       TreeColor       =   -2147483632
  141.       FloodColor      =   192
  142.       SheetBorder     =   -2147483642
  143.       FocusRect       =   1
  144.       HighLight       =   1
  145.       AllowSelection  =   -1  'True
  146.       AllowBigSelection=   -1  'True
  147.       AllowUserResizing=   0
  148.       SelectionMode   =   0
  149.       GridLines       =   1
  150.       GridLinesFixed  =   2
  151.       GridLineWidth   =   1
  152.       Rows            =   50
  153.       Cols            =   10
  154.       FixedRows       =   1
  155.       FixedCols       =   1
  156.       RowHeightMin    =   0
  157.       RowHeightMax    =   0
  158.       ColWidthMin     =   0
  159.       ColWidthMax     =   0
  160.       ExtendLastCol   =   0   'False
  161.       FormatString    =   ""
  162.       ScrollTrack     =   0   'False
  163.       ScrollBars      =   3
  164.       ScrollTips      =   0   'False
  165.       MergeCells      =   0
  166.       MergeCompare    =   0
  167.       AutoResize      =   -1  'True
  168.       AutoSizeMode    =   0
  169.       AutoSearch      =   0
  170.       AutoSearchDelay =   2
  171.       MultiTotals     =   -1  'True
  172.       SubtotalPosition=   1
  173.       OutlineBar      =   0
  174.       OutlineCol      =   0
  175.       Ellipsis        =   0
  176.       ExplorerBar     =   0
  177.       PicturesOver    =   0   'False
  178.       FillStyle       =   0
  179.       RightToLeft     =   0   'False
  180.       PictureType     =   0
  181.       TabBehavior     =   0
  182.       OwnerDraw       =   0
  183.       Editable        =   0
  184.       ShowComboButton =   1
  185.       WordWrap        =   0   'False
  186.       TextStyle       =   0
  187.       TextStyleFixed  =   0
  188.       OleDragMode     =   0
  189.       OleDropMode     =   0
  190.       DataMode        =   0
  191.       VirtualData     =   -1  'True
  192.       DataMember      =   ""
  193.       ComboSearch     =   3
  194.       AutoSizeMouse   =   -1  'True
  195.       FrozenRows      =   0
  196.       FrozenCols      =   0
  197.       AllowUserFreezing=   0
  198.       BackColorFrozen =   0
  199.       ForeColorFrozen =   0
  200.       WallPaperAlignment=   9
  201.       AccessibleName  =   ""
  202.       AccessibleDescription=   ""
  203.       AccessibleValue =   ""
  204.       AccessibleRole  =   24
  205.       Begin MSComctlLib.ImageList ImageList1 
  206.          Left            =   3840
  207.          Top             =   1680
  208.          _ExtentX        =   1005
  209.          _ExtentY        =   1005
  210.          BackColor       =   -2147483643
  211.          ImageWidth      =   16
  212.          ImageHeight     =   16
  213.          MaskColor       =   12632256
  214.          _Version        =   393216
  215.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  216.             NumListImages   =   29
  217.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  218.                Picture         =   "基础设置_指标设置.frx":35106
  219.                Key             =   "setup"
  220.             EndProperty
  221.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  222.                Picture         =   "基础设置_指标设置.frx":354A0
  223.                Key             =   "print"
  224.             EndProperty
  225.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  226.                Picture         =   "基础设置_指标设置.frx":3583A
  227.                Key             =   "view"
  228.             EndProperty
  229.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  230.                Picture         =   "基础设置_指标设置.frx":35BD4
  231.                Key             =   "edit"
  232.             EndProperty
  233.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  234.                Picture         =   "基础设置_指标设置.frx":35F6E
  235.                Key             =   "add"
  236.             EndProperty
  237.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  238.                Picture         =   "基础设置_指标设置.frx":36308
  239.                Key             =   ""
  240.             EndProperty
  241.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  242.                Picture         =   "基础设置_指标设置.frx":366A2
  243.                Key             =   "save"
  244.             EndProperty
  245.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  246.                Picture         =   "基础设置_指标设置.frx":36A3C
  247.                Key             =   "esc"
  248.             EndProperty
  249.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  250.                Picture         =   "基础设置_指标设置.frx":36DD6
  251.                Key             =   "help"
  252.             EndProperty
  253.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  254.                Picture         =   "基础设置_指标设置.frx":37170
  255.                Key             =   "exit"
  256.             EndProperty
  257.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  258.                Picture         =   "基础设置_指标设置.frx":3750A
  259.                Key             =   "bcgs"
  260.             EndProperty
  261.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  262.                Picture         =   "基础设置_指标设置.frx":378A4
  263.                Key             =   "mrlk"
  264.             EndProperty
  265.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  266.                Picture         =   "基础设置_指标设置.frx":37C3E
  267.                Key             =   "xsxm"
  268.             EndProperty
  269.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  270.                Picture         =   "基础设置_指标设置.frx":37FD8
  271.                Key             =   "first"
  272.             EndProperty
  273.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  274.                Picture         =   "基础设置_指标设置.frx":38372
  275.                Key             =   "prev"
  276.             EndProperty
  277.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  278.                Picture         =   "基础设置_指标设置.frx":3870C
  279.                Key             =   "next"
  280.             EndProperty
  281.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  282.                Picture         =   "基础设置_指标设置.frx":38AA6
  283.                Key             =   "last"
  284.             EndProperty
  285.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  286.                Picture         =   "基础设置_指标设置.frx":38E40
  287.                Key             =   "xx"
  288.             EndProperty
  289.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  290.                Picture         =   "基础设置_指标设置.frx":391DA
  291.                Key             =   "define"
  292.             EndProperty
  293.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  294.                Picture         =   "基础设置_指标设置.frx":39574
  295.                Key             =   "exec"
  296.             EndProperty
  297.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  298.                Picture         =   "基础设置_指标设置.frx":3990E
  299.                Key             =   "xz"
  300.             EndProperty
  301.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  302.                Picture         =   "基础设置_指标设置.frx":39CA8
  303.                Key             =   "del"
  304.             EndProperty
  305.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  306.                Picture         =   "基础设置_指标设置.frx":3A042
  307.                Key             =   "sx"
  308.             EndProperty
  309.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  310.                Picture         =   "基础设置_指标设置.frx":3A3DC
  311.                Key             =   "cx"
  312.             EndProperty
  313.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  314.                Picture         =   "基础设置_指标设置.frx":3A776
  315.                Key             =   "zd"
  316.             EndProperty
  317.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  318.                Picture         =   "基础设置_指标设置.frx":3AB10
  319.                Key             =   "dz"
  320.             EndProperty
  321.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  322.                Picture         =   "基础设置_指标设置.frx":3AEAA
  323.                Key             =   "ph"
  324.             EndProperty
  325.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  326.                Picture         =   "基础设置_指标设置.frx":3B244
  327.                Key             =   "fz"
  328.             EndProperty
  329.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  330.                Picture         =   "基础设置_指标设置.frx":3B5DE
  331.                Key             =   "dw"
  332.             EndProperty
  333.          EndProperty
  334.       End
  335.    End
  336.    Begin MSComctlLib.Toolbar Tlb_Action 
  337.       Align           =   1  'Align Top
  338.       Height          =   555
  339.       Left            =   0
  340.       TabIndex        =   0
  341.       Top             =   0
  342.       Width           =   8445
  343.       _ExtentX        =   14896
  344.       _ExtentY        =   979
  345.       ButtonWidth     =   820
  346.       ButtonHeight    =   926
  347.       AllowCustomize  =   0   'False
  348.       Wrappable       =   0   'False
  349.       Appearance      =   1
  350.       Style           =   1
  351.       ImageList       =   "ImageList1"
  352.       _Version        =   393216
  353.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  354.          NumButtons      =   11
  355.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  356.             Caption         =   "设置"
  357.             Key             =   "setup"
  358.             Object.ToolTipText     =   "打印页面设置"
  359.             ImageKey        =   "setup"
  360.          EndProperty
  361.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  362.             Caption         =   "打印"
  363.             Key             =   "print"
  364.             Object.ToolTipText     =   "打印当前单据或Ctrl+P"
  365.             ImageKey        =   "print"
  366.          EndProperty
  367.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  368.             Caption         =   "预览"
  369.             Key             =   "view"
  370.             ImageKey        =   "view"
  371.          EndProperty
  372.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  373.             Style           =   3
  374.          EndProperty
  375.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  376.             Object.Visible         =   0   'False
  377.             Caption         =   "保存"
  378.             Key             =   "save"
  379.             ImageKey        =   "save"
  380.          EndProperty
  381.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  382.             Object.Visible         =   0   'False
  383.             Caption         =   "修改"
  384.             Key             =   "edit"
  385.             ImageKey        =   "edit"
  386.          EndProperty
  387.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  388.             Object.Visible         =   0   'False
  389.             Caption         =   "放弃"
  390.             Key             =   "esc"
  391.             ImageKey        =   "esc"
  392.          EndProperty
  393.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  394.             Object.Visible         =   0   'False
  395.             Style           =   3
  396.          EndProperty
  397.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  398.             Object.Visible         =   0   'False
  399.             Caption         =   "定位"
  400.             Key             =   "seach"
  401.             ImageKey        =   "dw"
  402.          EndProperty
  403.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  404.             Caption         =   "帮助"
  405.             Key             =   "help"
  406.             ImageKey        =   "help"
  407.          EndProperty
  408.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  409.             Caption         =   "退出"
  410.             Key             =   "exit"
  411.             ImageKey        =   "exit"
  412.          EndProperty
  413.       EndProperty
  414.       BorderStyle     =   1
  415.       Begin MSComctlLib.Toolbar GsToolbar 
  416.          Height          =   525
  417.          Left            =   6720
  418.          TabIndex        =   3
  419.          Top             =   0
  420.          Width           =   1695
  421.          _ExtentX        =   2990
  422.          _ExtentY        =   926
  423.          ButtonWidth     =   1455
  424.          ButtonHeight    =   926
  425.          AllowCustomize  =   0   'False
  426.          Appearance      =   1
  427.          Style           =   1
  428.          ImageList       =   "ImageList1"
  429.          _Version        =   393216
  430.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  431.             NumButtons      =   2
  432.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  433.                Caption         =   "保存格式"
  434.                Key             =   "bcgs"
  435.                ImageKey        =   "bcgs"
  436.             EndProperty
  437.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  438.                Caption         =   "默认列宽"
  439.                Key             =   "hfmrgs"
  440.                ImageKey        =   "mrlk"
  441.             EndProperty
  442.          EndProperty
  443.       End
  444.    End
  445.    Begin VB.Label Lab_OperStatus 
  446.       BackColor       =   &H000080FF&
  447.       Caption         =   "1"
  448.       Height          =   345
  449.       Left            =   9240
  450.       TabIndex        =   2
  451.       Top             =   840
  452.       Visible         =   0   'False
  453.       Width           =   345
  454.    End
  455. End
  456. Attribute VB_Name = "JC_FrmTagSetup"
  457. Attribute VB_GlobalNameSpace = False
  458. Attribute VB_Creatable = False
  459. Attribute VB_PredeclaredId = True
  460. Attribute VB_Exposed = False
  461. '*******************************************************
  462. '*    模 块 名 称 :基础设置-指标设置
  463. '*    功 能 描 述 :各种财务指标设置
  464. '*    程序员姓名  :魏永生
  465. '*    最后修改人  :
  466. '*    最后修改时间:2002/1/21
  467. '*    备        注:
  468. '*******************************************************
  469. Dim iRow As Integer                      '网格行
  470. Dim iCol As Integer                      '网格列
  471. Dim Str_RightEdit As String              '编辑(新增、修改、删除)权限索引
  472. '以下为固定使用变量
  473. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  474. Dim GridCode As String                   '显示网格网格代码
  475. Dim GridInf() As Variant                 '整个网格设置信息
  476. Dim Tsxx As String                       '系统提示信息
  477. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  478. Dim Sjhgd As Double                      '网格数据行高度
  479. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  480. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  481. Dim GridStr()  As String                 '网格列信息(字符型)
  482. Dim GridInt() As Integer                 '网格列信息(整型)
  483. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  484. Dim Bln_Stop As Boolean                  '停止输出查询结果
  485. Dim ReportTitle
  486. Dim Cxnrrec As New ADODB.Recordset
  487. Private Sub Form_KeyPress(KeyAscii As Integer)   '控 制 焦 点 转 移
  488.     If DEBUG_FLAG = False Then On Error Resume Next
  489.     Dim jdzygs As Integer
  490.     jdzygs = 3
  491.     Select Case KeyAscii
  492.     Case vbKeyReturn
  493.         If Kjjdzy(jdzygs) Then
  494.             KeyAscii = 0
  495.         End If
  496.     Case 39                             '屏蔽"'"
  497.         KeyAscii = 0
  498.     End Select
  499. End Sub
  500. Private Sub Form_Load()
  501.     If DEBUG_FLAG = False Then On Error Resume Next
  502.     '调入打印页面设置窗体
  503.     XtReportCode = "cwfx_TagSetup"
  504.     
  505.     ReportTitle = "指标设置"
  506.     Load Dyymctbl
  507.     
  508.     '调 入 网 格
  509.     GridCode = "cwfx_TagSetup"
  510.     Call BzWgcsh(WglrGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  511.     
  512.     Qslz = GridInf(1)
  513.     Sjhgd = GridInf(2)
  514.     Sfxshjwg = GridInf(7)
  515.     Szzls = WglrGrid.Cols - 1
  516.     
  517.     Call Cxnrtcwg
  518.     
  519.     '编辑(新增、修改、删除)权限索引
  520.     Str_RightEdit = "cwfx_Tag_Edit"
  521. End Sub
  522. Private Sub Cxnrtcwg()                               '查 询 内 容 填 充 网 格
  523.     If DEBUG_FLAG = False Then On Error Resume Next
  524.     Dim SqlStr As String
  525.     Dim Jsqte As Long
  526.     
  527.     '查询连接串
  528.     SqlStr = "SELECT * FROM cwfx_TagInital ORDER BY ID "
  529.     
  530.     Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  531.     With Cxnrrec
  532.         WglrGrid.Clear 1
  533.         WglrGrid.Rows = .RecordCount + WglrGrid.FixedRows
  534.         If .EOF And .BOF Then
  535.             Exit Sub
  536.         End If
  537.         Jsqte = WglrGrid.FixedRows
  538.         Do While Not .EOF
  539.             If Jsqte >= WglrGrid.Rows Then
  540.                 WglrGrid.AddItem ""
  541.             End If
  542.             
  543.             Call Jltcwg(Cxnrrec, Jsqte)
  544.             
  545.             WglrGrid.RowHeight(Jsqte) = Sjhgd
  546.             .MoveNext
  547.             Jsqte = Jsqte + 1
  548.         Loop
  549.     End With
  550. End Sub
  551. Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long)                                     '记录内容填充网格
  552.     If DEBUG_FLAG = False Then On Error Resume Next
  553.     '[以下为自定义部分
  554.     With Jlbrec
  555.         
  556.         WglrGrid.TextMatrix(Rowjsq, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("Selected"))
  557.         WglrGrid.TextMatrix(Rowjsq, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("RatioName"))
  558.         WglrGrid.TextMatrix(Rowjsq, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("RatioType"))
  559.         WglrGrid.TextMatrix(Rowjsq, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("Unit"))
  560.         WglrGrid.TextMatrix(Rowjsq, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("Formula"))
  561.         
  562.     End With
  563.     '以上为自定义部分]
  564. End Sub
  565. Private Sub SaveData()
  566.     If DEBUG_FLAG = False Then On Error Resume Next
  567.     Dim strSql As String                            '查询字符串
  568.     Dim I As Integer
  569.     
  570.     
  571.     With Cxnrrec
  572.         
  573.         If .State = 1 Then .Close
  574.         .Open "SELECT * FROM cwfx_TagInital ORDER BY ID", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  575.         
  576.         .MoveFirst
  577.         
  578.         For I = WglrGrid.FixedRows To WglrGrid.Rows - 1
  579.             !Selected = WglrGrid.TextMatrix(I, Sydz("001", GridStr(), Szzls))
  580.             !RatioName = WglrGrid.TextMatrix(I, Sydz("002", GridStr(), Szzls))
  581.             !RatioType = WglrGrid.TextMatrix(I, Sydz("003", GridStr(), Szzls))
  582.             !Unit = WglrGrid.TextMatrix(I, Sydz("004", GridStr(), Szzls))
  583.             !Formula = WglrGrid.TextMatrix(I, Sydz("005", GridStr(), Szzls))
  584.             .Update
  585.             .MoveNext
  586.         Next
  587.     End With
  588.     
  589. End Sub
  590. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  591.     
  592.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  593.     If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  594.         Exit Sub
  595.     End If
  596.     
  597.     
  598.     Call SaveData
  599. End Sub
  600. Private Sub Form_Resize()
  601.     On Error Resume Next
  602.     With Me.WglrGrid
  603.         .Width = Me.ScaleWidth
  604.         .Height = Me.ScaleHeight - .Top
  605.     End With
  606.     
  607.     With Pic_Title
  608.         .Width = Me.ScaleWidth
  609.     End With
  610.     
  611.     With GsToolbar
  612.         If Me.Width >= 6375 Then
  613.             .Left = Pic_Title.Width - .Width
  614.         End If
  615.         
  616.     End With
  617. End Sub
  618. Private Sub Form_Unload(Cancel As Integer)
  619.     If DEBUG_FLAG = False Then On Error Resume Next
  620.     If Cxnrrec.State <> adStateClosed Then Cxnrrec.Close
  621.     Set Cxnrrec = Nothing
  622. End Sub
  623. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)   '表格格式设置(通用)
  624.     If DEBUG_FLAG = False Then On Error Resume Next
  625.     Select Case Button.Key
  626.     Case "bcgs"                              '保存表格格式
  627.         Call Bcwggs(WglrGrid, GridCode, GridStr())
  628.     Case "hfmrgs"                            '恢复默认格式
  629.         Call Hfmrgs(WglrGrid, GridCode, GridStr())
  630.     End Select
  631. End Sub
  632. Private Sub WglrGrid_Click()
  633.     If DEBUG_FLAG = False Then On Error Resume Next
  634.     iRow = Me.WglrGrid.Row
  635.     Me.WglrGrid.Col = 0
  636.     Me.WglrGrid.CellChecked = IIf(Me.WglrGrid.CellChecked = flexChecked, flexUnchecked, flexChecked)
  637. End Sub
  638. Private Sub Tlb_Action_ButtonClick(ByVal Button As MSComctlLib.Button)             '用户点击工具条
  639.     If DEBUG_FLAG = False Then On Error Resume Next
  640.     
  641.     
  642.     Select Case Button.Key
  643.     Case "setup"
  644.         Dyymctbl.Show vbModal
  645.     Case "print"
  646.         Call bbyl(False)
  647.     Case "view"
  648.         Call bbyl(True)
  649.     Case "help"
  650.         Call F1bz
  651.     Case "exit"
  652.         Unload Me
  653.     End Select
  654. End Sub
  655. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  656.     If DEBUG_FLAG = False Then On Error Resume Next
  657.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  658.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  659.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  660.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  661.     ReDim Bbxbt(1 To Bbxbtgs)
  662.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  663.     If Bbbwhgs <> 0 Then
  664.         ReDim Bbbwh(1 To Bbbwhgs)
  665.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  666.     End If
  667.     Bbzbt = ReportTitle
  668.     Bbxbt(1) = " "
  669.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  670.     Call Scyxsjb(WglrGrid)                               '生成报表数据
  671.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  672.     If Not bbylte Then
  673.         Unload DY_Tybbyldy
  674.     End If
  675. End Sub