资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:3k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form Dev_ItemQueryItem
- BorderStyle = 1 'Fixed Single
- Caption = "项目"
- ClientHeight = 3855
- ClientLeft = 4125
- ClientTop = 1830
- ClientWidth = 3240
- Icon = "查询项目设置.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3855
- ScaleWidth = 3240
- Begin VB.ListBox List_Item
- Height = 3210
- Left = 75
- Style = 1 'Checkbox
- TabIndex = 2
- Top = 75
- Width = 3075
- End
- Begin VB.CommandButton Command1
- Caption = "确定(&O)"
- Height = 300
- Left = 780
- TabIndex = 1
- Top = 3420
- Width = 1120
- End
- Begin VB.CommandButton Command2
- Caption = "取消(&C)"
- Height = 300
- Left = 2040
- TabIndex = 0
- Top = 3420
- Width = 1120
- End
- End
- Attribute VB_Name = "Dev_ItemQueryItem"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim add_item As New Recordset
- Dim Item_TF()
- Dim ItemCode()
- Private Sub Command1_Click()
- On Error Resume Next
- Dim i As Integer: Dim CH As String: Dim r As Integer
- For i = 0 To List_Item.ListCount - 1
- If List_Item.Selected(i) = True Then
- r = r + 1
- End If
- Next i
- If r < 1 Then MsgBox "项目不能小于一! ", 16: Exit Sub
- If r > 7 Then MsgBox "项目不能大于八个! ", 16: Exit Sub
- For i = 0 To List_Item.ListCount - 1
- If List_Item.Selected(i) = True Then
- CH = "1"
- Else
- CH = "0"
- End If
- Cw_DataEnvi.DataConnect.Execute "update dev_Item set YNQuery='" & CH & "' where ItemCode='" & ItemCode(i) & "'"
- Next i
- Dev_ItemQFilt.List
- Unload Me
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub
- Private Sub Form_Load()
- On Error Resume Next
- Dim i As Integer
- i = 0
- Set add_item = Cw_DataEnvi.DataConnect.Execute("select * from dev_Item where YNRoot=1")
- ReDim Item_TF(add_item.RecordCount + 1)
- ReDim ItemCode(add_item.RecordCount)
- Do While Not add_item.EOF
- List_Item.AddItem add_item!ItemChineseName
- '--------------
- If add_item!YNQuery = 1 Then
- List_Item.Selected(i) = True
- End If
- ItemCode(i) = add_item!ItemCode
- Item_TF(i) = add_item!YNRoot
- '---------------
- add_item.MoveNext
- i = i + 1
- Loop
- add_item.Close
- End Sub