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

📄 xscxdj_query.asp

📁 学生日常管理系统
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--DOCTYPE HTML PUBLIC "IETF//DTD HTML4.0//EN"-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>

<body background="../images/di2001.jpg">


<p>
<object id="rds1" classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" width="9"
height="6">
</object>
<object id="rds2" classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" width="6"
height="8">
</object>
</p>
<div align="center"><center>

<table border="0" width="747" height="282" style="HEIGHT: 282px; WIDTH: 747px"
bgcolor="#B0CCE1" cellspacing="0" cellpadding="0">
<caption align="left"><font color="#ff0000" size="5"><b>学生操行分查询</b></font></caption>
  <tr>
    <td width="569" height="188" valign="top">
    <object classid="clsid:00028CD1-0000-0000-0000-000000000046" codebase="http:/"
    <%=Request.ServerVariables("SERVER_NAME")%>/school/public/tdbg6.ocx" dataSrc="#rds1"
    height="357" id="grid1" style="LEFT: 0px; TOP: 0px" width="562" VIEWASTEXT id="tdbgrid1">
    </object>
    </td>
    <td width="161" height="188" valign="top"><font color="#ff0000">请选择录入的条件:</font> 
    起始周<input type="text" name="weekno_start" size="10"
    style="HEIGHT: 21px; WIDTH: 72px">&nbsp;&nbsp;&nbsp; 终止周<input type="text"
    name="weekno_end" size="10" style="HEIGHT: 21px; WIDTH: 72px">&nbsp;&nbsp;&nbsp; <!--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    日期<input type="text" name="dateno" size="10">&nbsp;&nbsp;&nbsp;&nbsp;--> 班号<select
    name="classno" size="1">
    </select> &nbsp;&nbsp;<!-- 学号<input type="text" name="start_no" size="10"> &nbsp;&nbsp; 
    &nbsp; 姓名<input type="text" name="xm" size="10">&nbsp;&nbsp;&nbsp;--> <p align="center"><input type="button" value="操行分查询"
    onclick="xscxdjquery()" name="start_input"
    style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 14px"> <input type="button"
    value=" 打印报表 " onclick="printing()" name="start_print"
    style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 14px"> <!-- <input type="button"
    value=" 加 满 勤 " onclick="jmqclick()" name="jmq"
    style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 14px">--><input type="button"
    value=" 退出返回 " onclick="returning()" name="exiting"
    style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 14px"></td>
  </tr>
</table>
</center></div><script language="Vbscript">
	dim courseNoArray(0,100),courseArray(0,100),courseSelectArray(0,100),xhOrderArray(0,100)
	dim courseCount,courseSelectCount,search_all
	dim course_sql
	dim total_score
	
	search_all = false
	
	rds1.server = "http://<%=Request.ServerVariables("SERVER_NAME")%>"
	rds1.connect ="database=school;uid=sa;pwd=;dsn=school"

	rds2.server ="http://<%=Request.ServerVariables("SERVER_NAME")%>"
	rds2.connect ="database=school;uid=sa;pwd=;dsn=school"

'Get all class Number 

	rds2.sql = "select * from class"
	rds2.ExecuteOptions = 1
	rds2.refresh


  colcount=rds2.Recordset.recordcount

   while not rds2.Recordset.eof

	 for circle=0 to colcount-1
	    	colitem=rds2.Recordset.fields(0)
		    set item_option = document.createElement("OPTION")
		    item_option.text = colitem
		    item_option.value = colitem
		    document.all.classno.add(item_option)
		    rds2.Recordset.movenext

    next 

  wend


	'dateno.value = "20"+formatdatetime(date(),2)
	grid1.AllowAddnew = true
   
   weekno_start.value = 1
   weekno_end.value = 22 
</script>
<script language="VBScript">
'==============================================================
sub xscxdjquery()

  
   if len(rtrim(weekno_start.value))=0 or len(rtrim(weekno_end.value))=0 or len(rtrim(classno.value))=0 then
   
      msgbox "请输入周别或班号......",,"提示窗口"
      exit sub
   
   end if 
   
   if cint(rtrim(weekno_start.value))>cint(rtrim(weekno_end.value)) then
   
      msgbox "终止周别不能小于起始周别......!",,"提示窗口"
      exit sub
   
   end if 
        
   
    
   rds1.SQL="execute xscxdj_total_class "&weekno_start.value&","&weekno_end.value&",'"&classno.value&"'"
 
   rds1.ExecuteOptions = 1 
   rds1.Refresh 

   if rds1.Recordset.recordcount>0 then
    
     grid1.caption="商业学校"+rtrim(classno.value)+"班操行分统计表" 
   
   end if


end sub

'================================================
sub classnoquery()
   
   if len(rtrim(weekno_start.value))=0 or len(rtrim(weekno_end.value))=0 or len(rtrim(classno.value))=0 then
   
      msgbox "请输入周别或班号......",,"提示窗口"
      exit sub
   
   end if 
   
   if cint(rtrim(weekno_start.value))>cint(rtrim(weekno_end.value)) then
   
      msgbox "终止周别不能小于起始周别......!",,"提示窗口"
      exit sub
   
   end if 
        
   
    
   rds1.SQL="execute kaoqin_total "&weekno_start.value&","&weekno_end.value&",'"&classno.value&"'"
 
   rds1.ExecuteOptions = 1 
   rds1.Refresh 


