📄 pay_list.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form pay_list
Caption = "Form1"
ClientHeight = 6420
ClientLeft = 6975
ClientTop = 2385
ClientWidth = 6420
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 6420
ScaleWidth = 6420
Begin VB.CommandButton Command1
Caption = "返 回"
Height = 495
Left = 4920
TabIndex = 2
Top = 5640
Width = 1095
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 4575
Left = 120
TabIndex = 1
Top = 840
Width = 6255
_ExtentX = 11033
_ExtentY = 8070
_Version = 393216
End
Begin VB.Label Label1
Caption = "员工资信息列表"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1320
TabIndex = 0
Top = 240
Width = 4095
End
End
Attribute VB_Name = "pay_list"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rst As New ADODB.Recordset
Dim rstName As New ADODB.Recordset
Dim strSql, strSqlName As String
Public Sub ShowData()
Dim j As Integer
Dim i As Integer
strSql = "select * from tb_pay"
Set rst = ExecuteSql(strSql)
If rst.EOF = False Then
With MSFlexGrid1
.Rows = 1
Do While Not rst.EOF
.Rows = .Rows + 1
For i = 1 To rst.Fields.Count
Select Case rst.Fields(i - 1).Type
Case adDBDate
.TextMatrix(.Rows - 1, i - 1) = Format(rst.Fields(i - 1) & "", "yyyy-mm-dd")
Case Else
.TextMatrix(.Rows - 1, i - 1) = rst.Fields(i - 1) & ""
End Select
Next i
rst.MoveNext
Loop
End With
End If
rst.Close
End Sub
Private Sub Command1_Click()
Me.Hide
frm_main.Show
End Sub
Private Sub Form_Load()
'txtID.Text = ""
With MSFlexGrid1
'固定表头
.FixedRows = 1
'表头项居中
.FillStyle = flexFillRepeat
.Col = 0
.Row = 0
.RowSel = 1
.ColSel = .Cols - 1
.CellAlignment = 4
.Rows = 2
.Cols = 3
End With
'guding liekuan
MSFlexGrid1.ColWidth(0) = 2000
MSFlexGrid1.ColWidth(1) = 2000
MSFlexGrid1.ColWidth(2) = 2000
' MSFlexGrid1.ColWidth(3) = 2000
' MSFlexGrid1.ColWidth(4) = 2000
' MSFlexGrid1.ColWidth(5) = 2400
MSFlexGrid1.TextMatrix(0, 0) = "员工ID"
MSFlexGrid1.TextMatrix(0, 1) = "所发工资"
MSFlexGrid1.TextMatrix(0, 2) = "发工资日期"
' MSFlexGrid1.TextMatrix(0, 3) = "单价(元)"
' MSFlexGrid1.TextMatrix(0, 4) = "经手人ID"
' MSFlexGrid1.TextMatrix(0, 5) = "购买日期"
ShowData ''''
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -