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

📄 lscxdj_update.asp

📁 学生日常管理系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>毕业学生操行分修改</title>
</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>
<object id="rds3" classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" width="6"
height="8">
</object>
<object id="rds4" 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"
cellspacing="0" cellpadding="0" bgcolor="#B0CDDD">
  <caption align="left"><font color="#0000ff" 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> 
    起始学年<select name="termyear_start" size="1">
      <option value="1999">1999</option>
      <option value="2000">2000</option>
      <option value="2001">2001</option>
      <option value="2002">2002</option>
      <option value="2003">2003</option>
      <option value="2004">2004</option>
      <option value="2005">2005</option>
      <option value="2006">2006</option>
      <option value="2007">2007</option>
      <option value="2008">2008</option>
      <option value="2009">2009</option>
      <option value="2010">2010</option>
      <option value="2011">2011</option>
    </select>&nbsp;&nbsp; &nbsp; 至 &nbsp; <select name="termyear_end" size="1">
      <option value="1999">1999</option>
      <option value="2000">2000</option>
      <option value="2001">2001</option>
      <option value="2002">2002</option>
      <option value="2003">2003</option>
      <option value="2004">2004</option>
      <option value="2005">2005</option>
      <option value="2006">2006</option>
      <option value="2007">2007</option>
      <option value="2008">2008</option>
      <option value="2009">2009</option>
      <option value="2010">2010</option>
      <option value="2011">2011</option>
    </select>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 学期<select name="term1" size="1">
      <option value="1">上学期</option>
      <option value="2">下学期</option>
    </select> <p align="center"><input type="button" value="数据修改"
    onclick="beginquery()" name="start_input"
    style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 14px"> <input type="button"
    value="保存修改" onclick="save_click()" name="start_print"
    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"
	
	rds3.server ="http://<%=Request.ServerVariables("SERVER_NAME")%>"
	rds3.connect ="database=school;uid=sa;pwd=;dsn=school"
	
	rds4.server ="http://<%=Request.ServerVariables("SERVER_NAME")%>"
	rds4.connect ="database=school;uid=sa;pwd=;dsn=school"

     'Get all class Number 



  


	grid1.AllowAddnew = true

</script>
<script language="VBScript">
'==============================================================
sub beginquery()
   
   start_year=clng(termyear_start.value + termyear_end.value + term1.value)
   
   'start_end=clng(termyear_start1.value + termyear_end1.value + term2.value)
   
   rds1.SQL="select 周别,学号,姓名,扣分项目,扣分 from lscxdjk where 年度学期="&start_year&""
   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
 
 
  

end sub
'=================================
'保存考勤数据录入
'=================================

sub update_click()

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

   rds1.Recordset.movefirst
   
   for i=0 to rds1.Recordset.recordcount-1
   
      if isnull(rds1.Recordset.fields(6)) and isnull(rds1.Recordset.fields(7)) and isnull(rds1.Recordset.fields(8)) and isnull(rds1.Recordset.fields(9)) and isnull(rds1.Recordset.fields(10)) then
         
      else
        
          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))
          l_kb=trim(rds1.Recordset.fields(5))
          l_kk=rds1.Recordset.fields(6)
          l_cd=rds1.Recordset.fields(7)
          l_zt=rds1.Recordset.fields(8)
          l_sj=rds1.Recordset.fields(9)
          l_bj=rds1.Recordset.fields(10)
          l_bz=rds1.Recordset.fields(11)
                            
          rds2.SQL="insert into kaoqin(周别,日期,班号,学号,姓名,课别,旷课,迟到,早退,事假,病假,备注) values('"&l_week&"','"&l_date1&"','"&l_bh&"','"&l_xh&"','"&l_xm&"','"&l_kb&"','"&l_kk&"','"&l_cd&"','"&l_zt&"','"&l_sj&"','"&l_bj&"','"&l_bz&"')"
         ' msgbox rds2.sql
          rds2.ExecuteOptions = 1
          rds2.Refresh 
          
          select case  rds1.Recordset.fields(5)
          
             case "早操"
               
              if isnull(l_cd) then
               l_cd_kf=0 
              else 
               l_cd_kf=l_cd*0.5
              end if 
              if isnull(l_zt) then
              else
               l_zt_kf=l_zt*0.5
              end if 
              if isnull(l_kk) then
              else
               l_kk_kf=l_kk*1
              end if 
                                                                     
                 rds2.SQL="insert into xscxdjk(周别,日期,班号,学号,姓名,扣分项目,扣分) values('"&l_week&"','"&l_date1&"','"&l_bh&"','"&l_xh&"','"&l_xm&"','扣早操','"&cdbl(l_cd_kf+l_zt_kf+l_kk_kf)&"')" 
              
                 rds2.ExecuteOptions =1
                 
                 rds2.Refresh           
              case "正课"
              
                if isnull(l_cd) then
                    l_cd_kf=0 
                 else 
                    l_cd_kf=l_cd*1
                end if 
                if isnull(l_zt) then
                else
                 l_zt_kf=l_zt*1
                end if 
                if isnull(l_kk) then
                else
                  l_kk_kf=l_kk*3
                end if 
                                                                     
                 rds2.SQL="insert into xscxdjk(周别,日期,班号,学号,姓名,扣分项目,扣分) values('"&l_week&"','"&l_date1&"','"&l_bh&"','"&l_xh&"','"&l_xm&"','扣正课','"&cdbl(l_cd_kf+l_zt_kf+l_kk_kf)&"')" 
              
                 rds2.ExecuteOptions =1
                 
                 rds2.Refresh           
              case "晚修"
              
                 if isnull(l_cd) then
                    l_cd_kf=0 
                 else 
                    l_cd_kf=l_cd*1
                end if 
                if isnull(l_zt) then
                else
                 l_zt_kf=l_zt*1
                end if 
                if isnull(l_kk) then
                else
                  l_kk_kf=l_kk*3
                end if 
                                                                     
                 rds2.SQL="insert into xscxdjk(周别,日期,班号,学号,姓名,扣分项目,扣分) values('"&l_week&"','"&l_date1&"','"&l_bh&"','"&l_xh&"','"&l_xm&"','扣晚修','"&cdbl(l_cd_kf+l_zt_kf+l_kk_kf)&"')" 
              
                 rds2.ExecuteOptions =1
                 
                 rds2.Refresh           
              
          end select 
                    
             
             'msgbox rds1.Recordset.fields(4)  
          
      end if
      rds1.Recordset.movenext 
   next
  

end sub


'====================根据课程号,查询此课程所有类型成绩信息==============
sub score_allsearch()    
'========================================================================	
coursename = CourseNoArray(0,courseno.selectedIndex-1)
dim coursetype(5)

coursetype(0) = "平时成绩"
coursetype(1) = "期中成绩"

⌨️ 快捷键说明

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