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

📄

📁 我做的第一个学生管理系统
💻
📖 第 1 页 / 共 2 页
字号:
	next 
	
	vp.AddTable formatstr,headstr,bodyline(0),,,false
	for kcloop = 1 to HavedCourseCount - 1	
		vp.AddTable formatstr,headstr,bodyline(kcloop),,,true	
	next
	
	vp.newpage 
	

end sub


'==============根据序列号从开设课程数组中取课程名称=================
function  GetCourseName(cno)
	GetCourseName = "No Find"
	for loopcount = 0 to courseCount-1
		if courseNoArray(0,loopcount) = HavedCourseArray(0,cno) then
			GetCourseName = courseArray(0,loopcount)
			exit for
		end if
	next
	if loopcount=courseCount then
		'msgbox HavedCourseArray(0,cno)+"没有找到课程名"
		GetCourseName = HavedCourseArray(0,cno)
	end if

end function

'=================================================
sub getXH(classno)  '取一个班所有学生的学号和姓名
'=================================================
	rds3.sql = " select 学号,姓名 from student where 班号='"+classno+"'"
	rds3.ExecuteOptions = 1
	rds3.Refresh
	
	xhCount = rds3.Recordset.recordcount
	rds3.Recordset.Movefirst
	
	if xhCount > 0 then
		for i = 0 to xhcount -1 
			xhArray(0,i) = rds3.Recordset.fields(0)
			xmArray(0,i) = rds3.Recordset.fields(1)
				rds3.Recordset.MoveNext
		next
	'	xhArray = rds3.recordset.Getrows(rds3.recordset.recordcount,0,0) 
	'	rds3.Recordset.Movefirst
	'	xmArray = rds3.recordset.Getrows(rds3.recordset.recordcount,0,1) 
	end if
end sub


'=================================================
sub getYearterm(classno) '取一个班在校的学期和学年
'=================================================
	rds3.sql = "select 学年,学期 from score where 学号 in (select 学号 from student where 班号='"+classno+"')"&_
		   " Group by 学年,学期"
	rds3.ExecuteOptions = 1
	rds3.Refresh
	termCount = rds3.Recordset.recordcount
	if termCount <=0 then
		exit sub
	end if
	rds3.Recordset.movefirst
	
	for i = 0 to termCount-1 
		yearnoArray(0,i)= rds3.Recordset.fields(0)
		termnoArray(0,i)= rds3.Recordset.fields(1)
		rds3.Recordset.MoveNext
	next 
	
	'yearnoArray = rds3.Recordset.Getrows(termCount,0,0)
	'rds3.Recordset.Movefirst
	'termnoArray = rds3.Recordset.Getrows(termCount,0,1)
end sub
'========================================================
sub GetHavedCourseno(classno) '取一个班所开设的所有课程
'========================================================
    havedCourseCount = 0	
	rds3.SQL = " select 课程号 from class_course where 班号='"+classno+"' group by 课程号"
	rds3.ExecuteOptions=1
	rds3.Refresh
						
	havedCourseCount = rds3.recordset.recordcount

	if havedCourseCount > 0 then '表明开设了多门课程
		'havedCourseArray = rds3.recordset.Getrows(rds3.recordset.recordcount,0,0) 
		rds3.Recordset.Movefirst
		for i = 0 to havedCourseCount - 1
			havedCourseArray(0,i) = rds3.Recordset.fields(0) 
			rds3.Recordset.MoveNext
		next
	end if
end sub

'=======================================================
sub returning() '返回上一层程序
'=======================================================
    history.go(-1)

end sub
'==============================================================

function checkHaved(classno,kcno,termno)
	
	rds3.SQL = "select * from class_course where 班号='"+classno+"' and 课程号='"+HavedCourseArray(0,kcno)+"' and "&_
			   " 学年='"+yearnoArray(0,termno)+"' and 学期='"+termnoArray(0,termno)+"'"
			   
	
	rds3.ExecuteOptions = 1
	rds3.Refresh
	if rds3.Recordset.recordcount >0 then
		checkHaved = true
	else
		checkHaved = false
	end if
	
