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

📄 useinsert6.asp

📁 应用程序利用ASP做的一个可以实现登陆
💻 ASP
📖 第 1 页 / 共 3 页
字号:
    faultcount=rs("faultcount") 
	if fixtype="大修在修" then
	brcount=brcount+1
	else if fixtype="中修在修" then
	 mrcount=mrcount+1 
	else if fixtype="小修在修" then
	 srcount=srcount+1
	else if fixtype="检修在修" then
	 checkcount=checkcount+1 
	else if fixtype="故障在修" then
	 faultcount=faultcount+1 
	 end if
	 end if 
	 end if
	 end if
	 end if
   sql="update otk_equipment set"

   sql=sql+" combatconsume='"&combatconsume&"',"
   sql=sql+" coachconsume='"&coachconsume&"',"
   sql=sql+" brcount='"&brcount&"',"
   sql=sql+" mrcount='"&mrcount&"',"
   sql=sql+" srcount='"&srcount&"',"
   sql=sql+" checkcount='"&checkcount&"',"
   sql=sql+" faultcount='"&faultcount&"',"
   sql=sql+" fixcondition='"&fixtype&"' "
   sql=sql+condition+ "and totalid='"&equipid&"'"
  conn.Execute(sql)
	 
    'rs.close
	set rs=nothing
    end if
   
 else if tableid="22" then 
      set rs = server.createobject("adodb.recordset")
	  sql="select * from oca_equipment "&condition&" and equipid='"&equipid&"'"
       rs.open sql,conn, 1, 1
	   if not rs.bof or not rs.eof then
      brcount=rs("brcount")
      mrcount=rs("mrcount")
	  srcount=rs("srcount")
      checkcount=rs("checkcount")
	 faultcount=rs("faultcount")
	  
	  
	if fixtype="大修在修" then
	brcount=brcount+1
	lastbrdate=ttime
	else if fixtype="中修在修" then
	 mrcount=mrcount+1 
	 lastbrdate=rs("lastbrdate")
    else if fixtype="小修在修" then
	 srcount=srcount+1 
	else if fixtype="检修在修" then
	 checkcount=checkcount+1 
	else if fixtype="故障在修" then
	 faultcount=faultcount+1  
	 end if
	 end if
	 end if
	 end if
	 end if
   
        sql="update oca_equipment set"
       
        sql=sql+" brcount='"&brcount&"',"
		sql=sql+" mrcount='"&mrcount&"',"
		sql=sql+" srcount='"&srcount&"',"
		sql=sql+" checkcount='"&checkcount&"',"
		sql=sql+" faultcount='"&faultcount&"',"
		sql=sql+" lastbrdate='"&lastbrdate&"',"
        sql=sql+" fixcondition='"&fixtype&"' "
        sql=sql+condition+ "and equipid='"&equipid&"'"
	
        conn.Execute(sql)
		 rs.close
	    set rs=nothing
		end if
	
 else if tableid="24" then 
      set rs = server.createobject("adodb.recordset")
     sql="select * from oen_equipment "&condition&" and totalid='"&equipid&"'"
      rs.open sql,conn, 1, 1
	 if not rs.bof or not rs.eof then  
	  brcount=rs("brcount")
      mrcount=rs("mrcount")
	  srcount=rs("srcount")
	  checkcount=rs("checkcount")
	  faultcount=rs("faultcount")
	  yearused=cstr(clng(rs("yearused"))+clng(equipmentused))
      alreadyused=cstr(clng(rs("alreadyused"))+clng(equipmentused))
      if  month(date())=1 and day(date())=1 then
      yearused=equipmentused
	 
	  end if

	   
	if fixtype="大修在修" then
	brcount=brcount+1

	         sql="update oen_vehicle set"        
             sql=sql+" brcount='"&brcount&"',"
		     sql=sql+" brdate='"&fixtime&"',"
			 sql=sql+" brover='"&overtime&"',"
			 sql=sql+" yearused='"&yearused&"',"
			 sql=sql+" alreadyused='"&alreadyused&"',"
             sql=sql+" fixcondition='"&fixtype&"' "
             sql=sql+condition+ "and totalid='"&equipid&"'"
	
	 else if fixtype="中修在修" then
	 mrcount=mrcount+1 
	         sql="update oen_vehicle set"        
            
		     sql=sql+" mrcount='"&mrcount&"',"
		     sql=sql+" mrdate='"&fixtime&"',"
			 sql=sql+" mrover='"&overtime&"',"
			 sql=sql+" yearused='"&yearused&"',"
			 sql=sql+" alreadyused='"&alreadyused&"',"
             sql=sql+" fixcondition='"&fixtype&"' "
             sql=sql+condition+ "and totalid='"&equipid&"'"
		
		
	 else if fixtype="小修在修" then
	 srcount=srcount+1 	 
	         sql="update oen_vehicle set"        
            
		     sql=sql+" srcount='"&srcount&"',"
		     sql=sql+" srdate='"&fixtime&"',"
			 sql=sql+" yearused='"&yearused&"',"
			 sql=sql+" alreadyused='"&alreadyused&"',"
             sql=sql+" fixcondition='"&fixtype&"' "
             sql=sql+condition+ "and totalid='"&equipid&"'"
			 
	 else if fixtype="检修在修" then
	 checkcount=checkcount+1 	 
	         sql="update oen_vehicle set"        
            
		     sql=sql+" checkcount='"&checkcount&"',"
			 sql=sql+" yearused='"&yearused&"',"
			 sql=sql+" alreadyused='"&alreadyused&"',"
             sql=sql+" fixcondition='"&fixtype&"' "
             sql=sql+condition+ "and totalid='"&equipid&"'"
			 		 
	 else if fixtype="故障在修" then
	 faultcount=faultcount+1 	 
	         sql="update oen_vehicle set"        
            
		     sql=sql+" faultcount='"&faultcount&"',"
			 sql=sql+" yearused='"&yearused&"',"
			 sql=sql+" alreadyused='"&alreadyused&"',"
             sql=sql+" fixcondition='"&fixtype&"' "
             sql=sql+condition+ "and totalid='"&equipid&"'"
			 end if
			 end if		 
				 
			 end if 
			 end if
			 end if
             'response.write(sql)
             'response.end()
             conn.Execute(sql)
			  'rs.close
	          set rs=nothing
     end if
 else if tableid="23" then
      set rs = server.createobject("adodb.recordset")
  
     sql="select * from ovo_equipment "&condition&" and equipid='"&equipid&"'"
      rs.open sql,conn, 1, 1
    if not rs.bof or not rs.eof then
    brcount=rs("brcount")
    mrcount=rs("mrcount")
	srcount=rs("srcount")
    checkcount=rs("checkcount")
	faultcount=rs("faultcount")
    lrdate=ttime
	  
	if fixtype="大修在修" then
	brcount=brcount+1

	else if fixtype="中修在修" then
	 mrcount=mrcount+1 
   
   else if fixtype="小修在修" then
	 srcount=srcount+1 
	 
	else if fixtype="检修在修" then
	 checkcount=checkcount+1 
	 
    else if fixtype="故障在修" then
	 faultcount=faultcount+1 

	 end if
	 end if
	 end if

	 end if
	 end if
   
		     sql="update ovo_equipment set"
         
              sql=sql+" brcount='"&brcount&"',"
		      sql=sql+" mrcount='"&mrcount&"',"
			  sql=sql+" srcount='"&srcount&"',"
		      sql=sql+" faultcount='"&faultcount&"',"
			  sql=sql+" checkcount='"&checkcount&"',"
		      sql=sql+" lrdate='"&lrdate&"',"
              sql=sql+" fixcondition='"&fixtype&"' "
              sql=sql+condition+ "and equipid='"&equipid&"'"
	
              conn.Execute(sql)
		      'rs.close
	          set rs=nothing
			end if	
 else if tableid="25" then
  set rs = server.createobject("adodb.recordset")
   sql="select * from ofh_equipment "&condition&" and totalid='"&equipid&"'"
   rs.open sql,conn,1,1
    if not rs.bof or not rs.eof then
      brcount=rs("brcount")
      mrcount=rs("mrcount")
	 srcount=rs("rsrcount")
	  checkcount=rs("checkcount")
	  faultcount=rs("faultcount")
	  yteexpend=cstr(clng(rs("yteexpend"))+clng(equipmentused))
      pyeexpend=cstr(clng(rs("pyeexpend"))+clng(equipmentused))
      if  month(date())=1 and day(date())=1 then
      yteexpend=equipmentused
	 
	  end if

	   
	if fixtype="大修在修" then
	brcount=brcount+1

	         sql="update oen_vehicle set"        
             sql=sql+" brcount='"&brcount&"',"
		     sql=sql+" rbrtime='"&fixtime&"',"
			 sql=sql+" rbrover='"&overtime&"',"
			 sql=sql+" yteexpend='"&yteexpend&"',"
			 sql=sql+" pyeexpend='"&pyeexpend&"',"
             sql=sql+" fixcondition='"&fixtype&"' "
             sql=sql+condition+ "and totalid='"&equipid&"'"
	
	 else if fixtype="中修在修" then
	 mrcount=mrcount+1 
	         sql="update oen_vehicle set"        
            
		     sql=sql+" mrcount='"&mrcount&"',"
		     sql=sql+" rmrtime='"&fixtime&"',"
			 sql=sql+" rmrover='"&overtime&"',"
			 sql=sql+" yteexpend='"&yteexpend&"',"
			 sql=sql+" pyeexpend='"&pyeexpend&"',"
             sql=sql+" fixcondition='"&fixtype&"' "
             sql=sql+condition+ "and totalid='"&equipid&"'"
		
		
	 else if fixtype="小修在修" then
	 srcount=srcount+1 	 
	         sql="update oen_vehicle set"         
            
		     sql=sql+" rsrcount='"&srcount&"',"
		     sql=sql+" rsrtime='"&fixtime&"',"
			 sql=sql+" yteexpend='"&yteexpend&"',"
			 sql=sql+" pyeexpend='"&pyeexpend&"',"
             sql=sql+" fixcondition='"&fixtype&"' "
             sql=sql+condition+ "and totalid='"&equipid&"'"
			 
	else if fixtype="检修在修" then
	 checkcount=checkcount+1 	 
	         sql="update ofh_equipment set"         
            
		     sql=sql+" checkcount='"&checkcount&"',"
			 sql=sql+" yteexpend='"&yteexpend&"',"
			 sql=sql+" pyeexpend='"&pyeexpend&"',"
             sql=sql+" fixcondition='"&fixtype&"' "
             sql=sql+condition+ "and totalid='"&equipid&"'"
	
	 else if fixtype="故障在修" then
	 faultcount=faultcount+1 	 
	         sql="update ofh_equipment set"         
            
		     sql=sql+" faultcount='"&faultcount&"',"
			 sql=sql+" yteexpend='"&yteexpend&"',"
			 sql=sql+" pyeexpend='"&pyeexpend&"',"
             sql=sql+" fixcondition='"&fixtype&"' "
             sql=sql+condition+ "and totalid='"&equipid&"'"
			 		 	 
			 end if 
			 end if
			 end if 
			 end if
			 end if
             'response.write(sql)
             'response.end()
             conn.Execute(sql)
			  'rs.close
	          set rs=nothing

   end if
   end if
   end if
   end if
   end if
 

  
  
   end if
 
%>
 
 <%
  
   rs="'"&equipid&_
     "','"&name4&_
     "','"&fixunit&_ 	 
	 "','"&fixtime&_ 
	 "','"&sender&_ 
	 "','"&fixtype&_
	 "','"&faultreason&_
	 "','"&dealthing&_
	 "','"&equipmentused&_ 
	 "','"&motorhour&_ 
	 "','"&overtime&_ 
	 "','"&ttime&_
	 "','"&kind&_
	 "','"&tableid&_
	 "','"&level1&_ 
	 "','"&level2&_ 
	 "','"&level3&_ 
	 "','"&level4&_	   
	 "'"

	 
	sql="insert into h_mend(equipid,name4,fixunit,fixtime,sender,fixtype,faultreason,dealthing,equipmentused,motorhour,overtime,ttime,kind,tid,level1,level2,level3,level4)values("&rs&")"
	 
     'response.Write(sql)
	    'response.End()
	     conn.execute(sql)
        response.write "<script language='javascript'>" 
	    response.write "alert('录入成功!');" 
	    response.write "history.go(-1);"
	    response.write "</script>"
        response.end
%>  
<%
   
    conn.close
    end if
%> 
</body>	

</html>

⌨️ 快捷键说明

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