📄 frmadds.frm
字号:
Height = 210
Index = 7
Left = 120
TabIndex = 4
Top = 1200
Width = 315
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "1班"
ForeColor = &H00C00000&
Height = 210
Index = 6
Left = 120
TabIndex = 3
Top = 720
Width = 315
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "下班时间"
ForeColor = &H00C00000&
Height = 210
Index = 3
Left = 2280
TabIndex = 2
Top = 120
Width = 840
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "上班时间"
ForeColor = &H00C00000&
Height = 210
Index = 1
Left = 1080
TabIndex = 1
Top = 120
Width = 840
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "班号"
ForeColor = &H00C00000&
Height = 210
Index = 0
Left = 240
TabIndex = 0
Top = 120
Width = 420
End
End
Attribute VB_Name = "frmAddS"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rsBC As New ADODB.Recordset
Private Sub Command1_Click(Index As Integer)
Dim sbtime As Date
Dim xbtime As Date
Select Case Index
Case 0
Dim a1 As Date
Dim a2 As Date
a1 = Format(DTPicker1.Value, "hh:mm:ss")
a2 = Format(DTPicker2.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='1'"
conn.Execute Sql
a1 = Format(DTPicker3.Value, "hh:mm:ss")
a2 = Format(DTPicker4.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='2'"
conn.Execute Sql
a1 = Format(DTPicker5.Value, "hh:mm:ss")
a2 = Format(DTPicker6.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='3'"
conn.Execute Sql
a1 = Format(DTPicker7.Value, "hh:mm:ss")
a2 = Format(DTPicker8.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='4'"
conn.Execute Sql
a1 = Format(DTPicker9.Value, "hh:mm:ss")
a2 = Format(DTPicker10.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='5'"
conn.Execute Sql
a1 = Format(DTPicker11.Value, "hh:mm:ss")
a2 = Format(DTPicker12.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='6'"
conn.Execute Sql
a1 = Format(DTPicker13.Value, "hh:mm:ss")
a2 = Format(DTPicker14.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='7'"
conn.Execute Sql
a1 = Format(DTPicker15.Value, "hh:mm:ss")
a2 = Format(DTPicker16.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='8'"
conn.Execute Sql
a1 = Format(DTPicker17.Value, "hh:mm:ss")
a2 = Format(DTPicker18.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='9'"
conn.Execute Sql
a1 = Format(DTPicker19.Value, "hh:mm:ss")
a2 = Format(DTPicker20.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='10'"
conn.Execute Sql
a1 = Format(DTPicker21.Value, "hh:mm:ss")
a2 = Format(DTPicker22.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='11'"
conn.Execute Sql
a1 = Format(DTPicker23.Value, "hh:mm:ss")
a2 = Format(DTPicker24.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='12'"
conn.Execute Sql
a1 = Format(DTPicker25.Value, "hh:mm:ss")
a2 = Format(DTPicker26.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='13'"
conn.Execute Sql
a1 = Format(DTPicker27.Value, "hh:mm:ss")
a2 = Format(DTPicker28.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='14'"
conn.Execute Sql
a1 = Format(DTPicker29.Value, "hh:mm:ss")
a2 = Format(DTPicker30.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='15'"
conn.Execute Sql
a1 = Format(DTPicker31.Value, "hh:mm:ss")
a2 = Format(DTPicker32.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='16'"
conn.Execute Sql
a1 = Format(DTPicker33.Value, "hh:mm:ss")
a2 = Format(DTPicker34.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='17'"
conn.Execute Sql
a1 = Format(DTPicker35.Value, "hh:mm:ss")
a2 = Format(DTPicker36.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='18'"
conn.Execute Sql
a1 = Format(DTPicker37.Value, "hh:mm:ss")
a2 = Format(DTPicker38.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='19'"
conn.Execute Sql
a1 = Format(DTPicker39.Value, "hh:mm:ss")
a2 = Format(DTPicker40.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='20'"
conn.Execute Sql
a1 = Format(DTPicker41.Value, "hh:mm:ss")
a2 = Format(DTPicker42.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='21'"
conn.Execute Sql
a1 = Format(DTPicker43.Value, "hh:mm:ss")
a2 = Format(DTPicker44.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='22'"
conn.Execute Sql
a1 = Format(DTPicker45.Value, "hh:mm:ss")
a2 = Format(DTPicker46.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='23'"
conn.Execute Sql
a1 = Format(DTPicker47.Value, "hh:mm:ss")
a2 = Format(DTPicker48.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='24'"
conn.Execute Sql
a1 = Format(DTPicker49.Value, "hh:mm:ss")
a2 = Format(DTPicker50.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='25'"
conn.Execute Sql
a1 = Format(DTPicker51.Value, "hh:mm:ss")
a2 = Format(DTPicker52.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='26'"
conn.Execute Sql
a1 = Format(DTPicker53.Value, "hh:mm:ss")
a2 = Format(DTPicker54.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='27'"
conn.Execute Sql
a1 = Format(DTPicker55.Value, "hh:mm:ss")
a2 = Format(DTPicker56.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='28'"
conn.Execute Sql
a1 = Format(DTPicker57.Value, "hh:mm:ss")
a2 = Format(DTPicker58.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='29'"
conn.Execute Sql
a1 = Format(DTPicker59.Value, "hh:mm:ss")
a2 = Format(DTPicker60.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='30'"
conn.Execute Sql
a1 = Format(DTPicker61.Value, "hh:mm:ss")
a2 = Format(DTPicker62.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='31'"
conn.Execute Sql
a1 = Format(DTPicker63.Value, "hh:mm:ss")
a2 = Format(DTPicker64.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='32'"
conn.Execute Sql
a1 = Format(DTPicker65.Value, "hh:mm:ss")
a2 = Format(DTPicker66.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='33'"
conn.Execute Sql
a1 = Format(DTPicker67.Value, "hh:mm:ss")
a2 = Format(DTPicker68.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='34'"
conn.Execute Sql
a1 = Format(DTPicker69.Value, "hh:mm:ss")
a2 = Format(DTPicker70.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='35'"
conn.Execute Sql
a1 = Format(DTPicker71.Value, "hh:mm:ss")
a2 = Format(DTPicker72.Value, "hh:mm:ss")
Sql = "update 班次 set 上班时间='" & a1 & "', 下班时间='" & a2 & "' where 段号='36'"
conn.Execute Sql
MsgBox ("保存成功!")
Case 1
Unload Me
End Select
End Sub
Private Sub Form_Load()
Sql = "select * from 班次 where 段号='1'"
rsBC.Open Sql, conn
DTPicker1.Value = rsBC.Fields("上班时间")
DTPicker2.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='2'"
rsBC.Open Sql, conn
DTPicker3.Value = rsBC.Fields("上班时间")
DTPicker4.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='3'"
rsBC.Open Sql, conn
DTPicker5.Value = rsBC.Fields("上班时间")
DTPicker6.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='4'"
rsBC.Open Sql, conn
DTPicker7.Value = rsBC.Fields("上班时间")
DTPicker8.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='5'"
rsBC.Open Sql, conn
DTPicker9.Value = rsBC.Fields("上班时间")
DTPicker10.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='6'"
rsBC.Open Sql, conn
DTPicker11.Value = rsBC.Fields("上班时间")
DTPicker12.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='7'"
rsBC.Open Sql, conn
DTPicker13.Value = rsBC.Fields("上班时间")
DTPicker14.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='8'"
rsBC.Open Sql, conn
DTPicker15.Value = rsBC.Fields("上班时间")
DTPicker16.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='9'"
rsBC.Open Sql, conn
DTPicker17.Value = rsBC.Fields("上班时间")
DTPicker18.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='10'"
rsBC.Open Sql, conn
DTPicker19.Value = rsBC.Fields("上班时间")
DTPicker20.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='11'"
rsBC.Open Sql, conn
DTPicker21.Value = rsBC.Fields("上班时间")
DTPicker22.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='12'"
rsBC.Open Sql, conn
DTPicker23.Value = rsBC.Fields("上班时间")
DTPicker24.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='13'"
rsBC.Open Sql, conn
DTPicker25.Value = rsBC.Fields("上班时间")
DTPicker26.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='14'"
rsBC.Open Sql, conn
DTPicker27.Value = rsBC.Fields("上班时间")
DTPicker28.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='15'"
rsBC.Open Sql, conn
DTPicker29.Value = rsBC.Fields("上班时间")
DTPicker30.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='16'"
rsBC.Open Sql, conn
DTPicker31.Value = rsBC.Fields("上班时间")
DTPicker32.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='17'"
rsBC.Open Sql, conn
DTPicker33.Value = rsBC.Fields("上班时间")
DTPicker34.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='18'"
rsBC.Open Sql, conn
DTPicker35.Value = rsBC.Fields("上班时间")
DTPicker36.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='19'"
rsBC.Open Sql, conn
DTPicker37.Value = rsBC.Fields("上班时间")
DTPicker38.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='20'"
rsBC.Open Sql, conn
DTPicker39.Value = rsBC.Fields("上班时间")
DTPicker40.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='21'"
rsBC.Open Sql, conn
DTPicker41.Value = rsBC.Fields("上班时间")
DTPicker42.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='22'"
rsBC.Open Sql, conn
DTPicker43.Value = rsBC.Fields("上班时间")
DTPicker44.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='23'"
rsBC.Open Sql, conn
DTPicker45.Value = rsBC.Fields("上班时间")
DTPicker46.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='24'"
rsBC.Open Sql, conn
DTPicker47.Value = rsBC.Fields("上班时间")
DTPicker48.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='25'"
rsBC.Open Sql, conn
DTPicker49.Value = rsBC.Fields("上班时间")
DTPicker50.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='26'"
rsBC.Open Sql, conn
DTPicker51.Value = rsBC.Fields("上班时间")
DTPicker52.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='27'"
rsBC.Open Sql, conn
DTPicker53.Value = rsBC.Fields("上班时间")
DTPicker54.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='28'"
rsBC.Open Sql, conn
DTPicker55.Value = rsBC.Fields("上班时间")
DTPicker56.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='29'"
rsBC.Open Sql, conn
DTPicker57.Value = rsBC.Fields("上班时间")
DTPicker58.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='30'"
rsBC.Open Sql, conn
DTPicker59.Value = rsBC.Fields("上班时间")
DTPicker60.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='31'"
rsBC.Open Sql, conn
DTPicker61.Value = rsBC.Fields("上班时间")
DTPicker62.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='32'"
rsBC.Open Sql, conn
DTPicker63.Value = rsBC.Fields("上班时间")
DTPicker64.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='33'"
rsBC.Open Sql, conn
DTPicker65.Value = rsBC.Fields("上班时间")
DTPicker66.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='34'"
rsBC.Open Sql, conn
DTPicker67.Value = rsBC.Fields("上班时间")
DTPicker68.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='35'"
rsBC.Open Sql, conn
DTPicker69.Value = rsBC.Fields("上班时间")
DTPicker70.Value = rsBC.Fields("下班时间")
rsBC.Close
Sql = "select * from 班次 where 段号='36'"
rsBC.Open Sql, conn
DTPicker71.Value = rsBC.Fields("上班时间")
DTPicker72.Value = rsBC.Fields("下班时间")
rsBC.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -