frmDataList.frm
上传用户:yexiandon
上传日期:2022-07-12
资源大小:895k
文件大小:14k
- VERSION 5.00
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
- Begin VB.Form frmDataList
- ClientHeight = 6105
- ClientLeft = 5310
- ClientTop = 5040
- ClientWidth = 9615
- Icon = "frmDataList.frx":0000
- LinkTopic = "Form1"
- MDIChild = -1 'True
- ScaleHeight = 6105
- ScaleWidth = 9615
- WindowState = 2 'Maximized
- Begin MSComctlLib.ListView ListView1
- Height = 5160
- Left = 120
- TabIndex = 0
- Top = 600
- Width = 9135
- _ExtentX = 16113
- _ExtentY = 9102
- View = 3
- LabelEdit = 1
- LabelWrap = 0 'False
- HideSelection = 0 'False
- AllowReorder = -1 'True
- FullRowSelect = -1 'True
- GridLines = -1 'True
- _Version = 393217
- SmallIcons = "ImageList2"
- ForeColor = -2147483640
- BackColor = -2147483643
- Appearance = 1
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- NumItems = 0
- End
- Begin MSComctlLib.Toolbar ToolBartb
- Align = 1 'Align Top
- Height = 585
- Left = 0
- TabIndex = 1
- Top = 0
- Width = 9615
- _ExtentX = 16960
- _ExtentY = 1032
- ButtonWidth = 820
- ButtonHeight = 979
- Appearance = 1
- Style = 1
- ImageList = "ImageList2"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 6
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "导出"
- Key = "xls"
- ImageKey = "xls"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "查找"
- Key = "find"
- ImageKey = "cz"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "刷新"
- Key = "f5"
- ImageKey = "f5"
- EndProperty
- BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "打印"
- Key = "print"
- ImageKey = "print"
- EndProperty
- BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "关闭"
- Key = "exit"
- ImageKey = "exit"
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.ImageList ImageList2
- Left = 9120
- Top = 5520
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 33
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":12FA
- Key = "A2"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":1BD4
- Key = "A1"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":269E
- Key = "A0"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":2F78
- Key = ""
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":3B22
- Key = ""
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":40BC
- Key = ""
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":4656
- Key = ""
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":4BF0
- Key = "gb"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":573A
- Key = ""
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":B35C
- Key = ""
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":B8F6
- Key = ""
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":BA50
- Key = ""
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":BBAA
- Key = ""
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":BD04
- Key = "f5"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":BE5E
- Key = ""
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":BFB8
- Key = "del"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":C112
- Key = "cz"
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":C26C
- Key = "sboy"
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":C3C6
- Key = "bboy"
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":C960
- Key = "view"
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":CEFA
- Key = ""
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":D494
- Key = "save"
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":DA2E
- Key = "cute"
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":DFC8
- Key = "copy"
- EndProperty
- BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":E562
- Key = "paste"
- EndProperty
- BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":EAFC
- Key = "xg"
- EndProperty
- BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":F096
- Key = "serch"
- EndProperty
- BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":F630
- Key = "info"
- EndProperty
- BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":FBCA
- Key = ""
- EndProperty
- BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":10164
- Key = ""
- EndProperty
- BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":106FE
- Key = "print"
- EndProperty
- BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":10C98
- Key = "exit"
- EndProperty
- BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDataList.frx":11072
- Key = "xls"
- EndProperty
- EndProperty
- End
- End
- Attribute VB_Name = "frmDataList"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '****************************************************************************
- '人人为我,我为人人
- '枕善居收藏整理
- '发布日期:2008/01/21
- '描 述:汽车维修管理系统SQL2000版
- '网 站:http://www.Mndsoft.com/ (VB6源码博客)
- '网 站:http://www.VbDnet.com/ (VB.NET源码博客,主要基于.NET2005)
- 'e-mail :Mndsoft@163.com
- 'e-mail :Mndsoft@126.com
- 'OICQ :88382850
- ' 如果您有新的好的代码别忘记给枕善居哦!
- '****************************************************************************
- Option Explicit
- Private Const MARGIN_SIZE = 60 ' 单位为缇
- Const sSQL As String = "Select * from V_Serch"
- Public Sub ObjToLv(ByVal objClients As Recordset, Optional ByRef lvw As ListView)
- Dim i As Long
- If lvw Is Nothing Then Set lvw = ListView1
-
- If lvw.ColumnHeaders.Count = 0 Then InitListview lvw
- lvw.ListItems.Clear '清除当前的列表内容
-
- For i = 1 To objClients.RecordCount
- FindRst objClients.DataSource, lvw
- objClients.MoveNext
- Next i
- End Sub
- Public Sub FindRst(ByVal objClient As Recordset, Optional ByRef lvw As ListView)
- Dim itm As ListItem
- Dim sIcon As String
- Dim bIcon As String
- sIcon = "sboy"
- bIcon = "bboy"
- Set itm = lvw.ListItems.Add(, , , , sIcon)
- With objClient '这里要与InitClientListview相对应
- itm.SmallIcon = sIcon
- ' itm.Icon = bIcon
- itm.Text = .Fields("carNo").Value
- itm.SubItems(1) = .Fields("inDate").Value
- itm.SubItems(2) = .Fields("pName").Value
- itm.SubItems(3) = .Fields("pDate").Value
- itm.SubItems(4) = Val(.Fields("pNum").Value)
- itm.SubItems(5) = IIf(IsNull(.Fields("sNum").Value), "——", .Fields("sNum").Value)
- itm.SubItems(6) = IIf(IsNull(.Fields("pPrice").Value), "——", .Fields("pPrice").Value)
- itm.SubItems(7) = IIf(IsNull(.Fields("sNum").Value), "——", .Fields("sNum").Value * .Fields("pPrice").Value)
- itm.SubItems(8) = IIf(IsNull(.Fields("FDate").Value), "——", .Fields("Fdate").Value)
- itm.SubItems(9) = IIf(IsNull(.Fields("pBak").Value), "尚未采购", .Fields("pBak").Value)
- End With
- Set itm = Nothing
- End Sub
- Private Sub InitListview(ByRef lvw As ListView)
- With lvw
- .ColumnHeaders.Clear
- '加入四个列首
- .ColumnHeaders.Add , , "车牌号", 1500
- .ColumnHeaders.Add , , "入场时间", 2100
- .ColumnHeaders.Add , , "报件名称", 1600
- .ColumnHeaders.Add , , "报件时间", 2100
- .ColumnHeaders.Add , , "报件数量", 900
- .ColumnHeaders.Add , , "采购数量", 900
- .ColumnHeaders.Add , , "采购单价", 900
- .ColumnHeaders.Add , , "采购金额", 1000
- .ColumnHeaders.Add , , "采购时间", 2100
- .ColumnHeaders.Add , , "备注", 2000
- End With
- End Sub
- Private Sub Form_Load()
- InitListview ListView1
- End Sub
- Private Sub Form_Resize()
- Dim sngButtonTop As Single
- Dim sngScaleWidth As Single
- Dim sngScaleHeight As Single
- On Error Resume Next
- With Me
- sngScaleWidth = .ScaleWidth
- sngScaleHeight = .ScaleHeight
- .ListView1.Move MARGIN_SIZE, ToolBartb.Height + MARGIN_SIZE, sngScaleWidth - (2 * MARGIN_SIZE), sngScaleHeight - (ToolBartb.Height + 3 * MARGIN_SIZE)
- End With
- Exit Sub
- End Sub
- Private Sub ToolBartb_ButtonClick(ByVal Button As MSComctlLib.Button)
- Select Case Button.Key
- Case "find"
- frmFindCG.Show vbModal
- Case "print"
- MsgBox "该功能尚未完成"
- Case "xls"
- ListViewToExcel ListView1
- Case "f5"
- MsgBox "该功能尚未完成"
- Case "exit"
- Unload Me
- End Select
- End Sub
- Private Sub ToolBartb_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu)
- Select Case ButtonMenu.Key
- Case "dtb"
- ListView1.View = lvwIcon
- Case "xtb"
- ListView1.View = lvwSmallIcon
- Case "lb"
- ListView1.View = lvwList
- Case "xxzl"
- ListView1.View = lvwReport
- End Select
- End Sub