智能排课系统vb代码(11)

发布时间:2021-06-05

和智能智能排课系统1、2、3是一套

Set rp = Conn.Execute(coom)

cool = "select * from 排课表 where [上课时间]='" + rt("上课时间") + "'and [教师姓名]='" + Rs("教师姓名") + "'"

Set rq = Conn.Execute(cool)

If rp.EOF = True And rq.EOF = True Then

sqlll = "select * from 教室信息表"

Set rm = Conn.Execute(sqlll)

Do Until rm.EOF = True

coon = "select * from 排课表 where [上课时间]='" + rt("上课时间") + "'and [上课教室]='" + rm("教室名称") + "'"

Set rn = Conn.Execute(coon)

If rn.EOF = True Then

SQL = "insert into 排课表 ([课程名称],[教师姓名],[上课教室],[班级编号],[上课时间]) values ('" + Rs("课程名称") + "','" + Rs("教师姓名") + "','" + rm("教室名称") + "','" + Rs("班级编号") + "','" + rt("上课时间") + "')"

Set rq = Conn.Execute(SQL)

Exit Do

Else

rm.MoveNext

End If

Loop

Exit Do

Else

rt.MoveNext

End If

Loop

i = i - 1

Loop

Rs.MoveNext

Loop

ProgressBar1.Value = ProgressBar1.Value + 1

DoEvents

Loop

MsgBox "自动排课已完成", vbInformation, "提示"

End Sub

Private Sub Timer1_Timer()

If dlaytime >= 100 Then

'Timer1.Enabled = False

Load frmLogin

frmLogin.Show

Else

dlaytime = dlaytime + 1

精彩图片

热门精选

大家正在看