end function
'========按班、年级及学号取某学年某学期所开所的课程======
sub get_course(classno,termno)
'========================================================
	courseSelectCount = 0
	rds3.SQL = "select 课程号 from class_course where 班号='"+classno+"' "&_
			 "group by 课程号"  'and  " 学年='"+yearnoArray(0,termno)+"' and 学期='"+termnoArray(0,termno)+"'"
	
	rds3.ExecuteOptions = 1
	rds3.Refresh
	courseSelectCount = rds3.Recordset.recordcount
	if courseSelectCount <=0 then
		exit sub 
	end if 
	rds3.Recordset.Movefirst
	for i=0 to courseSelectCount -1 
		courseSelectArray(0,i)=rds3.Recordset.fields(0)
		rds3.Recordset.Movenext
	next
	'courseSelectArray= rds3.recordset.Getrows(rds3.recordset.recordcount,0,0) 
	
end sub

'========找出某课程在所有开设的课程中的位置======
function getPrintLine(cno)
	getPrintLine = 0
	for i=0 to HavedCourseCount - 1
		if HavedCourseArray(0,i)=CourseSelectArray(0,cno) then
			getPrintLine = i
			exit for
		end if
	next 
end function

				

</script>

<!--<OBJECT classid=clsid:6E84D662-9599-11D2-9367-20CC03C10627
  height=3 id=vp width =3  VIEWASTEXT>
</OBJECT> -->
<OBJECT classid=clsid:6E84D662-9599-11D2-9367-20CC03C10627 height=130 id=vp 
style="HEIGHT: 375px; WIDTH: 744px" width=300 VIEWASTEXT>
	<PARAM NAME="_cx" VALUE="19685">
	<PARAM NAME="_cy" VALUE="9922">
	<PARAM NAME="Appearance" VALUE="1">
	<PARAM NAME="BorderStyle" VALUE="1">
	<PARAM NAME="Enabled" VALUE="-1">
	<PARAM NAME="MousePointer" VALUE="0">
	<PARAM NAME="BackColor" VALUE="2147483653">
	<PARAM NAME="Font" VALUE="Arial">
	<PARAM NAME="HdrFont" VALUE="Courier New">
	<PARAM NAME="_ConvInfo" VALUE="1">
	<PARAM NAME="AutoRTF" VALUE="-1">
	<PARAM NAME="Preview" VALUE="-1">
	<PARAM NAME="DefaultDevice" VALUE="0">
	<PARAM NAME="PhysicalPage" VALUE="-1">
	<PARAM NAME="AbortWindow" VALUE="-1">
	<PARAM NAME="AbortWindowPos" VALUE="0">
	<PARAM NAME="AbortCaption" VALUE="Printing...">
	<PARAM NAME="AbortTextButton" VALUE="Cancel">
	<PARAM NAME="AbortTextDevice" VALUE="on the %s on %s">
	<PARAM NAME="AbortTextPage" VALUE="Now printing Page %d of">
	<PARAM NAME="FileName" VALUE="">
	<PARAM NAME="MarginLeft" VALUE="1440">
	<PARAM NAME="MarginTop" VALUE="1440">
	<PARAM NAME="MarginRight" VALUE="1440">
	<PARAM NAME="MarginBottom" VALUE="1440">
	<PARAM NAME="MarginHeader" VALUE="0">
	<PARAM NAME="MarginFooter" VALUE="0">
	<PARAM NAME="IndentLeft" VALUE="0">
	<PARAM NAME="IndentRight" VALUE="0">
	<PARAM NAME="IndentFirst" VALUE="0">
	<PARAM NAME="IndentTab" VALUE="720">
	<PARAM NAME="SpaceBefore" VALUE="0">
	<PARAM NAME="SpaceAfter" VALUE="0">
	<PARAM NAME="LineSpacing" VALUE="100">
	<PARAM NAME="Columns" VALUE="1">
	<PARAM NAME="ColumnSpacing" VALUE="180">
	<PARAM NAME="ShowGuides" VALUE="2">
	<PARAM NAME="LargeChangeHorz" VALUE="300">
	<PARAM NAME="LargeChangeVert" VALUE="300">
	<PARAM NAME="SmallChangeHorz" VALUE="30">
	<PARAM NAME="SmallChangeVert" VALUE="30">
	<PARAM NAME="Track" VALUE="0">
	<PARAM NAME="ProportionalBars" VALUE="-1">
	<PARAM NAME="Zoom" VALUE="25">
	<PARAM NAME="ZoomMode" VALUE="3">
	<PARAM NAME="ZoomMax" VALUE="400">
	<PARAM NAME="ZoomMin" VALUE="10">
	<PARAM NAME="ZoomStep" VALUE="5">
	<PARAM NAME="MouseZoom" VALUE="2">
	<PARAM NAME="MouseScroll" VALUE="-1">
	<PARAM NAME="MousePage" VALUE="-1">
	<PARAM NAME="EmptyColor" VALUE="2147483660">
	<PARAM NAME="TextColor" VALUE="0">
	<PARAM NAME="HdrColor" VALUE="0">
	<PARAM NAME="BrushColor" VALUE="0">
	<PARAM NAME="BrushStyle" VALUE="0">
	<PARAM NAME="PenColor" VALUE="0">
	<PARAM NAME="PenStyle" VALUE="0">
	<PARAM NAME="PenWidth" VALUE="0">
	<PARAM NAME="PageBorder" VALUE="0">
	<PARAM NAME="Header" VALUE="">
	<PARAM NAME="Footer" VALUE="">
	<PARAM NAME="TableSep" VALUE="|;">
	<PARAM NAME="TableBorder" VALUE="7">
	<PARAM NAME="TablePen" VALUE="0">
	<PARAM NAME="TablePenLR" VALUE="0">
	<PARAM NAME="TablePenTB" VALUE="0">
	<PARAM NAME="HTMLStyle" VALUE="1">
