📄 frm_teacher_load.frm
字号:
Left = 5280
MousePointer = 99 'Custom
TabIndex = 22
Top = 3960
Width = 1080
End
End
Begin MSComctlLib.TabStrip TabStrip1
Height = 5385
Left = 2280
TabIndex = 20
Top = 480
Width = 7935
_ExtentX = 13996
_ExtentY = 9499
MultiRow = -1 'True
_Version = 393216
BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628}
NumTabs = 3
BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "基本情况"
ImageVarType = 2
EndProperty
BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "资历变动"
ImageVarType = 2
EndProperty
BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "工作简历"
ImageVarType = 2
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label26
AutoSize = -1 'True
Caption = "性别"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1720
TabIndex = 47
Top = 480
Width = 450
End
Begin VB.Label Label25
AutoSize = -1 'True
Caption = "编号"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 290
TabIndex = 46
Top = 480
Width = 450
End
Begin VB.Label Label24
AutoSize = -1 'True
Caption = "姓名"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1010
TabIndex = 45
Top = 480
Width = 450
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "教职工人事档案表"
BeginProperty Font
Name = "楷体_GB2312"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 3720
TabIndex = 44
Top = 120
Width = 3000
End
End
Attribute VB_Name = "frm_teacher_load"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Database
Dim rst1 As Recordset
Dim Listindex As Integer
Dim Text_SQL As String
Dim comm3_clic, comm6_clic As Boolean
Dim myBookmark As Variant
Private Sub Text_No()
Text_Id.Enabled = False
Text_name.Enabled = False
ComboSex.Enabled = False
birthday.Enabled = False
race.Enabled = False
Shen_id.Enabled = False
Combo_stzk.Enabled = False
adress.Enabled = False
Biye_school.Enabled = False
Combomajor.Enabled = False
Biye_date.Enabled = False
ComboXueli.Enabled = False
ComboZhicheng.Enabled = False
pinyong_date.Enabled = False
ComboZhengzhi.Enabled = False
rudang_date.Enabled = False
ComboGongzi.Enabled = False
jibengongzi.Enabled = False
ComboBiandong.Enabled = False
jiangcheng.Enabled = False
Image1.Enabled = False
End Sub
Private Sub Text_true()
Text_Id.Enabled = True
Text_name.Enabled = True
ComboSex.Enabled = True
birthday.Enabled = True
race.Enabled = True
Shen_id.Enabled = True
Combo_stzk.Enabled = True
adress.Enabled = True
Biye_school.Enabled = True
Combomajor.Enabled = True
Biye_date.Enabled = True
ComboXueli.Enabled = True
ComboZhicheng.Enabled = True
pinyong_date.Enabled = True
ComboZhengzhi.Enabled = True
rudang_date.Enabled = True
ComboGongzi.Enabled = True
jibengongzi.Enabled = True
ComboBiandong.Enabled = True
jiangcheng.Enabled = True
Image1.Enabled = True
End Sub
Private Sub Rst1_Add()
rst1.AddNew
rst1.Fields(0) = Trim(Text_Id.Text)
rst1.Fields(1) = Trim(Text_name.Text)
rst1.Fields(2) = Trim(ComboSex.Text)
rst1.Fields(3) = Trim(birthday.Text)
rst1.Fields(4) = Trim(race.Text)
rst1.Fields(5) = Trim(Shen_id.Text)
rst1.Fields(6) = Trim(Combo_stzk.Text)
rst1.Fields(7) = Trim(adress.Text)
rst1.Fields(8) = Trim(Biye_school.Text)
rst1.Fields(9) = Trim(Combomajor.Text)
rst1.Fields(10) = Trim(Biye_date.Text)
rst1.Fields(11) = Trim(ComboXueli.Text)
rst1.Fields(12) = Trim(ComboZhicheng.Text)
rst1.Fields(13) = Trim(pinyong_date.Text)
rst1.Fields(14) = Trim(ComboZhengzhi.Text)
If rudang_date.Text <> "" Then
rst1.Fields(15) = Trim(rudang_date.Text)
End If
rst1.Fields(16) = Trim(ComboGongzi.Text)
rst1.Fields(17) = Trim(jibengongzi.Text)
If ComboBiandong.Text <> "" Then
rst1.Fields(18) = Trim(ComboBiandong.Text)
End If
If jiangcheng.Text <> "" Then
rst1.Fields(19) = Trim(jiangcheng.Text)
End If
rst1.Update
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
comm3_clic = True
If comm6_clic Then
comm6_clic = False
End If
Text_true
If Text_Id.Text = "" Then
MsgBox "没有选择要编辑的记录!", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
List1.Enabled = False
Command3.Enabled = False
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = False
End Sub
Private Sub Command4_Click()
List1.Enabled = True
Set db = OpenDatabase(App.Path + "\db\teaching_manage.mdb")
Set rst1 = db.OpenRecordset("teacher_basic_info")
If comm6_clic Then
If Text_Id.Text = "" Then
MsgBox "请输入学号!", vbOKOnly + vbExclamation, "警告"
Text_Id.SetFocus
Exit Sub
ElseIf (Len(Trim(Text_Id.Text)) <> 8) Or (Not IsNumeric(Trim(Text_Id.Text))) Then
MsgBox "请输入8位数字字符!", vbOKOnly + vbExclamation, "警告"
Text_Id.SetFocus
Exit Sub
End If
If Text_name.Text = "" Then
MsgBox "请输入姓名!", vbOKOnly + vbExclamation, "警告"
Text_Id.SetFocus
Exit Sub
End If
If ComboSex.Text = "" Then
MsgBox "请选择性别!", vbOKOnly + vbExclamation, "警告"
ComboSex.SetFocus
Exit Sub
End If
If birthday.Text = "" Then
MsgBox "请输入出生年月!", vbOKOnly + vbExclamation, "警告"
birthday.SetFocus
Exit Sub
Else
If Not IsDate(birthday.Text) Then
MsgBox "输入不符合格式(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
birthday.SetFocus
Exit Sub
Else
birthday = Format(birthday, "yyyy-mm-dd")
End If
End If
If race.Text = "" Then
MsgBox "请输入民族!", vbOKOnly + vbExclamation, "警告"
race.SetFocus
Exit Sub
End If
If Shen_id.Text = "" Then
MsgBox "请输入身份证号!", vbOKOnly + vbExclamation, "警告"
Shen_id.SetFocus
Exit Sub
Else
If (Len(Trim(Shen_id.Text)) <> 18) Or (Not IsNumeric(Trim(Shen_id.Text))) Then
MsgBox "请输入身份证号为18位数字字符!", vbOKOnly + vbExclamation, "警告"
Shen_id.SetFocus
Exit Sub
End If
End If
If Combo_stzk.Text = "" Then
MsgBox "请选择健康状况!", vbOKOnly + vbExclamation, "警告"
Combo_stzk.SetFocus
Exit Sub
End If
If adress.Text = "" Then
MsgBox "请输入籍贯!", vbOKOnly + vbExclamation, "警告"
adress.SetFocus
Exit Sub
End If
If Biye_school.Text = "" Then
MsgBox "请输入毕业学校!", vbOKOnly + vbExclamation, "警告"
Biye_school.SetFocus
Exit Sub
End If
If Combomajor.Text = "" Then
MsgBox "请选择健康状况!", vbOKOnly + vbExclamation, "警告"
Combomajor.SetFocus
Exit Sub
End If
If Biye_date.Text = "" Then
MsgBox "请输入毕业时间!", vbOKOnly + vbExclamation, "警告"
Biye_date.SetFocus
Exit Sub
Else
If Not IsDate(Biye_date.Text) Then
MsgBox "输入的毕业时间不符合格式(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
Biye_date.SetFocus
Exit Sub
Else
Biye_date = Format(Biye_date, "yyyy-mm-dd")
End If
End If
If ComboXueli.Text = "" Then
MsgBox "请选择学历!", vbOKOnly + vbExclamation, "警告"
ComboXueli.SetFocus
Exit Sub
End If
If ComboZhengzhi.Text = "" Then
MsgBox "请选择政治面貌!", vbOKOnly + vbExclamation, "警告"
ComboZhengzhi.SetFocus
Exit Sub
End If
If rudang_date.Text <> "" Then
If Not IsDate(rudang_date.Text) Then
MsgBox "输入的入党时间不符合格式(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
rudang_date.SetFocus
Exit Sub
Else
rudang_date = Format(rudang_date, "yyyy-mm-dd")
End If
End If
If ComboGongzi.Text = "" Then
MsgBox "请选择工资级别!", vbOKOnly + vbExclamation, "警告"
ComboGongzi.SetFocus
Exit Sub
End If
If jibengongzi.Text = "" Then
MsgBox "请输入基本工资!", vbOKOnly + vbExclamation, "警告"
jibengongzi.SetFocus
Exit Sub
ElseIf Not IsNumeric(jibengongzi.Text) Then
MsgBox "请输入基本工资为数字!", vbOKOnly + vbExclamation, "警告"
jibengongzi.SetFocus
Exit Sub
End If
Do Until rst1.EOF
If rst1.Fields(0) = Text_Id.Text Then
Exit Do
End If
rst1.MoveNext
Loop
If rst1.EOF = False Then
MsgBox "学号重复,请重新输入!", vbOKOnly + vbExclamation, "警告"
Text_Id.SetFocus
Else
Rst1_Add
MsgBox "添加教师信息成功!", vbOKOnly + vbExclamation, "警告"
rst1.Close
db.Close
List1.AddItem Text_Id.Text + " " + Text_name + " " + ComboSex.Text
List1.Refresh
End If
End If
If comm3_clic Then
If Text_Id.Text = "" Then
MsgBox "请输入学号!", vbOKOnly + vbExclamation, "警告"
Text_Id.SetFocus
Exit Sub
ElseIf (Len(Trim(Text_Id.Text)) <> 8) Or (Not IsNumeric(Trim(Text_Id.Text))) Then
MsgBox "请输入8位数字字符!", vbOKOnly + vbExclamation, "警告"
Text_Id.SetFocus
Exit Sub
End If
If Text_name.Text = "" Then
MsgBox "请输入姓名!", vbOKOnly + vbExclamation, "警告"
Text_Id.SetFocus
Exit Sub
End If
If ComboSex.Text = "" Then
MsgBox "请选择性别!", vbOKOnly + vbExclamation, "警告"
ComboSex.SetFocus
Exit Sub
End If
If birthday.Text = "" Then
MsgBox "请输入出生年月!", vbOKOnly + vbExclamation, "警告"
birthday.SetFocus
Exit Sub
Else
If Not IsDate(birthday.Text) Then
MsgBox "输入不符合格式(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
birthday.SetFocus
Exit Sub
Else
birthday = Format(birthday, "yyyy-mm-dd")
End If
End If
If race.Text = "" Then
MsgBox "请输入民族!", vbOKOnly + vbExclamation, "警告"
race.SetFocus
Exit Sub
End If
If Shen_id.Text = "" Then
MsgBox "请输入身份证号!", vbOKOnly + vbExclamation, "警告"
Shen_id.SetFocus
Exit Sub
Else
If (Len(Trim(Shen_id.Text)) <> 18) Or (Not IsNumeric(Trim(Shen_id.Text))) Then
MsgBox "请输入
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -