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

📄 newsalary1.asp

📁 一个VB的p2p聊天系统
💻 ASP
字号:
<!--#include file="headfiles/Connection.inc"-->
<%
dim intmonth,intyear,intConfirm
intyear=cint(request("y"))
intmonth=cint(request("m"))
'response.Write(intyear&intmonth)
intConfirm=request.Form("txtConfirm")
if intConfirm="1" then
	dim rsTotal,rsDeduct,rsSalary,temptime
	set rsTotal=server.CreateObject("adodb.recordset")
	set rsDeduct=server.CreateObject("adodb.recordset")
	set rsSalary=server.CreateObject("adodb.recordset")
	strSql="select * from SalaryQuery order by Employee_ID"
	rsTotal.open strSql,conn,3,1
	
	temptime=""&intyear
	if intmonth<10 then
		temptime=temptime&"0"
	end if
	temptime=temptime&intmonth
	
	strSql="select * from "&temptime&"CheckView"
	strSql=strSql&" order by Employee_ID"
'		response.Write(strSql)
	rsDeduct.open strSql,conn,3,1
	strSql="select * from "&temptime&"SalaryTable"
	rsSalary.open strSql,conn,3,2
'		response.Write("OK")
	do while 1
		id=rsDeduct("Employee_ID")
		money=0
		do while not rsDeduct.eof
			if id=rsDeduct("Employee_ID") then
				money=money+rsDeduct("dmoney")
				rsDeduct.movenext
			else
				exit do
			end if
		loop
		rsSalary.addnew
		rsSalary("Employee_ID")=id
		rsSalary("Employee_Name")=rsTotal("Employee_Name")
		rsSalary("Employee_TotalS")=rsTotal("ModuleSum")
		rsSalary("Employee_ReduceS")=money
		rsSalary("Employee_LastS")=rsSalary("Employee_TotalS")-rsSalary("Employee_ReduceS")
		rsSalary("Employee_SM")=rsTotal("SModule_Name")
		'response.Write("0k")
		rsTotal.movenext
		rsSalary.update
		if rsDeduct.eof then
			exit do
		end if
	loop
	response.Write(chr(13)&"<script language='javascript'>")
	response.Write(chr(13)&"alert('"&intyear&"年"&intmonth&"月的工资计算成功!');")
	response.Write(chr(13)&"window.close();")
	response.Write(chr(13)&"</script>")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>建工资表</title>
<script language='javascript'>
function closewindow(){
	window.close();
}

function GetSalary(){
	frmNewSalary.txtConfirm.value=1;
	frmNewSalary.y.disabled=false;
	frmNewSalary.m.disabled=false;
	frmNewSalary.submit();
}
</script>
</head>

<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0" background="images/bg.gif">
<table width="298" border="1">
<form id="frmNewSalary" name="frmNewSalary" action="NewSalary1.asp" method="post">
  <tr align="center"> 
    <td width="44%" height="40" align="left"><b><font color="#FF3300">新建工资日期:</font> 
      </b></td>
    <td width="22%" ><input style="width:40px" id="y" name="y" value="<%=intyear%>" disabled></td>
    <td width="6%"><b><font color="#FF3300">年 </font></b></td>
    <td width="19%"><input style="width:40px" id="m" name="m" value="<%=intmonth%>" disabled></td>
    <td width="10%"><b><font color="#FF3300">月</font></b></td>
  </tr>
  <tr> 
    <td colspan="5"  align="center" > <input type="submit" id="addNew2" name="addNew2" style="width:60px;height:25px" class="title3" value="确定" onClick="GetSalary();return false"> 
    <input type="text" id="txtConfirm" name="txtConfirm" style="width:10px;visibiliyt:hidden"><input type="button" id="addNew" name="addNew" style="width:60px;height:25px" class="title3" value="取消" onclick="closewindow();"> 
    </td>
  </tr>
</form></table>
</body>
</html>

⌨️ 快捷键说明

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