⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmsetlesson.frm

📁 用VB实现的一个学生管理系统
💻 FRM
📖 第 1 页 / 共 4 页
字号:
      End
      Begin VB.Label Label10 
         Caption         =   "上课地点:"
         Height          =   255
         Index           =   2
         Left            =   2640
         TabIndex        =   28
         Top             =   1920
         Width           =   1095
      End
      Begin VB.Label Label9 
         Caption         =   "任课教师:"
         Height          =   255
         Index           =   2
         Left            =   2640
         TabIndex        =   26
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label Label8 
         Caption         =   "课程:"
         Height          =   255
         Index           =   2
         Left            =   2640
         TabIndex        =   24
         Top             =   720
         Width           =   615
      End
      Begin VB.Label Label11 
         Caption         =   "考试方式:"
         Height          =   255
         Index           =   1
         Left            =   840
         TabIndex        =   22
         Top             =   5520
         Width           =   975
      End
      Begin VB.Label Label10 
         Caption         =   "上课地点:"
         Height          =   255
         Index           =   1
         Left            =   840
         TabIndex        =   20
         Top             =   4920
         Width           =   1095
      End
      Begin VB.Label Label9 
         Caption         =   "任课教师:"
         Height          =   255
         Index           =   1
         Left            =   840
         TabIndex        =   18
         Top             =   4320
         Width           =   975
      End
      Begin VB.Label Label8 
         Caption         =   "课程:"
         Height          =   255
         Index           =   1
         Left            =   840
         TabIndex        =   16
         Top             =   3720
         Width           =   615
      End
      Begin VB.Line Line2 
         X1              =   2400
         X2              =   2400
         Y1              =   240
         Y2              =   6600
      End
      Begin VB.Label Label11 
         Caption         =   "考试方式:"
         Height          =   255
         Index           =   0
         Left            =   840
         TabIndex        =   14
         Top             =   2520
         Width           =   975
      End
      Begin VB.Label Label10 
         Caption         =   "上课地点:"
         Height          =   255
         Index           =   0
         Left            =   840
         TabIndex        =   12
         Top             =   1920
         Width           =   1095
      End
      Begin VB.Label Label9 
         Caption         =   "任课教师:"
         Height          =   255
         Index           =   0
         Left            =   840
         TabIndex        =   10
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label Label8 
         Caption         =   "课程:"
         Height          =   255
         Index           =   0
         Left            =   840
         TabIndex        =   8
         Top             =   720
         Width           =   615
      End
      Begin VB.Line Line1 
         X1              =   120
         X2              =   9840
         Y1              =   3600
         Y2              =   3600
      End
      Begin VB.Label Label7 
         Caption         =   "下午"
         Height          =   615
         Left            =   240
         TabIndex        =   7
         Top             =   4920
         Width           =   255
      End
      Begin VB.Label Label6 
         Caption         =   "上午"
         Height          =   495
         Left            =   240
         TabIndex        =   6
         Top             =   1680
         Width           =   255
      End
      Begin VB.Label Label5 
         Caption         =   "星期五"
         Height          =   255
         Left            =   8640
         TabIndex        =   5
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "星期四"
         Height          =   255
         Left            =   6600
         TabIndex        =   4
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "星期三"
         Height          =   255
         Left            =   4800
         TabIndex        =   3
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "星期二"
         Height          =   255
         Left            =   2880
         TabIndex        =   2
         Top             =   360
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "星期一"
         Height          =   255
         Left            =   1080
         TabIndex        =   1
         Top             =   360
         Width           =   615
      End
   End
End
Attribute VB_Name = "frmsetlesson"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub comexit_Click()
Unload Me
frmassist.Label1.Caption = "欢迎使用本系统!如有什么意见请及时向我们提出!谢谢!"

End Sub

Private Sub Command3_Click(Index As Integer)
Select Case Index
Case 0
coblesson1(0).Enabled = False
cobtest1(0).Enabled = False
cobteacher1(0).Enabled = False
cobaddress1(0).Enabled = False
coblesson1(0).Clear
cobtest1(0).Clear
cobteacher1(0).Clear
cobaddress1(0).Clear
Command3(0).Enabled = False

 Case 1
 coblesson1(1).Enabled = False
 cobtest1(1).Enabled = False
 cobteacher1(1).Enabled = False
 cobaddress1(1).Enabled = False
 coblesson1(1).Clear
 cobtest1(1).Clear
 cobteacher1(1).Clear
 cobaddress1(1).Clear
 Command3(1).Enabled = False

 Case 2
 coblesson1(2).Enabled = False
 cobtest1(2).Enabled = False
 cobteacher1(2).Enabled = False
 cobaddress1(2).Enabled = False
 coblesson1(2).Clear
 cobtest1(2).Clear
 cobteacher1(2).Clear
 cobaddress1(2).Clear
 Command3(2).Enabled = False

 Case 3
 coblesson1(3).Enabled = False
 cobtest1(3).Enabled = False
 cobteacher1(3).Enabled = False
 cobaddress1(3).Enabled = False
 coblesson1(3).Clear
 cobtest1(3).Clear
 cobteacher1(3).Clear
 cobaddress1(3).Clear
 Command3(3).Enabled = False

 Case 4
 coblesson1(4).Enabled = False
 cobtest1(4).Enabled = False
 cobteacher1(4).Enabled = False
 cobaddress1(4).Enabled = False
 coblesson1(4).Clear
 cobtest1(4).Clear
 cobteacher1(4).Clear
 cobaddress1(4).Clear
 Command3(4).Enabled = False

 Case 5
 coblesson1(5).Enabled = False
 cobtest1(5).Enabled = False
 cobteacher1(5).Enabled = False
 cobaddress1(5).Enabled = False
 coblesson1(5).Clear
 cobtest1(5).Clear
 cobteacher1(5).Clear
 cobaddress1(5).Clear
 Command3(5).Enabled = False

 Case 6
 coblesson1(6).Enabled = False
 cobtest1(6).Enabled = False
 cobteacher1(6).Enabled = False
 cobaddress1(6).Enabled = False
 coblesson1(6).Clear
 cobtest1(6).Clear
 cobteacher1(6).Clear
 cobaddress1(6).Clear
 Command3(6).Enabled = False

 Case 7
 coblesson1(7).Enabled = False
 cobtest1(7).Enabled = False
 cobteacher1(7).Enabled = False
 cobaddress1(7).Enabled = False
 coblesson1(7).Clear
 cobtest1(7).Clear
 cobteacher1(7).Clear
 cobaddress1(7).Clear
 Command3(7).Enabled = False

 Case 8
 coblesson1(8).Enabled = False
 cobtest1(8).Enabled = False
 cobteacher1(8).Enabled = False
 cobaddress1(8).Enabled = False
 coblesson1(8).Clear
 cobtest1(8).Clear
 cobteacher1(8).Clear
 cobaddress1(8).Clear
 Command3(8).Enabled = False

 Case 9
 coblesson1(9).Enabled = False
 cobtest1(9).Enabled = False
 cobteacher1(9).Enabled = False
 cobaddress1(9).Enabled = False
 coblesson1(9).Clear
 cobtest1(9).Clear
 cobteacher1(9).Clear
 cobaddress1(9).Clear
 Command3(9).Enabled = False

End Select
End Sub

Private Sub comnext_Click()
Unload Me
frmset.Show
End Sub

Private Sub comok_Click()
On Error GoTo errMsg
Dim SQL As String

'老师星期一上午
If Command3(0).Enabled = True Then
SQL = "Select * From 时间表 Where 教师='" & Trim(cobteacher1(0).Text) & "' and 星期='" & Label1.Caption & "' and 上下午='" & Label6.Caption & "'"
Set adoRS = adoCon.Execute(SQL)
If Not adoRS.EOF Then
   MsgBox "教师" & Trim(cobteacher1(0).Text) & "星期一上午已经有课,请安排其他老师!", vbOKOnly + vbExclamation, "系统提示"
     Exit Sub
End If
End If

'老师星期一下午
If Command3(1).Enabled = True Then
SQL = ""
SQL = "Select * From 时间表 Where 教师='" & Trim(cobteacher1(1).Text) & "' and 星期='" & Label1.Caption & "' and 上下午='" & Label7.Caption & "'"
Set adoRS = adoCon.Execute(SQL)
If Not adoRS.EOF Then
   MsgBox "教师" & Trim(cobteacher1(1).Text) & "星期一下午已经有课,请安排其他老师!", vbOKOnly + vbExclamation, "系统提示"
  
   Exit Sub
End If
End If
'老师星期二上午
If Command3(2).Enabled = True Then
SQL = ""
SQL = "Select * From 时间表 Where 教师='" & Trim(cobteacher1(2).Text) & "' and 星期='" & Label2.Caption & "' and 上下午='" & Label6.Caption & "'"
Set adoRS = adoCon.Execute(SQL)
If Not adoRS.EOF Then
   MsgBox "教师" & Trim(cobteacher1(2).Text) & "星期二上午已经有课,请安排其他老师!", vbOKOnly + vbExclamation, "系统提示"
  
   Exit Sub
End If
End If
'老师星期二下午
If Command3(3).Enabled = True Then
SQL = ""
SQL = "Select * From 时间表 Where 教师='" & Trim(cobteacher1(3).Text) & "' and 星期='" & Label2.Caption & "' and 上下午='" & Label7.Caption & "'"
Set adoRS = adoCon.Execute(SQL)
If Not adoRS.EOF Then
   MsgBox "教师" & Trim(cobteacher1(3).Text) & "星期二下午已经有课,请安排其他老师!", vbOKOnly + vbExclamation, "系统提示"
  
   Exit Sub
End If
End If

'老师星期三上午
If Command3(4).Enabled = True Then
SQL = ""
SQL = "Select * From 时间表 Where 教师='" & Trim(cobteacher1(4).Text) & "' and 星期='" & Label3.Caption & "' and 上下午='" & Label6.Caption & "'"
Set adoRS = adoCon.Execute(SQL)
If Not adoRS.EOF Then
   MsgBox "教师" & Trim(cobteacher1(4).Text) & "星期三上午已经有课,请安排其他老师!", vbOKOnly + vbExclamation, "系统提示"
  
   Exit Sub
End If
End If

'老师星期三下午
If Command3(5).Enabled = True Then
SQL = ""
SQL = "Select * From 时间表 Where 教师='" & Trim(cobteacher1(5).Text) & "' and 星期='" & Label3.Caption & "' and 上下午='" & Label7.Caption & "'"
Set adoRS = adoCon.Execute(SQL)
If Not adoRS.EOF Then
   MsgBox "教师" & Trim(cobteacher1(5).Text) & "星期三下午已经有课,请安排其他老师!", vbOKOnly + vbExclamation, "系统提示"
  
   Exit Sub
End If
End If

'老师星期四上午
If Command3(6).Enabled = True Then
SQL = ""
SQL = "Select * From 时间表 Where 教师='" & Trim(cobteacher1(6).Text) & "' and 星期='" & Label4.Caption & "' and 上下午='" & Label6.Caption & "'"
Set adoRS = adoCon.Execute(SQL)
If Not adoRS.EOF Then
   MsgBox "教师" & Trim(cobteacher1(6).Text) & "星期四上午已经有课,请安排其他老师!", vbOKOnly + vbExclamation, "系统提示"
  
   Exit Sub
End If
End If

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -