📄 qjshq.frm
字号:
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1920
TabIndex = 16
Top = 383
Width = 255
End
Begin VB.Label Label13
Caption = "月"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 2760
TabIndex = 15
Top = 383
Width = 255
End
Begin VB.Label Label14
Caption = "日"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3555
TabIndex = 14
Top = 383
Width = 255
End
Begin VB.Label Label15
Caption = "班"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5760
TabIndex = 13
Top = 383
Width = 255
End
Begin VB.Label Label8
Caption = "结束日期:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 9
Top = 863
Width = 1155
End
End
Begin VB.TextBox Text4
Alignment = 2 'Center
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 4560
TabIndex = 7
Top = 662
Width = 1695
End
Begin VB.TextBox Text3
Alignment = 2 'Center
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 1560
TabIndex = 5
Top = 662
Width = 1575
End
Begin VB.TextBox Text2
Alignment = 2 'Center
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 4560
TabIndex = 3
Top = 120
Width = 1695
End
Begin VB.TextBox Text1
Alignment = 2 'Center
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 1560
TabIndex = 2
Top = 120
Width = 1575
End
Begin VB.Label Label4
Caption = "职 务:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 3360
TabIndex = 6
Top = 720
Width = 1305
End
Begin VB.Label Label3
Caption = "部 门:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 360
TabIndex = 4
Top = 720
Width = 1305
End
Begin VB.Label Label2
Caption = "姓 名:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 3360
TabIndex = 1
Top = 180
Width = 1305
End
Begin VB.Label Label1
Caption = "工 号:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 360
TabIndex = 0
Top = 180
Width = 1305
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Form3.Show
Unload Me
End Sub
Private Sub Command2_Click()
Dim ksrq As Date '开始日期
Dim shf As Boolean '是否批准标致
Dim jsrq As Date '结束日期
Text5.Text = Trim(Text5.Text)
Text6.Text = Trim(Text6.Text)
Text7.Text = Trim(Text7.Text)
If Combo1.Text = "" Then MsgBox "请选择或填写日期!", 48, 消息框: Exit Sub
If Combo2.Text = "" Then MsgBox "请选择或填写日期!", 48, 消息框: Exit Sub
If Combo4.Text = "" Then MsgBox "请选择或填写日期!", 48, 消息框: Exit Sub
If Combo5.Text = "" Then MsgBox "请选择或填写日期!", 48, 消息框: Exit Sub
If Text5.Text = "" Then MsgBox "请选择或填写日期!", 48, 消息框: Exit Sub
If Text6.Text = "" Then MsgBox "请选择或填写日期!", 48, 消息框: Exit Sub
If (31 - Val(Text5.Text)) < 0 Then MsgBox "你填写的日期有误!", 48, 消息框: Exit Sub
If (31 - Val(Text6.Text)) < 0 Then MsgBox "你填写的日期有误!", 48, 消息框: Exit Sub
If Combo3.Text = "" Then MsgBox "选择请假班次!", 48, 消息框: Exit Sub
If Combo7.Text = "" Then MsgBox "选择请假类型!", 48, 消息框: Exit Sub
If Text7.Text = "" Then MsgBox "填写请假事由!", 48, 消息框: Exit Sub
ksrq = Combo1.Text + Combo2.Text + Text5.Text
jsrq = Combo4.Text + Combo5.Text + Text6.Text
If jsrq < ksrq Then MsgBox "请注意你的结束日期大于开始日期!", 48, 消息框: Exit Sub
shf = False
my = "insert into qingjiabiao values (" & Val(Text1.Text) & ",'" & Combo7.Text & "','" & Text7.Text & "'," & ksrq & "," & jsrq & ",'" & Combo3.Text & "'," & shf & ",'11111')"
con.BeginTrans
con.Execute my
r = MsgBox("你成功提交请假单,请等待批准!", vbYesNo + vbQuestion)
If r = vbYes Then
con.CommitTrans
Adodc1.Refresh
Form3.Show
Unload Me
Else
con.RollbackTrans
End If
End Sub
Private Sub Form_Load()
Text1.Text = gh
Text2.Text = xm
rst.Open "select * from zhigongbiao where 工号= " & Val(Text1.Text) & "", con
bmbh = rst!部门编号
zhwbh = rst!职务编号
rst.Close
rst.Open "select * from bumeibiao where 编号= " & bmbh & " ", con
Text3.Text = rst!部门名称
rst.Close
rst.Open "select * from zhiwubiao where 编号= " & zhwbh & "", con
Text4.Text = rst!职务名称
rst.Close
Adodc1.ConnectionString = s
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from qingjiabiao"
Adodc1.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -