📄 form2.frm
字号:
VERSION 5.00
Begin VB.Form Form2
BorderStyle = 1 'Fixed Single
Caption = "工资结算"
ClientHeight = 4140
ClientLeft = 45
ClientTop = 330
ClientWidth = 7455
Icon = "Form2.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4140
ScaleWidth = 7455
StartUpPosition = 3 '窗口缺省
Begin 美容美发管理系统V2007.XPContainer XPContainer1
Height = 4095
Left = 0
TabIndex = 0
Top = 0
Width = 7455
_ExtentX = 13150
_ExtentY = 7223
Begin VB.TextBox Text3
Height = 375
Left = 3600
TabIndex = 5
Top = 840
Visible = 0 'False
Width = 1695
End
Begin VB.TextBox Text2
Height = 375
Left = 960
TabIndex = 4
Top = 840
Visible = 0 'False
Width = 1695
End
Begin 美容美发管理系统V2007.isButton isButton1
Height = 615
Left = 4680
TabIndex = 3
Top = 120
Width = 1455
_ExtentX = 2566
_ExtentY = 1085
Caption = "isButton"
IconAlign = 1
Tooltiptitle = ""
ToolTipIcon = 0
ToolTipType = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.ComboBox text1
Height = 300
Left = 2400
Style = 2 'Dropdown List
TabIndex = 1
Top = 240
Width = 2175
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "提成率"
Height = 255
Left = 2880
TabIndex = 7
Top = 960
Width = 615
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "基本工资"
Height = 255
Left = 120
TabIndex = 6
Top = 960
Width = 855
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "选择员工编号进行工资核算"
Height = 255
Left = 120
TabIndex = 2
Top = 240
Width = 2415
End
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim conn1 As New adodb.Connection
Dim conn As New adodb.Connection
Dim rs As New adodb.Recordset
Private Sub Command1_Click()
Dim cha As String
Dim ji As String
Dim tc As String
Dim name As String
Dim ssql As String
Dim cnn As New adodb.Connection
Dim ret As New adodb.Recordset
'连接数据库
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path & "\data\kq.mdb" + ";Persist Security Info=False;"
ssql = "select yggl.编号,yggl.姓名,yggl.基本工资,yggl.提成率 From 收银, yggl" + _
" Where yggl.编号=" + "'" + "1" + "'"
ret.Open ssql, cnn
If ret.BOF And ret.EOF Then
MsgBox "没有这个会员", , "警告"
Else
Text2.Text = ret.Fields("基本工资")
Text3.Text = ret.Fields("提成率")
Me.Caption = ji & tc
ret.Close
cnn.Close
End If
End Sub
Private Sub Form_Load()
st
End Sub
Sub st()
Dim i As Integer
Dim StrConnect As String '定义
StrConnect = App.Path
If Right(StrConnect, 1) <> "\" Then StrConnect = StrConnect + "\"
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & StrConnect & "\data\kq.mdb"
rs.Open "select ID,编号 from yggl", conn, 1, 1
i = 0
Do While Not rs.EOF
text1.AddItem rs("编号")
text1.ItemData(i) = rs("id")
i = i + 1
rs.MoveNext
Loop
rs.Close
conn.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -