资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:29k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Begin VB.Form Dev_ItemQFilt
- BorderStyle = 1 'Fixed Single
- Caption = "过滤"
- ClientHeight = 4875
- ClientLeft = 3210
- ClientTop = 1680
- ClientWidth = 5685
- HelpContextID = 2503002
- Icon = "表_查询条件.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4875
- ScaleWidth = 5685
- Begin TabDlg.SSTab SSTab1
- Height = 4725
- Left = 75
- TabIndex = 0
- Top = 75
- Width = 5535
- _ExtentX = 9763
- _ExtentY = 8334
- _Version = 393216
- Style = 1
- Tabs = 2
- TabsPerRow = 2
- TabHeight = 520
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- TabCaption(0) = "一般过滤"
- TabPicture(0) = "表_查询条件.frx":1042
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Label_C(0)"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "Label1"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).Control(2)= "UnloadCheck"
- Tab(0).Control(2).Enabled= 0 'False
- Tab(0).Control(3)= "Command1"
- Tab(0).Control(3).Enabled= 0 'False
- Tab(0).Control(4)= "Command2"
- Tab(0).Control(4).Enabled= 0 'False
- Tab(0).Control(5)= "Command6"
- Tab(0).Control(5).Enabled= 0 'False
- Tab(0).Control(6)= "Combo_I(0)"
- Tab(0).Control(6).Enabled= 0 'False
- Tab(0).Control(7)= "Combo1"
- Tab(0).Control(7).Enabled= 0 'False
- Tab(0).ControlCount= 8
- TabCaption(1) = "条件过滤"
- TabPicture(1) = "表_查询条件.frx":105E
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Command5"
- Tab(1).Control(1)= "Command4"
- Tab(1).Control(2)= "Command3"
- Tab(1).Control(3)= "Combo5(3)"
- Tab(1).Control(4)= "Combo5(2)"
- Tab(1).Control(5)= "Combo5(1)"
- Tab(1).Control(6)= "Combo5(0)"
- Tab(1).Control(7)= "Combo4(3)"
- Tab(1).Control(8)= "Combo4(2)"
- Tab(1).Control(9)= "Combo4(1)"
- Tab(1).Control(10)= "Combo4(0)"
- Tab(1).Control(11)= "Combo3(3)"
- Tab(1).Control(12)= "Combo3(2)"
- Tab(1).Control(13)= "Combo3(1)"
- Tab(1).Control(14)= "Combo3(0)"
- Tab(1).Control(15)= "Combo2(3)"
- Tab(1).Control(16)= "Combo2(2)"
- Tab(1).Control(17)= "Combo2(1)"
- Tab(1).Control(18)= "Combo2(0)"
- Tab(1).Control(19)= "Label2(3)"
- Tab(1).Control(20)= "Label2(2)"
- Tab(1).Control(21)= "Label2(1)"
- Tab(1).Control(22)= "Label2(0)"
- Tab(1).ControlCount= 23
- Begin VB.ComboBox Combo1
- Height = 300
- Left = 1400
- Style = 2 'Dropdown List
- TabIndex = 30
- Top = 840
- Width = 2775
- End
- Begin VB.ComboBox Combo_I
- ForeColor = &H00000000&
- Height = 300
- Index = 0
- ItemData = "表_查询条件.frx":107A
- Left = 1380
- List = "表_查询条件.frx":107C
- TabIndex = 27
- Top = 1890
- Visible = 0 'False
- Width = 3105
- End
- Begin VB.CommandButton Command6
- Caption = "设置(&S)"
- Height = 300
- Left = 90
- TabIndex = 26
- Top = 4320
- Width = 1120
- End
- Begin VB.CommandButton Command2
- Caption = "取消(&C)"
- Height = 300
- Left = 4230
- TabIndex = 18
- Top = 4320
- Width = 1120
- End
- Begin VB.CommandButton Command1
- Caption = "确定(&O)"
- Height = 300
- Left = 3030
- TabIndex = 17
- Top = 4320
- Width = 1120
- End
- Begin VB.CommandButton Command5
- Caption = "取消(&C)"
- Height = 300
- Left = -70740
- TabIndex = 21
- Top = 4290
- Width = 1120
- End
- Begin VB.CommandButton Command4
- Caption = "查询(&D)"
- Height = 300
- Left = -71940
- TabIndex = 20
- Top = 4290
- Width = 1120
- End
- Begin VB.CommandButton Command3
- Caption = "全清(&L)"
- Height = 300
- Left = -74910
- TabIndex = 19
- Top = 4290
- Width = 1120
- End
- Begin VB.ComboBox Combo5
- Enabled = 0 'False
- Height = 300
- Index = 3
- ItemData = "表_查询条件.frx":107E
- Left = -70410
- List = "表_查询条件.frx":108B
- Style = 2 'Dropdown List
- TabIndex = 16
- Top = 2190
- Width = 795
- End
- Begin VB.ComboBox Combo5
- Height = 300
- Index = 2
- ItemData = "表_查询条件.frx":109D
- Left = -70410
- List = "表_查询条件.frx":10AA
- Style = 2 'Dropdown List
- TabIndex = 15
- Top = 1770
- Width = 795
- End
- Begin VB.ComboBox Combo5
- Height = 300
- Index = 1
- ItemData = "表_查询条件.frx":10BC
- Left = -70410
- List = "表_查询条件.frx":10C9
- Style = 2 'Dropdown List
- TabIndex = 14
- Top = 1320
- Width = 795
- End
- Begin VB.ComboBox Combo5
- Height = 300
- Index = 0
- ItemData = "表_查询条件.frx":10DB
- Left = -70410
- List = "表_查询条件.frx":10E8
- Style = 2 'Dropdown List
- TabIndex = 13
- Top = 840
- Width = 795
- End
- Begin VB.ComboBox Combo4
- Height = 300
- Index = 3
- Left = -72210
- TabIndex = 12
- Top = 2190
- Width = 1755
- End
- Begin VB.ComboBox Combo4
- Height = 300
- Index = 2
- Left = -72210
- TabIndex = 11
- Top = 1770
- Width = 1755
- End
- Begin VB.ComboBox Combo4
- Height = 300
- Index = 1
- Left = -72210
- TabIndex = 10
- Top = 1320
- Width = 1755
- End
- Begin VB.ComboBox Combo4
- Height = 300
- Index = 0
- Left = -72210
- TabIndex = 9
- Top = 840
- Width = 1755
- End
- Begin VB.ComboBox Combo3
- Height = 300
- Index = 3
- ItemData = "表_查询条件.frx":10FA
- Left = -73230
- List = "表_查询条件.frx":1116
- Style = 2 'Dropdown List
- TabIndex = 8
- Top = 2190
- Width = 975
- End
- Begin VB.ComboBox Combo3
- Height = 300
- Index = 2
- ItemData = "表_查询条件.frx":1150
- Left = -73230
- List = "表_查询条件.frx":116C
- Style = 2 'Dropdown List
- TabIndex = 7
- Top = 1770
- Width = 975
- End
- Begin VB.ComboBox Combo3
- Height = 300
- Index = 1
- ItemData = "表_查询条件.frx":11A6
- Left = -73230
- List = "表_查询条件.frx":11C2
- Style = 2 'Dropdown List
- TabIndex = 6
- Top = 1320
- Width = 975
- End
- Begin VB.ComboBox Combo3
- Height = 300
- Index = 0
- ItemData = "表_查询条件.frx":11FC
- Left = -73230
- List = "表_查询条件.frx":1218
- Style = 2 'Dropdown List
- TabIndex = 5
- Top = 840
- Width = 975
- End
- Begin VB.ComboBox Combo2
- Height = 300
- Index = 3
- ItemData = "表_查询条件.frx":1252
- Left = -74790
- List = "表_查询条件.frx":1259
- Style = 2 'Dropdown List
- TabIndex = 4
- Top = 2190
- Width = 1515
- End
- Begin VB.ComboBox Combo2
- Height = 300
- Index = 2
- ItemData = "表_查询条件.frx":1260
- Left = -74790
- List = "表_查询条件.frx":1267
- Style = 2 'Dropdown List
- TabIndex = 3
- Top = 1770
- Width = 1515
- End
- Begin VB.ComboBox Combo2
- Height = 300
- Index = 1
- ItemData = "表_查询条件.frx":126E
- Left = -74790
- List = "表_查询条件.frx":1275
- Style = 2 'Dropdown List
- TabIndex = 2
- Top = 1320
- Width = 1515
- End
- Begin VB.ComboBox Combo2
- Height = 300
- Index = 0
- ItemData = "表_查询条件.frx":127C
- Left = -74790
- List = "表_查询条件.frx":1283
- Style = 2 'Dropdown List
- TabIndex = 1
- Top = 840
- Width = 1515
- End
- Begin VB.CheckBox UnloadCheck
- Caption = "UnloadCheck"
- Height = 255
- Left = 480
- TabIndex = 31
- Top = 3960
- Visible = 0 'False
- Width = 1455
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "设备类别"
- Height = 180
- Left = 570
- TabIndex = 29
- Top = 870
- Width = 720
- End
- Begin VB.Label Label_C
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "性别"
- Height = 180
- Index = 0
- Left = 360
- TabIndex = 28
- Top = 1920
- Visible = 0 'False
- Width = 360
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "关系:"
- Height = 180
- Index = 3
- Left = -70410
- TabIndex = 25
- Top = 600
- Width = 450
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "内容:"
- Height = 180
- Index = 2
- Left = -72210
- TabIndex = 24
- Top = 600
- Width = 450
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "关系:"
- Height = 180
- Index = 1
- Left = -73230
- TabIndex = 23
- Top = 600
- Width = 450
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "项目:"
- Height = 180
- Index = 0
- Left = -74820
- TabIndex = 22
- Top = 600
- Width = 450
- End
- End
- End
- Attribute VB_Name = "Dev_ItemQFilt"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim FieldName()
- Dim ItmeCorrelation() As String
- Dim Item_Code()
- Dim Item_Root()
- Dim Combo_ICode()
- Dim Combo4_Code()
- Private Sub Combo2_Click(Index As Integer)
- On Error Resume Next
- If Combo2(Index).Text <> "" Then
- ComBo_AddList Combo4(Index), ItmeCorrelation(Combo2(Index).ListIndex), Index, True
- Else
- Combo4(Index).Clear
- End If
- End Sub
- Private Sub Command1_Click() '一般过滤
- Dim aDo_Einfo As New Recordset
- Dim i As Integer
- Dim Ssql As String
- Dim D As String
- D = 1
- For i = 1 To Combo_I.Count - 1
- If Combo_I(i).Text <> "" Then
- If D = 1 Then
- If Val(Combo_I(i).Tag) = 1 And Combo_I(i).ListIndex >= 0 Then
- Ssql = "b." & Label_C(i).Tag & "='" & Combo_ICode(i, Combo_I(i).ListIndex) & "'"
- Else
- Ssql = Label_C(i).Tag & "='" & Combo_I(i).Text & "'"
- End If
- '--------------
- Else
- If Val(Combo_I(i).Tag) = 1 And Combo_I(i).ListIndex >= 0 Then
- Ssql = Ssql & " and " & " b." & Label_C(i).Tag & "='" & Combo_ICode(i, Combo_I(i).ListIndex) & "'"
- Else
- Ssql = Ssql & " and " & "b." & Label_C(i).Tag & "='" & Combo_I(i).Text & "'"
- End If
- '---------
- End If
- D = D + 1
- End If
- Next i
- '-----------------
- If Trim(Ssql) = "" Then
- Ssql = "b.DEVSort='" & Combo1.ItemData(Combo1.ListIndex) & "'"
- Else
- Ssql = Ssql & " and b.DEVSort='" & Combo1.ItemData(Combo1.ListIndex) & "'"
- End If
- P_Ssql = Ssql
- Enployeeinfo_Query Ssql
- '-----------------
- Me.Hide
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub
- Private Sub Command3_Click()
- Dim c As Integer
- For c = 0 To 3
- Combo2(c).ListIndex = 0
- Combo3(c).ListIndex = 0
- Combo4(c).Text = ""
- Combo4(c).Clear
- Combo5(c).ListIndex = 0
- Next c
- End Sub
- Private Sub Command4_Click() '条件过滤
- Dim Footing
- Dim Footing1
- Dim r As Integer
- Dim Ssql As String
- Footing = Array("", "=", "<>", "Like", ">", "<", ">=", "<=")
- Footing1 = Array("", "AND", "OR")
- '-------------------
- For r = 0 To 3
- If Trim(Combo2(r).Text) = "" Then MsgBox "项目错误! ", 48, "过滤": Combo2(r).SetFocus: Exit Sub
- If Trim(Combo3(r).Text) = "" Then MsgBox "关系错误! ", 48, "过滤": Combo3(r).SetFocus: Exit Sub
- '--------------------
- If Combo2(r).ItemData(Combo2(r).ListIndex) = 2 Then
- If IsDate(Combo4(r)) = False And Trim(Combo4(r)) <> "" Then
- MsgBox "非法日期格式!" & Format(Date, "yyyy-mm-dd"), 16
- Combo4(r).SetFocus
- Exit Sub
- Else
- Combo4(r).Text = Format(Trim(Combo4(r).Text), "yyyy-mm-dd")
- End If
- End If
- '------------------------
- If Combo5(r).Text = "" Then
- '-----------------
- If Combo3(r).ListIndex <> 3 Then
- If Item_Code(Combo2(r).ListIndex) = 1 And Combo4(r).ListIndex >= 0 Then
- If Item_Root(Combo2(r).ListIndex) = "1" Then
- Ssql = Ssql & "b." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Combo4_Code(r, Combo4(r).ListIndex) & "'"
- Else
- Ssql = Ssql & "a." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Combo4_Code(r, Combo4(r).ListIndex) & "'"
- End If
- Else
- If Item_Root(Combo2(r).ListIndex) = "1" Then
- Ssql = Ssql & "b." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Trim(Combo4(r).Text) & "'"
- Else
- Ssql = Ssql & "a." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Trim(Combo4(r).Text) & "'"
- End If
- End If
- '--------------
- Else
- If Item_Code(Combo2(r).ListIndex) = 1 And Combo4(r).ListIndex >= 0 Then
- If Item_Root(Combo2(r).ListIndex) = "1" Then
- Ssql = Ssql & "b." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Combo4_Code(r, Combo4(r).ListIndex) & "%'"
- Else
- Ssql = Ssql & "a." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Combo4_Code(r, Combo4(r).ListIndex) & "%'"
- End If
- Else
- If Item_Root(Combo2(r).ListIndex) = "1" Then
- Ssql = Ssql & "b." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Trim(Combo4(r).Text) & "%'"
- Else
- Ssql = Ssql & "a." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Trim(Combo4(r).Text) & "%'"
- End If
- End If
- '--------------
- End If
- Exit For
- '-------------------
- Else
- '------------------
- If Combo3(r).ListIndex <> 3 Then
- If Item_Code(Combo2(r).ListIndex) = 1 And Combo4(r).ListIndex >= 0 Then
- If Item_Root(Combo2(r).ListIndex) = "1" Then
- Ssql = Ssql & "b." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Combo4_Code(r, Combo4(r).ListIndex) & "'" & " " & Footing1(Combo5(r).ListIndex) & " "
- Else
- Ssql = Ssql & "a." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Combo4_Code(r, Combo4(r).ListIndex) & "'" & " " & Footing1(Combo5(r).ListIndex) & " "
- End If
- Else
- If Item_Root(Combo2(r).ListIndex) = "1" Then
- Ssql = Ssql & "b." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Trim(Combo4(r).Text) & "'" & " " & Footing1(Combo5(r).ListIndex) & " "
- Else
- Ssql = Ssql & "a." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Trim(Combo4(r).Text) & "'" & " " & Footing1(Combo5(r).ListIndex) & " "
- End If
- End If
- '--------------
- Else
- If Item_Code(Combo2(r).ListIndex) = 1 And Combo4(r).ListIndex >= 0 Then
- If Item_Root(Combo2(r).ListIndex) = "1" Then
- Ssql = Ssql & "b." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Combo4_Code(r, Combo4(r).ListIndex) & "%'" & " " & Footing1(Combo5(r).ListIndex) & " "
- Else
- Ssql = Ssql & "a." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Combo4_Code(r, Combo4(r).ListIndex) & "%'" & " " & Footing1(Combo5(r).ListIndex) & " "
- End If
- Else
- If Item_Root(Combo2(r).ListIndex) = "1" Then
- Ssql = Ssql & "b." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Trim(Combo4(r).Text) & "%'" & " " & Footing1(Combo5(r).ListIndex) & " "
- Else
- Ssql = Ssql & "a." & FieldName(Combo2(r).ListIndex) & " " & Footing(Combo3(r).ListIndex) & " '" & Trim(Combo4(r).Text) & "%'" & " " & Footing1(Combo5(r).ListIndex) & " "
- End If
- End If
- End If
- '------------------
- End If
- '--------------------
- Next
- Enployeeinfo_Query Ssql
- '---------------
- Me.Hide
- End Sub
- Private Sub Command5_Click()
- Unload Me
- End Sub
- Private Sub Command6_Click()
- Dev_ItemQueryItem.Show 1
- End Sub
- Private Sub Form_Load()
- Dim aDo_Item As New Recordset
- Dim i As Integer
- List
- Set aDo_Item = Cw_DataEnvi.DataConnect.Execute("select * from dev_item ")
- With aDo_Item
- i = 1
- ReDim FieldName(aDo_Item.RecordCount + 1)
- ReDim Item_Code(aDo_Item.RecordCount + 1)
- ReDim ItmeCorrelation(aDo_Item.RecordCount + 1)
- ReDim Item_Root(aDo_Item.RecordCount + 1)
- Do While Not .EOF
- Combo2(0).AddItem !ItemChineseName
- Combo2(0).ItemData(i) = !ItemFieldType
- Combo2(1).AddItem !ItemChineseName
- Combo2(1).ItemData(i) = !ItemFieldType
- Combo2(2).AddItem !ItemChineseName
- Combo2(2).ItemData(i) = !ItemFieldType
- Combo2(3).AddItem !ItemChineseName
- FieldName(i) = !ItemFieldName
- Item_Code(i) = !yncode
- Item_Root(i) = !YNRoot
- ItmeCorrelation(i) = "" & !ItmeCorrelation
- i = i + 1
- .MoveNext
- Loop
- '-------------------
- Dim ado_Itemtf As New Recordset
- Dim aDo_Com As New Recordset
- Set aDo_Com = Cw_DataEnvi.DataConnect.Execute("select * from DEV_ItemSort")
- i = 0
- Combo1.Clear
- Do While Not aDo_Com.EOF
- Combo1.AddItem Trim(aDo_Com!ISName)
- Combo1.ItemData(i) = aDo_Com!ISId
- i = i + 1
- aDo_Com.MoveNext
- Loop
- Combo1.ListIndex = 0
- aDo_Com.Close
- '--------------------
- End With
- End Sub
- '------------------------------
- Public Sub List() '显示项目
- Dim B As Integer, TopInt As Integer
- Dim D As Integer
- Dim add_item As New Recordset
- For B = 1 To Combo_I.Count - 1
- Unload Combo_I(B): Unload Label_C(B)
- Next B
- '------------------------
- D = 1: TopInt = 1300
- Set add_item = Cw_DataEnvi.DataConnect.Execute("select * from dev_item where YNquery='1'")
- ReDim Combo_ICode(add_item.RecordCount, 0)
- ReDim Combo4_Code(4, 0)
- Do While Not add_item.EOF
- '---------------------------
- '创建下拉列表框
- Load Combo_I(D)
- Load Label_C(D)
- Label_C(D).Top = TopInt
- Label_C(D).Caption = add_item!ItemChineseName
- Label_C(D).Left = 1400 - Label_C(D).Width - 100
- Label_C(D).Tag = "" & add_item!ItemFieldName
- Combo_I(D).Left = 1400
- Combo_I(D).Top = Label_C(D).Top - 50
- If add_item!ItmeFieldLength * 105 > Me.Width - 1500 Then
- Combo_I(D).Width = 3500
- Else
- Combo_I(D).Width = add_item!ItmeFieldLength * 105
- End If
- Combo_I(D).Tag = "" & add_item!yncode
- ComBo_AddList Combo_I(D), "" & add_item!ItmeCorrelation, D, False
- '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- Dim aDo_Com As New Recordset
- Dim i As Integer
- Dim Ssql As String
- If Trim(add_item!TableName) <> "" Then
- If Trim(add_item!TableName) = "CorrelationList" Then
- Ssql = "select * from DEV_CorrelationSort A,DEV_CorrelationList B where " _
- & "A.SortCode=b.SortCode and A.SortName='" & Trim(add_item!ItmeCorrelation) & "' order by B.ListCode"
- Else
- Ssql = "select * from " & add_item!TableName
- End If
- Set aDo_Com = Cw_DataEnvi.DataConnect.Execute(Ssql)
- i = 1
- Combo_I(D).Clear
- Combo_I(D).AddItem ""
- Combo_I(D).ItemData(0) = 0
- Do While Not aDo_Com.EOF
- If Trim(add_item!TableName) <> "CorrelationList" Then
- Combo_I(D).AddItem Trim(aDo_Com(Trim(add_item!CloumnName2)))
- Combo_I(D).ItemData(i) = aDo_Com(Trim(add_item!CloumnName1))
- Else
- Combo_I(D).AddItem Trim(aDo_Com!Listname)
- Combo_I(D).ItemData(i) = aDo_Com!ListCode
- End If
- i = i + 1
- aDo_Com.MoveNext
- Loop
- aDo_Com.Close
- End If
- '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- Combo_I(D).Visible = True
- Label_C(D).Visible = True
- D = D + 1
- TopInt = TopInt + 400
- '--------------------------------
- add_item.MoveNext
- Loop
- add_item.Close
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- If Not UnloadCheck.Value = 1 Then
- Me.Hide
- End If
- End Sub
- Public Sub Enployeeinfo_Query(Ssql_2 As String) '条件过滤
- Dim aDo_Reco As New Recordset
- Dim aDo_Item As New Recordset
- Dim h As Integer: Dim c As Integer
- Dim Str_Field As String
- Dim ssql_1 As String
- ssql_1 = Ssql_2
- If ssql_1 = "" Then
- ssql_1 = Item_Info & " where a.id=b.id"
- Else
- ssql_1 = Item_Info & " where a.id=b.id and " & ssql_1
- End If
- Set aDo_Reco = Cw_DataEnvi.DataConnect.Execute(ssql_1)
- Set aDo_Item = Cw_DataEnvi.DataConnect.Execute("select * from dev_Item a,DEV_ItemSortList b where a.ItemCode=b.ItemCode and b.isid=" & Dev_ItemQFilt.Combo1.ItemData(Dev_ItemQFilt.Combo1.ListIndex) & " order by tab")
- With Dev_ItemQInfoForm.vsFlexGrid1
- Dev_ItemQInfoForm.Tag = Dev_ItemQFilt.Combo1.ItemData(Dev_ItemQFilt.Combo1.ListIndex)
- Dev_ItemQInfoForm.vsFlexGrid1.Tag = Dev_ItemQFilt.Combo1.Text
- c = 1: h = 1
- .Rows = aDo_Reco.RecordCount + 1
- Do While Not aDo_Item.EOF
- Str_Field = Str_Field & "^" & aDo_Item!ItemChineseName & "|"
- aDo_Item.MoveNext
- Loop
- .Clear
- .FormatString = "<ID |" & Str_Field
- .Cols = aDo_Item.RecordCount + 1
- aDo_Item.MoveFirst
- Do While Not aDo_Reco.EOF
- Do While Not aDo_Item.EOF
- If aDo_Item!yncode = 1 Then
- .TextMatrix(h, c) = Trim("" & aDo_Reco("N_" & Trim(aDo_Item!ItemFieldName)))
- Else
- .TextMatrix(h, c) = Trim("" & aDo_Reco(Trim(aDo_Item!ItemFieldName)))
- End If
- c = c + 1
- aDo_Item.MoveNext
- Loop
- .TextMatrix(h, 0) = h
- aDo_Item.MoveFirst
- c = 1
- h = h + 1
- aDo_Reco.MoveNext
- Loop
- aDo_Item.MoveFirst
- c = 1
- Do While Not aDo_Item.EOF
- If Val("" & aDo_Item!Width) < 1 Then
- .ColWidth(c) = 800
- Else
- .ColWidth(c) = Val("" & aDo_Item!Width)
- End If
- aDo_Item.MoveNext
- c = c + 1
- Loop
- End With
- aDo_Reco.Close
- aDo_Item.Close
- End Sub
- Public Sub ComBo_AddList(Com As ComboBox, Str As String, r As Integer, tf As Boolean) '添加Combox
- Dim aDo_Com As New Recordset
- Dim i As Integer
- Dim Ssql As String
- Ssql = "select * from DEV_CorrelationSort A,DEV_CorrelationList B where " _
- & "A.SortCode=b.SortCode and A.SortName='" & Trim(Str) & "' order by B.ListCode"
- Set aDo_Com = Cw_DataEnvi.DataConnect.Execute(Ssql)
- '-----------
- If tf = False Then
- If aDo_Com.RecordCount > UBound(Combo_ICode, 2) Then
- ReDim Preserve Combo_ICode(UBound(Combo_ICode, 1), aDo_Com.RecordCount)
- End If
- i = 1
- Else
- If aDo_Com.RecordCount > UBound(Combo4_Code, 2) Then
- ReDim Preserve Combo4_Code(UBound(Combo4_Code, 1), aDo_Com.RecordCount)
- End If
- i = 0
- End If
- Com.Clear
- '----------
- Do While Not aDo_Com.EOF
- Com.AddItem Trim(aDo_Com!Listname)
- If tf = False Then
- Combo_ICode(r, i) = aDo_Com!ListCode
- Else
- Combo4_Code(r, i) = aDo_Com!ListCode
- End If
- i = i + 1
- aDo_Com.MoveNext
- Loop
- aDo_Com.Close
- End Sub