?? frmchginoutinfo.frm
字號:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Begin VB.Form frmChgInOutInfo
BorderStyle = 3 'Fixed Dialog
Caption = "修改員工上下班信息"
ClientHeight = 4845
ClientLeft = 45
ClientTop = 330
ClientWidth = 6645
Icon = "frmChgInOutInfo.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4845
ScaleWidth = 6645
ShowInTaskbar = 0 'False
Begin VB.TextBox tID
Height = 375
Left = 360
TabIndex = 17
Top = 120
Width = 615
End
Begin VB.Frame Frame3
Caption = "日期信息"
Height = 735
Left = 600
TabIndex = 14
Top = 840
Width = 5655
Begin MSComCtl2.DTPicker DTPicker2
Height = 270
Left = 2880
TabIndex = 15
Top = 240
Width = 1335
_ExtentX = 2355
_ExtentY = 476
_Version = 393216
Format = 85131265
CurrentDate = 39540
End
Begin VB.Label Label4
Caption = "請選擇日期:"
Height = 255
Left = 1440
TabIndex = 16
Top = 240
Width = 1095
End
End
Begin VB.Frame Frame1
Caption = "員工個人信息"
Height = 615
Left = 600
TabIndex = 6
Top = 1800
Width = 5655
Begin VB.TextBox txtID
Height = 270
Left = 1440
TabIndex = 8
Top = 240
Width = 1335
End
Begin VB.TextBox txtName
Height = 270
Left = 3960
TabIndex = 7
Top = 240
Width = 1455
End
Begin VB.Label Label2
Caption = "員工編號:"
Height = 270
Left = 360
TabIndex = 10
Top = 240
Width = 975
End
Begin VB.Label Label3
Caption = "員工姓名:"
Height = 270
Left = 3000
TabIndex = 9
Top = 240
Width = 1215
End
End
Begin VB.Frame Frame2
Caption = "員工出勤信息"
Height = 1455
Left = 600
TabIndex = 0
Top = 2640
Width = 5655
Begin VB.Frame frame
Caption = "出入信息"
Height = 855
Left = 120
TabIndex = 1
Top = 480
Width = 5295
Begin VB.OptionButton InFlag
Caption = "上班時間"
Height = 255
Left = 120
TabIndex = 3
Top = 300
Width = 1095
End
Begin VB.OptionButton OutFlag
Caption = "下班時間"
Height = 255
Left = 2760
TabIndex = 2
Top = 360
Width = 1215
End
Begin MSComCtl2.DTPicker dtpBT
Height = 375
Left = 1320
TabIndex = 4
Top = 240
Width = 1215
_ExtentX = 2143
_ExtentY = 661
_Version = 393216
Format = 85131266
CurrentDate = 38074
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 3960
TabIndex = 5
Top = 240
Width = 1215
_ExtentX = 2143
_ExtentY = 661
_Version = 393216
Format = 85131266
CurrentDate = 38074
End
End
End
Begin VB.Label topic
Alignment = 2 'Center
Caption = "修改員工上下班信息"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 13
Top = 240
Width = 3255
End
Begin MSForms.CommandButton cmdOK
Height = 375
Left = 1320
TabIndex = 12
Top = 4200
Width = 1095
Caption = "確定"
PicturePosition = 327683
Size = "1931;661"
Picture = "frmChgInOutInfo.frx":0442
FontName = "宋體"
FontHeight = 180
FontCharSet = 134
FontPitchAndFamily= 34
ParagraphAlign = 3
End
Begin MSForms.CommandButton cmdExit
Height = 375
Left = 3960
TabIndex = 11
Top = 4200
Width = 1095
Caption = "返回"
PicturePosition = 327683
Size = "1931;661"
FontName = "宋體"
FontHeight = 180
FontCharSet = 134
FontPitchAndFamily= 34
ParagraphAlign = 3
End
End
Attribute VB_Name = "frmChgInOutInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdOk_Click()
Dim sql As String
Dim rs As New ADODB.Recordset
Dim strMsg As String
Dim tmsb1 As Date
Dim tmxb1 As Date
If InFlag = False And OutFlag = False Then
MsgBox "請選擇上下班", vbOKOnly + vbExclamation, "警告!"
End If
If InFlag = True Then
If MsgBox("確定要做此修改嗎?", vbQuestion + vbYesNo) = vbNo Then Exit Sub
tmsb1 = dtpBT.Value
h = Hour(tmsb1)
m = Minute(tmsb1)
s = Second(tmsb1)
tmsb1 = CDate(h & ":" & m & ":" & s)
sql = "update attendanceInfo set 上班時間='" & tmsb1 & "' where ID=" & CInt(tID.Text)
Set rs = ExecuteSQL(sql, strMsg)
Call frmInOutInfoList.Form_Load
Unload Me
ElseIf OutFlag = True Then
If MsgBox("確定要做此修改嗎?", vbQuestion + vbYesNo) = vbNo Then Exit Sub
tmxb1 = DTPicker1.Value
h = Hour(tmxb1)
m = Minute(tmxb1)
s = Second(tmxb1)
tmsb1 = CDate(h & ":" & m & ":" & s)
sql = "update attendanceInfo set 下班時間='" & tmxb1 & "' where ID=" & CInt(tID.Text)
Set rs = ExecuteSQL(sql, strMsg)
Call frmInOutInfoList.Form_Load
Unload Me
End If
End Sub
Private Sub Form_Load()
tID.Visible = False
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -