📄 frmkaochangxinxibianji.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmkaochangxinxibianji
BorderStyle = 1 'Fixed Single
Caption = "考场信息编辑"
ClientHeight = 3615
ClientLeft = 45
ClientTop = 375
ClientWidth = 8925
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3615
ScaleWidth = 8925
Begin VB.CommandButton Command3
Caption = "返回"
Height = 495
Left = 6120
TabIndex = 8
Top = 2880
Width = 2655
End
Begin VB.CommandButton Command2
Caption = "重填"
Height = 495
Left = 3120
TabIndex = 7
Top = 2880
Width = 2655
End
Begin VB.CommandButton Command1
Caption = "确定"
Default = -1 'True
Height = 495
Left = 120
TabIndex = 6
Top = 2880
Width = 2655
End
Begin VB.Frame Frame1
Caption = "编辑考场信息"
Height = 2535
Left = 120
TabIndex = 4
Top = 120
Width = 8655
Begin VB.TextBox Text2
Height = 375
Left = 5760
TabIndex = 1
Top = 600
Width = 2535
End
Begin VB.TextBox Text4
Height = 375
Left = 5760
TabIndex = 3
Top = 1200
Width = 2535
End
Begin VB.TextBox Text3
Height = 375
Left = 1200
TabIndex = 2
Top = 1200
Width = 2535
End
Begin VB.TextBox Text1
Height = 375
Left = 1200
TabIndex = 0
Top = 600
Width = 2535
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 495
Left = 2640
TabIndex = 15
Top = 1800
Width = 1095
_ExtentX = 1931
_ExtentY = 873
_Version = 393216
Format = 69074946
CurrentDate = 39859
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 495
Left = 7200
TabIndex = 5
Top = 1800
Width = 1095
_ExtentX = 1931
_ExtentY = 873
_Version = 393216
Format = 69074946
CurrentDate = 39859
End
Begin MSComCtl2.DTPicker DTPicker3
Height = 495
Left = 1200
TabIndex = 16
Top = 1800
Width = 1335
_ExtentX = 2355
_ExtentY = 873
_Version = 393216
Format = 69074945
CurrentDate = 39859
End
Begin MSComCtl2.DTPicker DTPicker4
Height = 495
Left = 5760
TabIndex = 17
Top = 1800
Width = 1335
_ExtentX = 2355
_ExtentY = 873
_Version = 393216
Format = 69074945
CurrentDate = 39859
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "结束时间:"
Height = 180
Left = 4560
TabIndex = 14
Top = 1920
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "开考时间:"
Height = 180
Left = 240
TabIndex = 13
Top = 1920
Width = 900
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "考场号:"
Height = 180
Left = 4560
TabIndex = 12
Top = 720
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "监考人员职工号:"
Height = 180
Left = 4200
TabIndex = 11
Top = 1320
Width = 1440
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "监考人员:"
Height = 180
Left = 240
TabIndex = 10
Top = 1320
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "考试科目:"
Height = 180
Left = 240
TabIndex = 9
Top = 720
Width = 900
End
End
End
Attribute VB_Name = "frmkaochangxinxibianji"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub clearvalue()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
DTPicker1.Value = ""
DTPicker2.Value = ""
End Sub
Private Sub Command1_Click()
If (Text1.Text <> "") And (Text2.Text <> "") And (Text3.Text <> "") And (Text4.Text <> "") And (DTPicker1.Value <> "") And (DTPicker2.Value <> "") Then
DTPicker3.Hour = DTPicker1.Hour
DTPicker3.Minute = DTPicker1.Minute
DTPicker3.Second = DTPicker1.Second
DTPicker4.Hour = DTPicker2.Hour
DTPicker4.Minute = DTPicker2.Minute
DTPicker4.Second = DTPicker2.Second
Dim conn As New ADODB.Connection
conn.CursorLocation = adUseClient
conn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Roso;Data Source=(local)"
conn.Open
conn.Execute "insert into kaochangxinxi (考场号,监考教师职工号,监考教师姓名,考试科目,开考时间,结束时间) values ('" & Text2.Text & "','" & Text4.Text & "','" & Text3.Text & "','" & Text1.Text & "','" & DTPicker3.Value & "','" & DTPicker4.Value & "')"
MsgBox "改设置已提交"
conn.Close
Set conn = Nothing
Unload Me
Else
MsgBox "请将信息输入完整"
End If
End Sub
Private Sub Command2_Click()
Call clearvalue
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
DTPicker3.Value = Now
DTPicker4.Value = Now
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set frmkaochangxinxibianji = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -