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

📄

📁 我做的第一个学生管理系统
💻
📖 第 1 页 / 共 2 页
字号:
</body>

<script language="VBScript">
'=========班级课程查询==============================
sub beginSearch()
		if len(trim(classno.value))=0 then
				msgbox "对不起!请先选择要查询的班号!"
				exit sub
		end if 
		
		if len(trim(yearno.value))=0  then
				msgbox "对不起!请先输入要查询的学年!"
				exit sub
		end if 
		rds1.SQL ="select * from class_course where 班号='"+classno.value+"' and 学年='"+yearno.value+"' and 学期 ='"+termno.value+"'"
		rds1.ExecuteOptions = 1
		rds1.refresh
		
end sub


 
'==================取某学年某学期某班所开的课程====================================
sub get_course()
		if len(trim(classno.value))=0 then
				msgbox "对不起!请先选择要查询的班号!"
				exit sub
		end if 
		
		if len(trim(yearno.value))=0 then
				msgbox "对不起!请先输入要查询的学年!"
				exit sub
		end if 
	
		
	for i = 0 to courseCount - 1
		
			'找出本学期开设了哪些课程,通过计算总分是否为零进行判断
			'rds2.SQL = "select sum("+courseNoArray(0,i)+") from score "
			rds2.SQL = "select "+courseNoArray(0,i)+" from score "
			rds2.SQL = rds2.SQL +" where 学号 in (select 学号 from student where rtrim(班号)='"+rtrim(classno.value)+"') and "
			rds2.SQL = rds2.SQL + " 学年='"+yearno.value+"' and 学期='"+termno.value+"' and 成绩类型='总评成绩'"
			rds2.ExecuteOptions=1
			rds2.Refresh
			'sum_array = rds2.Recordset.GetRows(1,0,0)
			
			snum = rds2.recordset.recordcount
			rds2.Recordset.Movefirst
			
			findnum = false
			for inum =0 to snum-1
				if rds2.Recordset.fields(0) > 0 then
					findnum = true
					exit for
				end if 
				rds2.Recordset.movenext
			next
				
			
			
			
			if findnum=true  then '表明此课程已有成绩
							rds2.SQL = "select * from class_course where 班号='"+classno.value+"' and 学年='"+yearno.value+"' and 学期 ='"+termno.value+"'and 课程号='"+courseNoArray(0,i)+"'" 
							rds2.ExecuteOptions =1
							rds2.Refresh
							if rds2.recordset.recordcount > 0 then
								'msgbox "已经有课程,不能增加!"
							else					
							
								rds2.SQL = "Insert class_course values('"+classno.value+"','"+yearno.value+"','"+termno.value+"','"+courseNoArray(0,i)+"','"+courseArray(0,i)+"')"
								rds2.ExecuteOptions =1 
								rds2.Refresh 
							end if 
			end if
	next
		
	
end sub
			

sub returning()
    history.go(-1)

end sub
'==============================================================
sub grid1_BeforeColEdit(colindex,keyascii,cancel)
		msgbox "不修改资料!"			
		cancel = true	
end sub

sub printing()

	RDS1.recordset.movefirst 	

    call free_printer(rds1.Recordset.recordcount,"班级课程设置信息一览表")
 
end sub 



</script>
<SCRIPT language=javascript>
function click() {
if (event.button==2) {
alert('对不起,禁止使用此功能^_^.')
}
}
document.onmousedown=click
</SCRIPT>
</body>
</html>

⌨️ 快捷键说明

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