end sub





'=====================================
SUB STUDENTQUERY()

  if len(rtrim(weekno_start.value))=0 or len(rtrim(weekno_end.value))=0 or len(rtrim(start_no.value))=0 then
   
      msgbox "请输入周别或学号......",,"提示窗口"
      exit sub
   
   end if 

  rds1.SQL="execute kaoqin_total_xh "&weekno_start.value&","&weekno_end.value&",'"&start_no.value&"'"
  rds1.ExecuteOptions = 1
  rds1.Refresh 


END SUB


'=======================================


SUB NAMEQUERY()

  if len(rtrim(weekno_start.value))=0 or len(rtrim(weekno_end.value))=0 or len(rtrim(xm.value))=0 then
   
      msgbox "请输入周别或姓名......",,"提示窗口"
      exit sub
   
   end if 
  rds1.SQL="execute kaoqin_total_xm "&weekno_start.value&","&weekno_end.value&",'"&xm.value&"'"
  rds1.ExecuteOptions = 1
  rds1.Refresh 


END SUB

'==========================================================
sub begininput()

    if len(weekno.value)=0 then
    
       msgbox "请输入周别......",,"提示窗口"
     
       exit sub
       
    end if  
     
    if len(classno.value)=0 and len(xm.value)=0 and len(start_no.value)=0 then
    
      msgbox "请选择班级或者输入学号,姓名......",,"提示窗口"
      exit sub
      
    end if   
    
      
   'msgbox formatdatetime(date(),1)
    
    l_date=trim(dateno.value)  
      
   if len(classno.value)<>0   then
   
     
  
       rds1.SQL="execute kaoqin_class"+"'"+weekno.value+"',"+"'"+l_date+"',"+"'"+classno.value+"',"+"'"+kno.value+"'"
  
       rds1.ExecuteOptions = 1
   
       rds1.Refresh 
       
   elseif len(start_no.value)<>0 then
    
       
   
       rds1.SQL="execute kaoqin_xh"+"'"+weekno.value+"',"+"'"+l_date+"',"+"'"+start_no.value+"',"+"'"+kno.value+"'"
  
       rds1.ExecuteOptions = 1
   
       rds1.Refresh 
          
   else
   
       rds1.SQL="execute kaoqin_xm"+"'"+weekno.value+"',"+"'"+l_date+"',"+"'"+xm.value+"',"+"'"+kno.value+"'"
  
       rds1.ExecuteOptions = 1
   
       rds1.Refresh 
     
   end if
	
end sub 

'==================================

sub modi_click()

    if len(weekno.value)=0 then
    
       msgbox "请输入周别......",,"提示窗口"
     
       exit sub
       
    end if  
     
    if len(classno.value)=0 and len(xm.value)=0 and len(start_no.value)=0 then
    
      msgbox "请选择班级或者输入学号,姓名......",,"提示窗口"
      exit sub
      
    end if   
    
      
   'msgbox formatdatetime(date(),1)
    
    l_date=trim(dateno.value) 
    'msgbox weekno.value 
      
   if len(classno.value)<>0   then
   
     
  
       rds1.SQL="select * from kaoqin where 周别='"&weekno.value&"' and 日期='"&l_date&"' and 班号='"&classno.value&"' and 课别='"&kno.value&"'"
  
       rds1.ExecuteOptions = 1
   
       rds1.Refresh 
       
   elseif len(start_no.value)<>0 then
    
       
   
       rds1.SQL="select * from kaoqin where 周别='"&weekno.value&"' and 日期='"&l_date&"' and 学号='"&start_no.value&"' and 课别='"&kno.value&"'"
  
       rds1.ExecuteOptions = 1
   
       rds1.Refresh 
          
   else
   
       rds1.SQL="select * from kaoqin where 周别='"&weekno.value&"' and 日期='"&l_date&"' and 姓名='"&xm.value&"' and 课别='"&kno.value&"'"
  
       rds1.ExecuteOptions = 1
   
       rds1.Refresh 
     
   end if



end sub


'=================================

'保存数据修改

'================================
sub save_click()

   if rds1.Recordset.recordcount<0 then
   
      msgbox "没有数据保存......",,"提示窗口"
      
      exit sub
   
   end if   
   

   if grid1.row=0 then
  ' msgbox grid1.row
     rds1.Recordset.movenext
   else
	 rds1.Recordset.movenext			
   end if

	grid1.Editactive = False
   On Error resume next
   RDS1.SubmitChanges
   If Err.Number <> 0 Then
      
      MsgBox "无法更新数据!"
      
      exit sub
   End If
   rds1.Recordset.movefirst
   for i=0 to rds1.Recordset.recordcount-1
          l_week=trim(rds1.Recordset.fields(0))
          l_date1=trim(rds1.Recordset.fields(1))
          l_bh=trim(rds1.Recordset.fields(2))
          l_xh=trim(rds1.Recordset.fields(3))
          l_xm=trim(rds1.Recordset.fields(4))

⌨️ 快捷键说明

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