</OBJECT>
<P><INPUT id=button1 name=button1 onclick="Toprint()" style="HEIGHT: 24px; WIDTH: 56px" type=button value="打 印">
  <INPUT id=button2 name=button2 onclick="Toprintview()" type=button value="打印预览">
  <INPUT id=button3 name=button3 onclick="Tonext()" style="HEIGHT: 24px; WIDTH: 72px" type=button value="下一页">
  <INPUT id=button4 name=button4 onclick="Tolast()" style="HEIGHT: 24px; WIDTH: 75px" type=button value="上一页">
  <INPUT id=button5 name=button5 onclick="ToFirst()" style="HEIGHT: 24px; WIDTH: 72px" type=button value="首  页">
  <INPUT id=button6 name=button6 onclick="ToEnd()" type=button value="最后页">
  <INPUT id=button7 name=button7 onclick="toPrinterSetup()" type=button value="打印设置" >
  <INPUT id=button8 name=button8 onclick="toZoomOut()" type=button value="放大">
  <INPUT id=button9 name=button9 onclick="toZoomIn()" type=button value="缩小"></P>
  
 <script language="VBScript" >
 	sub Toprint()
		vp.AbortWindow = true
		vp.PrintDoc 
			
	end sub
	
	sub Toprintview()
		vp.Preview = true
		'vp.HTMLFileName="c:\123.htm"
		'msgbox "ok"
		'showtable1()
		
	'vp.Preview = false
	'showtable()
	end sub
	
	sub Tonext()
		if vp.Previewpage < vp.PageCount then
			vp.PreviewPage = vp.PreviewPage + 1
		end if	
	end sub	
	
	sub Tolast()
		if vp.Previewpage >1 then
			vp.PreviewPage = vp.PreviewPage - 1
		end if
	
	end sub
	
	sub ToFirst()
		vp.PreviewPage = 1
	
	end sub
	
	sub ToEnd()
		vp.PreviewPage = vp.PageCount
	
	end sub
	
	sub ToPrinterSetup()
		vp.PrintDialog(1)	
	end sub
	
	sub ToZoomOut()
		vp.ZoomMax = 50
		vp.zoom = 150
	end sub
	
	sub ToZoomIn()
	
		vp.zoomMin = 10
		vp.zoom = 50
	end sub 
</script>
</body>
</html>

⌨️ 快捷键说明

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