?? frmformula.frm
字號:
VERSION 5.00
Begin VB.Form frmformula
Caption = "計算公式"
ClientHeight = 8130
ClientLeft = 60
ClientTop = 450
ClientWidth = 7485
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 8130
ScaleWidth = 7485
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox textle
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1440
TabIndex = 15
Top = 5520
Width = 1215
End
Begin VB.TextBox textabsent
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1440
TabIndex = 14
Top = 4680
Width = 1215
End
Begin VB.TextBox texterrand
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1440
TabIndex = 13
Top = 3840
Width = 1215
End
Begin VB.TextBox textovertimespe
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2640
TabIndex = 12
Top = 3000
Width = 1215
End
Begin VB.TextBox textovertimecom
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2640
TabIndex = 11
Top = 2160
Width = 1215
End
Begin VB.CommandButton cmdcancel
Caption = "取 消"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5040
TabIndex = 2
Top = 7440
Width = 1215
End
Begin VB.CommandButton cmdok
Caption = "確 定"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1080
TabIndex = 1
Top = 7440
Width = 1215
End
Begin VB.CommandButton cmddefault
Caption = "恢復(fù)默認(rèn)值"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2880
TabIndex = 0
Top = 7440
Width = 1695
End
Begin VB.Label Label8
Caption = "+獎金+津貼+保險等—其他扣法"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1200
TabIndex = 10
Top = 6360
Width = 4815
End
Begin VB.Label Label7
Caption = "— (元/天) * 遲到早退次數(shù)"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1200
TabIndex = 9
Top = 5520
Width = 4815
End
Begin VB.Label Label6
Caption = "— (元/天) * 曠工次數(shù)"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1200
TabIndex = 8
Top = 4680
Width = 4815
End
Begin VB.Label Label5
Caption = "+ (元/天) * 出差時間"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1200
TabIndex = 7
Top = 3840
Width = 4815
End
Begin VB.Label Label4
Caption = "+基本工資 * % * 特殊加班時間"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1200
TabIndex = 6
Top = 3000
Width = 5295
End
Begin VB.Label Label3
Caption = "+基本工資 * % * 正常加班時間"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1200
TabIndex = 5
Top = 2160
Width = 5295
End
Begin VB.Label Label2
Caption = "基本工資(/每天) * 月度正常工作時間"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1200
TabIndex = 4
Top = 1320
Width = 5295
End
Begin VB.Label Label1
Caption = "員工實(shí)際工資="
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 3
Top = 600
Width = 2055
End
End
Attribute VB_Name = "frmformula"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdcancel_Click()
Unload Me
Exit Sub
End Sub
Private Sub cmddefault_Click()
Me.textovertimecom = 200
Me.textovertimespe = 400
Me.texterrand = 200
Me.textabsent = 50
Me.textle = 20
Call setvalue
End Sub
Private Sub cmdok_Click()
If Me.textovertimecom = "" And IsNumeric(Me.textovertimecom) = True Then
MsgBox "請輸入正常加班工資百分比", vbOKOnly + vbExclamation, "提示"
Me.textovertimecom = ""
Me.textovertimecom.SetFocus
ElseIf Me.textovertimespe = "" And IsNumeric(Me.textovertimespe) = False Then
MsgBox "請輸入特殊加班工資百分比", vbOKOnly + vbExclamation, "提示"
Me.textovertimespe = ""
Me.textovertimespe.SetFocus
ElseIf Me.texterrand = "" And IsNumeric(Me.texterrand) = False Then
MsgBox "請輸入出差工資", vbOKOnly + vbExclamation, "提示"
Me.texterrand = ""
Me.texterrand.SetFocus
ElseIf Me.textabsent = "" And IsNumeric(Me.textabsent) = False Then
MsgBox "請輸入曠工扣發(fā)工資", vbOKOnly + vbExclamation, "提示"
Me.textabsent = ""
Me.textabsent.SetFocus
ElseIf Me.textle = "" And IsNumeric(Me.textle) = False Then
MsgBox "請輸入遲到早退扣發(fā)工資", vbOKOnly + vbExclamation, "提示"
Me.textle = ""
Me.textle.SetFocus
Else
Call setvalue
Call init
End If
End Sub
Private Sub setvalue()
Dim sql As String
Dim rs As New ADODB.Recordset
sql = "select * from formulasetting"
Set rs = getrs(sql, "salary")
If rs.EOF = False Then
sql = "delete from formulasetting"
Call transactsql(sql, "salary")
End If
rs.AddNew
rs.Fields(0) = Me.textovertimecom
rs.Fields(1) = Me.textovertimespe
rs.Fields(2) = Me.texterrand
rs.Fields(3) = Me.textabsent
rs.Fields(4) = Me.textle
rs.Update
rs.Close
MsgBox "已經(jīng)設(shè)置公式", vbOKOnly + vbExclamation, "設(shè)置結(jié)果"
End Sub
Private Sub init() '初始化
Me.textabsent = ""
Me.texterrand = ""
Me.textovertimecom = ""
Me.textovertimespe = ""
Me.textle = ""
Me.textovertimecom.SetFocus
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -