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

📄 add_feiyong1.asp

📁 职业培训学校学生档案成绩费用管理系统V1.0免费版.rar
💻 ASP
字号:
<!--#include file="conn.asp"-->

<%
if session("user")="" then
	response.write "您无此权限"
	response.end
end if

dim out_time
user_number=trim(request("user_number"))
user_name=trim(request("user_name"))
user_type=trim(request("user_type"))
money=trim(request("money"))
info=trim(request("info"))

yanchang=trim(request("yanchang"))    '确认单选框的值
datamonth=trim(request("datamonth"))  '确认月的值
dataday=trim(request("dataday"))      '确认天的值
datazhi1=trim(request("datazhi1"))    '确认截止时间年的值
datazhi2=trim(request("datazhi2"))    '确认截止时间月的值
datazhi3=trim(request("datazhi3"))    '确认截止时间日的值
'交费时间
y=request("year")
m=request("month")
d=request("day")
user_time=y&"-"&m&"-"&d

	if user_number="" then
		response.write "学号不能为空"
		response.end
	end if
	if user_name="" then
		response.write "姓名不能为空"
		response.end
	end if
set trs=server.createobject("adodb.recordset")
tsql="select * from st_info where user_number='"&user_number&"'"
trs.open tsql,conn,1,3

if trs.eof then
	 response.Write("此学生还未录入进系统,请录入该学生信息后再添加该学生费用信息!")
elseif not trs.eof then

	if user_type="" then
		response.write "不能为空"
		response.end
	end if
	if money="" then
		response.write "不能为空"
		response.end
	end if
	if info="" then
		info="无"
	end if
	if isnumeric(money)=false then
		response.write "“费用金额”栏请输入数字"
		response.end
	end if
	
	if user_type="学费" then
		if yanchang="yanmonth" then 
			if isnumeric(datamonth)=false then
				response.write "“延长(至)”栏请输入数字"
				response.end
			else
			  if isnull(trs("out_time")) then
				out_time=DateAdd("m",cint(datamonth),trs("in_time"))
			  else 
				out_time=DateAdd("m",cint(datamonth),trs("out_time"))
			  end if
			end if
		end if
		if yanchang="yanday"then
			if isnumeric(dataday)=false then
				response.write "“延长(至)”栏请输入数字"
				response.end
			else
			  if isnull(trs("out_time")) then
				out_time=DateAdd("d",cint(dataday),trs("in_time"))
			  else 
				out_time=DateAdd("d",cint(dataday),trs("out_time"))
			  end if
			end if
		end if
		if yanchang="yanzhi" then
			out_time=datazhi1&"-"&datazhi2&"-"&datazhi3
		end if		
		trs("out_time")=out_time
		trs.update
		response.write("hao de !")
    elseif user_type="生活费" then
	  	out_time=datazhi1&"-"&datazhi2&"-"&datazhi3
		trs("shenghuo")=out_time
		trs.update
	else
	end if
	
	set rs=server.createobject("adodb.recordset")
	sql="select * from feiyong "
	rs.open sql,conn,1,3
	rs.addnew
	rs("user_number")=trs("user_number")
	rs("user_name")=user_name
	rs("user_type")=user_type
	rs("money")=money
	rs("info")=info
	if user_type="学费" then
		if yanchang="yanmonth"then
		   rs("data")=datamonth&"个月"
		end if 
		if yanchang="yanday" then
		   rs("data")=dataday&"天"
		end if
		if yanchang="yanzhi" then
			rs("data")=datazhi1&"-"&datazhi2&"-"&datazhi3
		end if
	elseif user_type="生活费" then
		rs("data")=datazhi1&"-"&datazhi2&"-"&datazhi3
	else
	    rs("data")="&nbsp"
	end if
	rs("user_time")=user_time
	rs.update
	rs.close
	set rs=nothing
	if isempty(request("key")) then
		response.redirect "add_feiyong.asp"
	else
		response.Redirect("add_feiyong.asp?key=1")
	end if
else

end if
trs.close
set trs=nothing
response.end

%>

⌨️ 快捷键说明

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