📄 frmlessonman.frm
字号:
EndProperty
ForeColor = &H00800080&
Height = 180
Left = 1440
TabIndex = 10
Top = 1650
Width = 90
End
Begin VB.Label Label13
AutoSize = -1 'True
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "授课教师"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Left = 240
TabIndex = 9
Top = 1275
Width = 780
End
Begin VB.Label Label6
AutoSize = -1 'True
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "课程名称"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Left = 240
TabIndex = 8
Top = 240
Width = 780
End
Begin VB.Label Label5
AutoSize = -1 'True
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "课时数量"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Left = 240
TabIndex = 7
Top = 1650
Width = 780
End
Begin VB.Label lbl_Term
AutoSize = -1 'True
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
DataField = "Term"
DataSource = "AdoLesson"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800080&
Height = 180
Left = 1440
TabIndex = 6
Top = 945
Width = 90
End
Begin VB.Label Label28
AutoSize = -1 'True
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "学期设置"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Left = 240
TabIndex = 5
Top = 945
Width = 780
End
End
Begin VB.CommandButton Cmd_Add
BackColor = &H80000004&
Caption = "添加课程"
Default = -1 'True
Height = 400
Left = 137
MouseIcon = "FrmLessonMan.frx":0FF0
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 3
Top = 2400
Width = 1300
End
Begin VB.CommandButton Cmd_Modi
BackColor = &H80000004&
Caption = "修改课程"
Height = 400
Left = 1577
MouseIcon = "FrmLessonMan.frx":12FA
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 2
Top = 2400
Width = 1300
End
Begin VB.CommandButton Cmd_Del
BackColor = &H80000004&
Caption = "删除课程"
Height = 400
Left = 3017
MouseIcon = "FrmLessonMan.frx":1604
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 1
Top = 2400
Width = 1300
End
Begin VB.CommandButton Cmd_Back
BackColor = &H80000004&
Cancel = -1 'True
Caption = "返 回"
Height = 400
Left = 5897
MouseIcon = "FrmLessonMan.frx":190E
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 0
Top = 2400
Width = 1300
End
End
Attribute VB_Name = "FrmLessonMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OriEmpId As Integer
Private Sub Cmd_Add_Click()
'初始化FrmLessonEdit信息
FrmLessonEdit.txtName = ""
FrmLessonEdit.ComboType.ListIndex = 0
FrmLessonEdit.txtHours = 0
FrmLessonEdit.txtTeacher = ""
FrmLessonEdit.txtTerm = ""
FrmLessonEdit.Modify = False
FrmLessonEdit.Show 1
AdoLessonList.Refresh
DataList1_Click
End Sub
Private Sub Cmd_Back_Click()
Unload Me
End Sub
Private Sub Cmd_Del_Click()
If DataList1.Text = "" Then
MsgBox "请选择课程"
Exit Sub
End If
TmpId = Val(DataList1.BoundText)
If MsgBox("是否删除当前课程?", vbYesNo, "确认") = vbYes Then
Call MyLesson.Delete(TmpId)
AdoLessonList.Refresh
DataList1_Click
End If
End Sub
Private Sub Cmd_Modi_Click()
If DataList1.Text = "" Then
MsgBox "请选择课程"
Exit Sub
End If
'初始化FrmLessonEdit信息
FrmLessonEdit.OriId = Val(DataList1.BoundText)
FrmLessonEdit.txtName = lbl_LessonName
FrmLessonEdit.ComboType.Text = lbl_LessonType
FrmLessonEdit.txtTeacher = lbl_Teacher
FrmLessonEdit.txtTerm = lbl_Term
FrmLessonEdit.txtHours = lbl_Hours
FrmLessonEdit.Modify = True
FrmLessonEdit.Show 1
AdoLessonList.Refresh
DataList1_Click
End Sub
Private Sub Cmd_Scores_Click()
If DataList1.Text = "" Then
MsgBox "请选择课程"
Exit Sub
End If
FrmScoresMan.TmpLid = Val(DataList1.BoundText)
FrmScoresMan.lbl_LessonName = DataList1.Text
FrmScoresMan.Show 1
End Sub
Private Sub DataList1_Click()
AdoLesson.RecordSource = "SELECT * FROM Lessons WHERE LessonId=" _
+ Trim(Val(DataList1.BoundText))
AdoLesson.Refresh
End Sub
Private Sub Form_Load()
AdoLessonList.RecordSource = "SELECT * FROM Lessons ORDER BY LessonName"
AdoLessonList.Refresh
DataList1_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -