frmWlcx.frm
上传用户:ykswallow
上传日期:2009-12-30
资源大小:1107k
文件大小:21k
源码类别:

其他行业

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
  3. Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
  4. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  5. Begin VB.Form frmWlcx 
  6.    Caption         =   "物流情况查询"
  7.    ClientHeight    =   6645
  8.    ClientLeft      =   480
  9.    ClientTop       =   1650
  10.    ClientWidth     =   9615
  11.    HelpContextID   =   7
  12.    Icon            =   "frmWlcx.frx":0000
  13.    LinkTopic       =   "Form1"
  14.    LockControls    =   -1  'True
  15.    MDIChild        =   -1  'True
  16.    ScaleHeight     =   6645
  17.    ScaleWidth      =   9615
  18.    Visible         =   0   'False
  19.    WindowState     =   2  'Maximized
  20.    Begin VB.PictureBox Picture1 
  21.       Align           =   3  'Align Left
  22.       Height          =   6645
  23.       Index           =   0
  24.       Left            =   0
  25.       ScaleHeight     =   6585
  26.       ScaleWidth      =   5505
  27.       TabIndex        =   2
  28.       TabStop         =   0   'False
  29.       Top             =   0
  30.       Width           =   5565
  31.       Begin VB.TextBox txtSm 
  32.          BackColor       =   &H80000000&
  33.          Height          =   1335
  34.          Left            =   240
  35.          Locked          =   -1  'True
  36.          MaxLength       =   255
  37.          MultiLine       =   -1  'True
  38.          ScrollBars      =   2  'Vertical
  39.          TabIndex        =   20
  40.          Top             =   2760
  41.          Width           =   5055
  42.       End
  43.       Begin VB.Frame Frame1 
  44.          Caption         =   "查询搜索"
  45.          Height          =   2235
  46.          Left            =   240
  47.          TabIndex        =   3
  48.          Top             =   4320
  49.          Width           =   5055
  50.          Begin MSComctlLib.TreeView TreeView1 
  51.             Height          =   960
  52.             Left            =   195
  53.             TabIndex        =   4
  54.             Top             =   1080
  55.             Width           =   4575
  56.             _ExtentX        =   8070
  57.             _ExtentY        =   1693
  58.             _Version        =   393217
  59.             LabelEdit       =   1
  60.             LineStyle       =   1
  61.             Style           =   7
  62.             HotTracking     =   -1  'True
  63.             Appearance      =   1
  64.          End
  65.          Begin MSComCtl2.DTPicker dtpCxRq 
  66.             Height          =   300
  67.             Index           =   0
  68.             Left            =   840
  69.             TabIndex        =   5
  70.             Top             =   360
  71.             Width           =   1575
  72.             _ExtentX        =   2778
  73.             _ExtentY        =   529
  74.             _Version        =   393216
  75.             Format          =   24576001
  76.             CurrentDate     =   36526
  77.          End
  78.          Begin MSComCtl2.DTPicker dtpCxRq 
  79.             Height          =   300
  80.             Index           =   1
  81.             Left            =   3000
  82.             TabIndex        =   6
  83.             Top             =   360
  84.             Width           =   1575
  85.             _ExtentX        =   2778
  86.             _ExtentY        =   529
  87.             _Version        =   393216
  88.             Format          =   24576001
  89.             CurrentDate     =   36526
  90.          End
  91.          Begin VB.Label Label1 
  92.             AutoSize        =   -1  'True
  93.             Caption         =   "从:"
  94.             Height          =   180
  95.             Index           =   5
  96.             Left            =   480
  97.             TabIndex        =   9
  98.             Top             =   360
  99.             Width           =   270
  100.          End
  101.          Begin VB.Label Label2 
  102.             AutoSize        =   -1  'True
  103.             Caption         =   "到:"
  104.             Height          =   180
  105.             Left            =   2640
  106.             TabIndex        =   8
  107.             Top             =   360
  108.             Width           =   270
  109.          End
  110.          Begin VB.Label Label1 
  111.             AutoSize        =   -1  'True
  112.             Caption         =   "搜索树:"
  113.             Height          =   180
  114.             Index           =   2
  115.             Left            =   240
  116.             TabIndex        =   7
  117.             Top             =   840
  118.             Width           =   630
  119.          End
  120.       End
  121.       Begin VB.Label lblKcjz 
  122.          BackStyle       =   0  'Transparent
  123.          BorderStyle     =   1  'Fixed Single
  124.          BeginProperty DataFormat 
  125.             Type            =   1
  126.             Format          =   """¥""#,##0.00"
  127.             HaveTrueFalseNull=   0
  128.             FirstDayOfWeek  =   0
  129.             FirstWeekOfYear =   0
  130.             LCID            =   2052
  131.             SubFormatType   =   2
  132.          EndProperty
  133.          Height          =   300
  134.          Left            =   1080
  135.          TabIndex        =   23
  136.          Top             =   2160
  137.          Width           =   1935
  138.       End
  139.       Begin VB.Label Label1 
  140.          AutoSize        =   -1  'True
  141.          Caption         =   "库存价值:"
  142.          BeginProperty DataFormat 
  143.             Type            =   0
  144.             Format          =   """¥""#,##0.00"
  145.             HaveTrueFalseNull=   0
  146.             FirstDayOfWeek  =   0
  147.             FirstWeekOfYear =   0
  148.             LCID            =   2052
  149.             SubFormatType   =   0
  150.          EndProperty
  151.          Height          =   180
  152.          Index           =   8
  153.          Left            =   240
  154.          TabIndex        =   22
  155.          Top             =   2160
  156.          Width           =   810
  157.       End
  158.       Begin VB.Label Label1 
  159.          AutoSize        =   -1  'True
  160.          Caption         =   "说明:"
  161.          Height          =   180
  162.          Index           =   7
  163.          Left            =   240
  164.          TabIndex        =   21
  165.          Top             =   2520
  166.          Width           =   450
  167.       End
  168.       Begin VB.Label lblKcl 
  169.          BackStyle       =   0  'Transparent
  170.          BorderStyle     =   1  'Fixed Single
  171.          Height          =   300
  172.          Left            =   1080
  173.          TabIndex        =   19
  174.          Top             =   1800
  175.          Width           =   1935
  176.       End
  177.       Begin VB.Label Label1 
  178.          AutoSize        =   -1  'True
  179.          Caption         =   "库存量:"
  180.          Height          =   180
  181.          Index           =   6
  182.          Left            =   240
  183.          TabIndex        =   18
  184.          Top             =   1800
  185.          Width           =   630
  186.       End
  187.       Begin VB.Image imgZp 
  188.          BorderStyle     =   1  'Fixed Single
  189.          Height          =   2340
  190.          Left            =   3240
  191.          Stretch         =   -1  'True
  192.          Top             =   240
  193.          Width           =   1950
  194.       End
  195.       Begin VB.Label lblDj 
  196.          BackStyle       =   0  'Transparent
  197.          BorderStyle     =   1  'Fixed Single
  198.          BeginProperty DataFormat 
  199.             Type            =   1
  200.             Format          =   """¥""#,##0.00"
  201.             HaveTrueFalseNull=   0
  202.             FirstDayOfWeek  =   0
  203.             FirstWeekOfYear =   0
  204.             LCID            =   2052
  205.             SubFormatType   =   2
  206.          EndProperty
  207.          Height          =   300
  208.          Left            =   1080
  209.          TabIndex        =   17
  210.          Top             =   1440
  211.          Width           =   1935
  212.       End
  213.       Begin VB.Label lblMc 
  214.          BackStyle       =   0  'Transparent
  215.          BorderStyle     =   1  'Fixed Single
  216.          Height          =   300
  217.          Left            =   1080
  218.          TabIndex        =   16
  219.          Top             =   1080
  220.          Width           =   1935
  221.       End
  222.       Begin VB.Label lblWpID 
  223.          BackStyle       =   0  'Transparent
  224.          BorderStyle     =   1  'Fixed Single
  225.          Height          =   300
  226.          Left            =   1080
  227.          TabIndex        =   15
  228.          Top             =   720
  229.          Width           =   1935
  230.       End
  231.       Begin VB.Label lblLb 
  232.          BackStyle       =   0  'Transparent
  233.          BorderStyle     =   1  'Fixed Single
  234.          Height          =   300
  235.          Left            =   1080
  236.          TabIndex        =   14
  237.          Top             =   360
  238.          Width           =   1935
  239.       End
  240.       Begin VB.Label Label1 
  241.          AutoSize        =   -1  'True
  242.          Caption         =   "单价:"
  243.          Height          =   180
  244.          Index           =   4
  245.          Left            =   240
  246.          TabIndex        =   13
  247.          Top             =   1440
  248.          Width           =   450
  249.       End
  250.       Begin VB.Label Label1 
  251.          AutoSize        =   -1  'True
  252.          Caption         =   "物品类别:"
  253.          Height          =   180
  254.          Index           =   3
  255.          Left            =   240
  256.          TabIndex        =   12
  257.          Top             =   360
  258.          Width           =   810
  259.       End
  260.       Begin VB.Label Label1 
  261.          AutoSize        =   -1  'True
  262.          Caption         =   "物品名称:"
  263.          Height          =   180
  264.          Index           =   1
  265.          Left            =   240
  266.          TabIndex        =   11
  267.          Top             =   1080
  268.          Width           =   810
  269.       End
  270.       Begin VB.Label Label1 
  271.          AutoSize        =   -1  'True
  272.          Caption         =   "物品ID:"
  273.          Height          =   180
  274.          Index           =   0
  275.          Left            =   240
  276.          TabIndex        =   10
  277.          Top             =   720
  278.          Width           =   630
  279.       End
  280.    End
  281.    Begin VB.PictureBox Picture1 
  282.       Height          =   7380
  283.       Index           =   1
  284.       Left            =   5565
  285.       ScaleHeight     =   7320
  286.       ScaleWidth      =   3900
  287.       TabIndex        =   1
  288.       TabStop         =   0   'False
  289.       Top             =   0
  290.       Width           =   3960
  291.       Begin MSDataGridLib.DataGrid DataGrid1 
  292.          Height          =   4170
  293.          Left            =   0
  294.          TabIndex        =   0
  295.          Top             =   0
  296.          Width           =   3795
  297.          _ExtentX        =   6694
  298.          _ExtentY        =   7355
  299.          _Version        =   393216
  300.          AllowUpdate     =   0   'False
  301.          BorderStyle     =   0
  302.          HeadLines       =   2
  303.          RowHeight       =   17
  304.          FormatLocked    =   -1  'True
  305.          BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  306.             Name            =   "宋体"
  307.             Size            =   9
  308.             Charset         =   134
  309.             Weight          =   400
  310.             Underline       =   0   'False
  311.             Italic          =   0   'False
  312.             Strikethrough   =   0   'False
  313.          EndProperty
  314.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  315.             Name            =   "宋体"
  316.             Size            =   9
  317.             Charset         =   134
  318.             Weight          =   400
  319.             Underline       =   0   'False
  320.             Italic          =   0   'False
  321.             Strikethrough   =   0   'False
  322.          EndProperty
  323.          ColumnCount     =   6
  324.          BeginProperty Column00 
  325.             DataField       =   "物流类型"
  326.             Caption         =   "物流类型"
  327.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  328.                Type            =   0
  329.                Format          =   ""
  330.                HaveTrueFalseNull=   0
  331.                FirstDayOfWeek  =   0
  332.                FirstWeekOfYear =   0
  333.                LCID            =   2052
  334.                SubFormatType   =   0
  335.             EndProperty
  336.          EndProperty
  337.          BeginProperty Column01 
  338.             DataField       =   "数量"
  339.             Caption         =   "数量"
  340.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  341.                Type            =   0
  342.                Format          =   ""
  343.                HaveTrueFalseNull=   0
  344.                FirstDayOfWeek  =   0
  345.                FirstWeekOfYear =   0
  346.                LCID            =   2052
  347.                SubFormatType   =   0
  348.             EndProperty
  349.          EndProperty
  350.          BeginProperty Column02 
  351.             DataField       =   "价值"
  352.             Caption         =   "价值"
  353.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  354.                Type            =   1
  355.                Format          =   """¥""#,##0.00"
  356.                HaveTrueFalseNull=   0
  357.                FirstDayOfWeek  =   0
  358.                FirstWeekOfYear =   0
  359.                LCID            =   2052
  360.                SubFormatType   =   0
  361.             EndProperty
  362.          EndProperty
  363.          BeginProperty Column03 
  364.             DataField       =   "经手人"
  365.             Caption         =   "经手人"
  366.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  367.                Type            =   0
  368.                Format          =   ""
  369.                HaveTrueFalseNull=   0
  370.                FirstDayOfWeek  =   0
  371.                FirstWeekOfYear =   0
  372.                LCID            =   2052
  373.                SubFormatType   =   0
  374.             EndProperty
  375.          EndProperty
  376.          BeginProperty Column04 
  377.             DataField       =   "日期"
  378.             Caption         =   "日期"
  379.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  380.                Type            =   1
  381.                Format          =   "yyyy-MM-dd"
  382.                HaveTrueFalseNull=   0
  383.                FirstDayOfWeek  =   0
  384.                FirstWeekOfYear =   0
  385.                LCID            =   2052
  386.                SubFormatType   =   0
  387.             EndProperty
  388.          EndProperty
  389.          BeginProperty Column05 
  390.             DataField       =   "说明"
  391.             Caption         =   "说明"
  392.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  393.                Type            =   0
  394.                Format          =   ""
  395.                HaveTrueFalseNull=   0
  396.                FirstDayOfWeek  =   0
  397.                FirstWeekOfYear =   0
  398.                LCID            =   2052
  399.                SubFormatType   =   0
  400.             EndProperty
  401.          EndProperty
  402.          SplitCount      =   1
  403.          BeginProperty Split0 
  404.             BeginProperty Column00 
  405.             EndProperty
  406.             BeginProperty Column01 
  407.             EndProperty
  408.             BeginProperty Column02 
  409.             EndProperty
  410.             BeginProperty Column03 
  411.             EndProperty
  412.             BeginProperty Column04 
  413.             EndProperty
  414.             BeginProperty Column05 
  415.                ColumnWidth     =   4004.788
  416.             EndProperty
  417.          EndProperty
  418.       End
  419.    End
  420. End
  421. Attribute VB_Name = "frmWlcx"
  422. Attribute VB_GlobalNameSpace = False
  423. Attribute VB_Creatable = False
  424. Attribute VB_PredeclaredId = True
  425. Attribute VB_Exposed = False
  426. Option Explicit
  427. Dim WithEvents rsWl As ADODB.Recordset
  428. Attribute rsWl.VB_VarHelpID = -1
  429. Dim rsWp As ADODB.Recordset
  430. Attribute rsWp.VB_VarHelpID = -1
  431. Private Sub Form_Activate()
  432.     fMain.RsPC Tag '显示窗口信息
  433. End Sub
  434. Private Sub Form_Load()
  435.     On Error Resume Next
  436.     StateForm
  437.     Set rsWl = New ADODB.Recordset
  438.     Set rsWp = New ADODB.Recordset
  439. End Sub
  440. Private Sub Form_Resize()
  441.     ReFrom
  442. End Sub
  443. Private Sub Form_Unload(Cancel As Integer)
  444.     On Error Resume Next
  445.     If rsWl.State = 1 Then rsWl.Close
  446.     If rsWp.State = 1 Then rsWp.Close
  447.     Set rsWl = Nothing
  448.     Set rsWp = Nothing
  449.     Set frmWlcx = Nothing
  450. End Sub
  451. Private Sub imgZp_Click()
  452.     Dim frmNewWin As New frmZp
  453.     frmNewWin.Image1.Picture = imgZp.Picture
  454.     frmNewWin.Show vbModal
  455.     Set frmNewWin = Nothing
  456. End Sub
  457. Private Sub rsWl_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
  458.     On Error Resume Next
  459.     Dim intRsPos As Integer, intRsCount As Integer
  460.     intRsPos = rsWl.AbsolutePosition
  461.     intRsCount = rsWl.RecordCount
  462.     
  463.     Tag = Caption & Space(3) & "当前位置:" & _
  464.     intRsPos & Space(3) & "记录总数:" & intRsCount
  465.     fMain.RsPC Tag  '显示窗口信息
  466. End Sub
  467. Private Sub OpenRs(ByVal lngWpID As Long, ByVal strLx As String, _
  468.  ByVal strZyID As String, ByVal dtRq1 As Date, ByVal dtRq2 As Date)
  469.     On Error Resume Next
  470.     '从数据源取得记录集
  471.     If rsWl.State = 1 Then rsWl.Close
  472.     If rsWp.State = 1 Then rsWp.Close
  473.     
  474.     Set rsWp = mCdt.rsWPQKCX(lngWpID)
  475.     Set lblLb.DataSource = rsWp
  476.     lblLb.DataField = "类别ID"
  477.     Set lblWpID.DataSource = rsWp
  478.     lblWpID.DataField = "物品ID"
  479.     Set lblMc.DataSource = rsWp
  480.     lblMc.DataField = "名称"
  481.     Set lblDj.DataSource = rsWp
  482.     lblDj.DataField = "单价"
  483.     Set lblKcl.DataSource = rsWp
  484.     lblKcl.DataField = "库存量"
  485.     Set lblKcjz.DataSource = rsWp
  486.     lblKcjz.DataField = "库存价值"
  487.     Set txtSm.DataSource = rsWp
  488.     txtSm.DataField = "说明"
  489.     Set imgZp.DataSource = rsWp
  490.     imgZp.DataField = "照片"
  491.     
  492.     Set rsWl = mCdt.rsWLCX(lngWpID, strLx, strZyID, dtRq1, dtRq2)
  493.     Set DataGrid1.DataSource = rsWl
  494. End Sub
  495. Public Sub ReFrom()
  496.     On Error Resume Next
  497.     '调整控件位置、大小
  498.     If Width < 5680 Then Width = 5680
  499.     If Height < 7600 Then Height = 7600
  500.     Frame1.Height = Height - 5000
  501.     TreeView1.Height = Frame1.Height - 1300
  502.     Picture1(1).Move 5565, 0, Width - 5680, Height - 400
  503.     DataGrid1.Move 0, 0, Picture1(1).Width - 60, Picture1(1).Height - 60
  504. End Sub
  505. Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
  506.     '以搜索树节点值为条件进行查询
  507.     Dim lngWpID As Long, strLx As String, strZyID As String
  508.     Dim dtRq1 As Date, dtRq2 As Date
  509.     strLx = "%"
  510.     strZyID = "%"
  511.     dtRq1 = dtpCxRq(0).Value
  512.     dtRq2 = dtpCxRq(1).Value
  513.     
  514.     If Left(Node.Key, 3) = "WPA" Then
  515.         lngWpID = Node.Tag
  516.     ElseIf Left(Node.Key, 3) = "WPB" Then
  517.         strZyID = Node.Parent.Tag
  518.         lngWpID = Node.Tag
  519.     ElseIf Left(Node.Key, 3) = "LXA" Then
  520.         lngWpID = Node.Parent.Tag
  521.         strLx = Node.Tag
  522.     ElseIf Left(Node.Key, 3) = "LXB" Then
  523.         strZyID = Node.Parent.Parent.Tag
  524.         lngWpID = Node.Parent.Tag
  525.         strLx = Node.Tag
  526.     Else
  527.         Exit Sub
  528.     End If
  529.     
  530.     OpenRs lngWpID, strLx, strZyID, dtRq1, dtRq2
  531. End Sub
  532. Private Sub StateForm()
  533.     On Error Resume Next
  534.     '设置树形查询搜索框的节点
  535.     Dim mNode As Node
  536.     Dim strNodeKey(1 To 3) As String
  537.     Dim rsNodes(1 To 3) As ADODB.Recordset
  538.     Dim lngXh(1 To 3) As Long
  539.     
  540.     Set mNode = TreeView1.Nodes.Add(, tvwFirst, "1NODE")
  541.     mNode.Text = "按物品类别搜索"
  542.     
  543.     Set mNode = TreeView1.Nodes.Add("1NODE", tvwNext, "2NODE")
  544.     mNode.Text = "按物流经手人搜索"
  545.     '取得物品类别节点
  546.     Set rsNodes(1) = mCdt.rsWLCX_WPLBQD
  547.     lngXh(1) = 1
  548.     Do Until rsNodes(1).EOF
  549.         strNodeKey(1) = "WLB" & rsNodes(1)(0) & lngXh(1)
  550.         Set mNode = TreeView1.Nodes.Add("1NODE", tvwChild, strNodeKey(1))
  551.         mNode.Text = rsNodes(1)(0)
  552.         '取得物品节点
  553.         lngXh(2) = lngXh(1) * 1000 + 1
  554.         Set rsNodes(2) = mCdt.rsWLCX_WPQD(rsNodes(1)(0), "%")
  555.         Do Until rsNodes(2).EOF
  556.             strNodeKey(2) = "WPA" & rsNodes(2)(0) & lngXh(2)
  557.             Set mNode = TreeView1.Nodes.Add(strNodeKey(1), tvwChild, strNodeKey(2))
  558.             mNode.Tag = rsNodes(2)(0)
  559.             mNode.Text = rsNodes(2)(1) & "(" & rsNodes(2)(0) & ")"
  560.             '取得物流类型节点
  561.             lngXh(3) = lngXh(2) * 10 + 1
  562.             Set rsNodes(3) = mCdt.rsWLCX_WLLXQD(rsNodes(2)(0), "%")
  563.             Do Until rsNodes(3).EOF
  564.                 strNodeKey(3) = "LXA" & rsNodes(3)(0) & lngXh(3)
  565.                 Set mNode = TreeView1.Nodes.Add(strNodeKey(2), tvwChild, strNodeKey(3))
  566.                 mNode.Tag = rsNodes(3)(0)
  567.                 mNode.Text = rsNodes(3)(0)
  568.                 rsNodes(3).MoveNext
  569.                 lngXh(3) = lngXh(3) + 1
  570.             Loop
  571.             rsNodes(3).Close
  572.             rsNodes(2).MoveNext
  573.             lngXh(2) = lngXh(2) + 1
  574.         Loop
  575.         rsNodes(2).Close
  576.         rsNodes(1).MoveNext
  577.         lngXh(1) = lngXh(1) + 1
  578.     Loop
  579.     rsNodes(1).Close
  580.     
  581.     '取得经手人节点
  582.     Set rsNodes(1) = mCdt.rsWLCX_JSRQD
  583.     lngXh(1) = 1
  584.     Do Until rsNodes(1).EOF
  585.         strNodeKey(1) = "JSR" & rsNodes(1)(0)
  586.         Set mNode = TreeView1.Nodes.Add("2NODE", tvwChild, strNodeKey(1))
  587.         mNode.Tag = rsNodes(1)(0)
  588.         mNode.Text = rsNodes(1)(0)
  589.         '取得物品节点
  590.         lngXh(2) = lngXh(1) * 1000 + 1
  591.         Set rsNodes(2) = mCdt.rsWLCX_WPQD("%", rsNodes(1)(0))
  592.         Do Until rsNodes(2).EOF
  593.             strNodeKey(2) = "WPB" & rsNodes(2)(0) & lngXh(2)
  594.             Set mNode = TreeView1.Nodes.Add(strNodeKey(1), tvwChild, strNodeKey(2))
  595.             mNode.Tag = rsNodes(2)(0)
  596.             mNode.Text = rsNodes(2)(1) & "(" & rsNodes(2)(0) & ")"
  597.             '取得物流类型节点
  598.             lngXh(3) = lngXh(2) * 10 + 1
  599.             Set rsNodes(3) = mCdt.rsWLCX_WLLXQD(rsNodes(2)(0), rsNodes(1)(0))
  600.             Do Until rsNodes(3).EOF
  601.                 strNodeKey(3) = "LXB" & rsNodes(3)(0) & lngXh(3)
  602.                 Set mNode = TreeView1.Nodes.Add(strNodeKey(2), tvwChild, strNodeKey(3))
  603.                 mNode.Tag = rsNodes(3)(0)
  604.                 mNode.Text = rsNodes(3)(0)
  605.                 rsNodes(3).MoveNext
  606.                 lngXh(3) = lngXh(3) + 1
  607.             Loop
  608.             rsNodes(3).Close
  609.             rsNodes(2).MoveNext
  610.             lngXh(2) = lngXh(2) + 1
  611.         Loop
  612.         rsNodes(2).Close
  613.         rsNodes(1).MoveNext
  614.         lngXh(1) = lngXh(1) + 1
  615.     Loop
  616.     rsNodes(1).Close
  617.     
  618.     Set rsNodes(1) = Nothing
  619.     Set rsNodes(2) = Nothing
  620.     Set rsNodes(3) = Nothing
  621.     dtpCxRq(0) = DateAdd("M", -1, Date)
  622.     dtpCxRq(1) = Date
  623. End Sub