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

📄 scorequery1_1.asp

📁 很好的学籍管理系统代码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
			 if Request("StudentNum")<>"" then
			     response.write "学号中含有“" & strStudentNum & "”"
			 elseif strName<>"" then
			     response.write "姓名中含有“" & strName & "”"
			 else
				 if strClass<>"" then strClass=strClass & "班" 
				 response.write "高" & strGrade+1 & "级" & strClass 
			 end if
			%> <% If Not rsScore.EOF Or Not rsScore.BOF Then %>
      &nbsp;&nbsp;&nbsp;&nbsp;共找到&nbsp;<font color="#FF0000"><%=(rsScore_total)%></font>&nbsp;条记录! 
            
      <table cellspacing=0 border=1 cellpadding="0" bordercolor="#FFCC00">
        <tr align="center" valign="middle" bordercolor="#FFCC00"> 
          <td width="60" rowspan="2"><font color="#000000"><strong>学 号</strong></font></td>
          <td width="50" rowspan="2"><font color="#000000"><strong>姓 名</strong></font></td>
          <%
						  strTemp = Request("chkbox")
						  dim ArrSubject,strSubject
						  dim ArrPass(),ArrExcel(),ArrAttain(),ArrBeyond()
						  ArrSubject = split(strTemp,",")
						  ReDim ArrPass(UBound(ArrSubject)+1)
						  Redim ArrExcel(UBound(ArrSubject)+1)
						  Redim ArrAttain(UBound(ArrSubject)+1)
						  Redim ArrBeyond(UBound(ArrSubject)+1)
						  
						  For i = LBound(ArrSubject) To UBound(ArrSubject)
						  	  strSubject=trim(cstr(ArrSubject(i)))
							  response.write "<td height='20' colspan='2'><font color='#000000'><b>" & strSubject & "</b></font></td>"
                              ArrPass(i)=0
							  ArrExcel(i)=0
							  ArrAttain(i)=0
							  ArrBeyond(i)=0
						  next
						%>
        </tr>
        <tr align="center" valign="middle" bordercolor="#FFCC00"> 
          <%
						  For i = LBound(ArrSubject) To UBound(ArrSubject)
  						  	  strSubject=trim(cstr(ArrSubject(i)))
							  if strSubject<>"全级排名" and strSubject<>"班级排名" then
							  	response.write "<td height='20' width='30'><font color='#000000'>成绩</font></td><td height='20' width='30'><font color='#000000'>目标</font></td>"
							  else
							  	response.write "<td height='20' width='30'><font color='#000000'>名次</font></td><td height='20' width='30'><font color='#000000'>目标</font></td>"
							  end if	
                          next
						%>
        </tr>
        <% 
While ((Repeat1__numRows <> 0) AND (NOT rsScore.EOF)) 
%>
<%
strName=cstr(rsScore.Fields.Item("Name").Value)
if strName="" then strName="&nbsp;"
%>
        <%
rsTarget__MMColParam = CStr(rsScore.Fields.Item("StudentNum").Value)
set rsTarget = Server.CreateObject("ADODB.Recordset")
rsTarget.ActiveConnection = MM_StudentConn_STRING
rsTarget.Source = "SELECT * FROM TargetScore WHERE StudentNum = '" + Replace(rsTarget__MMColParam, "'", "''") + "'"
rsTarget.CursorType = 0
rsTarget.CursorLocation = 2
rsTarget.LockType = 3
rsTarget.Open()
rsTarget_numRows = 0
%>
        <tr align="center" valign="middle"> 
          <td height="20" nowrap><font color="#000000"><%=(rsScore.Fields.Item("StudentNum").Value)%></font></td>
          <td height="20" nowrap><font color="#000000"><%=strName%></font></td>
          <%
						  dim strScore,strTartget
						  For i = LBound(ArrSubject) To UBound(ArrSubject)
						  	  strSubject=trim(cstr(ArrSubject(i)))
							  strScore=rsScore.Fields.Item(strSubject).Value
							  if IsNull(strScore) then strScore=0
							  if rsTarget.bof or rsTarget.eof then
							  	strTarget=0
							  else
							  	strTarget=rsTarget.Fields.Item(strSubject).Value
								if IsNull(strTarget) then strTarget=0
							  end if
							  if strScore<60 then
							    if strScore>=strTarget then        '达标
								  ArrAttain(i)=ArrAttain(i)+1
								  strTarget="<font color='#999999'>" & strTarget & "</font>"
								else        '不达标
								  strTarget="<font color='#ff0000'>" & strTarget & "</font>"
								end if
							    strScore = "<font color='#ff0000'>" & strScore & "</font>"
							  elseif strScore>=60 and strScore<80 then
							    ArrPass(i)=ArrPass(i)+1
							    if strScore>=strTarget then
								  if strTarget<60 then   '跳格
								    ArrBeyond(i)=ArrBeyond(i)+1
								    strTarget="<font color='#009900'>" & strTarget & "</font>"
								  else         '达标
								    ArrAttain(i)=ArrAttain(i)+1
									strTarget="<font color='#999999'>" & strTarget & "</font>"
								  end if
								else         '不达标
								  strTarget="<font color='#ff0000'>" & strTarget & "</font>"
								end if
							    strScore = "<font color='#0000ff'>" & strScore & "</font>"
							  elseif strScore>=80 then
							    ArrPass(i)=ArrPass(i)+1
							    ArrExcel(i)=ArrExcel(i)+1
								if strScore>=strTarget then
								  if strTarget<80 then   '跳格
								    ArrBeyond(i)=Arrbeyond(i)+1
								    strTarget="<font color='#009900'>" & strTarget & "</font>"
								  else    '达标
								    ArrAttain(i)=ArrAttain(i)+1
									strTarget="<font color='#999999'>" & strTarget & "</font>"
								  end if
								else     '不达标
								  strTarget="<font color='#ff0000'>" & strTarget & "</font>"
								end if
							    strScore = "<font color='#009900'>" & strScore & "</font>"
							  end if
							  response.write "<td height='20'>" & strScore & "</td>"
							  response.write "<td height='20'>" & strTarget & "</td>"
                          next
						  
						%>
        </tr>
        <%
rsTarget.Close()
%>
        <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsScore.MoveNext()
Wend
%>
        <tr align="center" valign="middle"> 
          <td colspan="2" hight="20" align="right"><font color="#000000">合格人数/达标人数:</font></td>
          <%
						  For i = LBound(ArrSubject) To UBound(ArrSubject)
							  response.write "<td height='20'>" & ArrPass(i) & "</td><td height='20'>" & ArrAttain(i) & "</td>"
                          next
				%>
        </tr>
        <tr align="center" valign="middle"> 
          <td colspan="2" hight="20" align="right"><font color="#000000">合格率/达标率:</font></td>
          <%
						  For i = LBound(ArrSubject) To UBound(ArrSubject)
							  response.write "<td height='20'>" & round(ArrPass(i)/(rsScore_total)*100,1) & "%</td><td height='20'>" & round(ArrAttain(i)/(rsScore_total)*100,1) & "%</td>"
                          next
						  
						%>
        </tr>
        <tr align="center" valign="middle"> 
          <td colspan="2" hight="20" align="right"><font color="#000000">优秀人数/跳格人数:</font></td>
          <%
						  For i = LBound(ArrSubject) To UBound(ArrSubject)
							  response.write "<td height='20'>" & ArrExcel(i) & "</td><td height='20'>" & ArrBeyond(i) & "</td>"
                          next
						  
						%>
        </tr>
        <tr align="center" valign="middle"> 
          <td colspan="2" hight="20" align="right"><font color="#000000">优秀率/跳格率:</font></td>
          <%
						  For i = LBound(ArrSubject) To UBound(ArrSubject)
							  response.write "<td height='20'>" & round(ArrExcel(i)/(rsScore_total)*100,1) & "%</td><td height='20'>" & round(ArrBeyond(i)/(rsScore_total)*100,1) & "%</td>"
                          next
						  
						%>
        </tr>
        <tr align="center" valign="middle"> 
          <td colspan="2" hight="20" align="right"><font color="#000000">两率和:</font></td>
          <%
						  For i = LBound(ArrSubject) To UBound(ArrSubject)
							  response.write "<td height='20'>" & round((ArrPass(i)+ArrExcel(i))/(rsScore_total)*100,1) & "%</td><td height='20'>" & round((ArrAttain(i)+ArrBeyond(i))/(rsScore_total)*100,1) & "%</td>"
                          next
						  
						%>
        </tr>
      </table>
            <font color="#000000"><strong>说明:</strong><br>
            成绩表示方法:60分以下用<font color="#FF0000">红色</font>表示,60--79分用<font color="#0000FF">蓝色</font>表示,80分及以上用<font color="#009900">绿色</font>表示。<br>
      达标表示方法:不达标用<font color="#FF0000">红色</font>表示,达标用</font><font color="#999999">灰色</font><font color="#000000">表示,跳格用<font color="#009900">绿色</font>表示。</font>
      <% else 
				Response.Write "<br><br><br>找不到符合条件的记录!<br><br><br>"
			 end if
			%>
    </TD>
  </TR>
</TABLE>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
		<Iframe src="http://cqzx.sdedu.net/sdms/CopyRight.asp" width="760" height="200" marginheight="0" marginwidth="0" scrolling="NO" frameborder="0" name="CopyRight"></iframe>
	</td>
  </tr>
</table></BODY>
</HTML>
<%
rsTestName.Close()
%>
<%
rsScore.Close()
%>

⌨️ 快捷键说明

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