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

📄 batchstep2.asp

📁 学生档案与成绩管理(1)学生档案管理:记录每个学生的档案信息
💻 ASP
字号:
<!-- #include file = "../include/asphead.asp" -->
<!-- #include file = "../include/function.asp" -->
<!-- #include file = "../include/calendar.asp" -->
<%CheckUser()%>
<script src="../include/function.js" type="text/javascript"></script>
<script src="expandcheck.js" type="text/javascript"></script>
<link href="../include/main.css" rel="stylesheet" type="text/css">

<script ID="clientEventHandlersJS" LANGUAGE="javascript">
<!--

function LocalDC()
{
	if(frmData.optModify[0].status==true)
	{
		if(ExpandCheck()==true)
			return GeneralDC();
		else
			return false;
	}
	else if(frmData.optModify[1].status==true)
	{
		if(frmData.ModifyByFieldID.selectedIndex<=0)
		{
			if(frmData.ModifyByFieldID.length>1)
				alert("您选择按字段值修改,但未选择字段,请选择。");
			else
				alert("您选择按字段值修改,但没有类型匹配的字段供选择,无法这样修改。");
			return false;
		}
	}
	else
	{
		if(JTrim(frmData.FormulaDesc.value)=='')
		{
			alert("您选择按公式计算修改,但未设置公式,请设置。");
			return false;
		}
	}		
	return true;
}

function Pre() 
{
	DisableButton();
	window.navigate("batchstep1.asp")
}

function Next()
{
	if(LocalDC()==true)
	{
		DisableButton();
		frmData.ValueStr.value=frmData.all[FieldID[0]].value;
		frmData.FieldByStr.value=frmData.ModifyByFieldID.value;
		document.frmData.target ="_self";
		document.frmData.action="batchstep3.asp";
		document.frmData.submit();
	}
}

function CancelMe() 
{
	var discard;
	discard=confirm("放弃批量修改吗?");
	if(discard==true)
	{
		parent.window.returnValue = "";
		parent.window.close();
	}
}

function DisableButton() 
{
	frmData.btnCancel.disabled =true;
	frmData.btnPre.disabled =true;
	frmData.btnNext.disabled =true;
}
function window_onload() {
	Init();
	optModifyChange();
}

//-->
</script>
<%

	dim WExcel
	set WExcel=server.CreateObject("WExcel.Sheet")

	dim SheetID
	SheetID=Request.Cookies("Temp")("SheetID")

	dim Exist
	Exist=WExcel.SheetExist(cint(UserID),cint(SheetID))
	CheckErr
	if Exist=false then
		Response.Redirect "/hcgis/notfound.asp?Name=数据表&Depth=2"
	end if

	dim FieldID,ModifyRange,CurSelectedRows,PageRows
	dim optModify,ValueStr,FieldByStr,FormulaStr
	if Request.Form("ModifyRange")<>"" then
		'说明从step1来的
		FieldID=Request.Form("FieldID")
		'如果没有改变字段,沿用已有的修改值
		if FieldID=Request.Cookies("Temp")("BatchFieldID") then
			optModify=Request.Cookies("Temp")("optModify")
			ValueStr=Request.Cookies("Temp")("ValueStr")
			FieldByStr=Request.Cookies("Temp")("FieldByStr")
			FormulaStr=Request.Cookies("Temp")("FormulaStr")
		else
			Response.Cookies("Temp")("BatchFieldID")=FieldID
			optModify=1
			ValueStr=""
			FieldByStr=0
			FormulaStr=""
			Response.Cookies("Temp")("optModify")=optModify
			Response.Cookies("Temp")("ValueStr")=ValueStr
			Response.Cookies("Temp")("FieldByStr")=FieldByStr
			Response.Cookies("Temp")("FormulaStr")=FormulaStr
		end if
		ModifyRange=Request.Form("ModifyRange")
		CurSelectedRows=Request.Form("CurSelectedRows")
		PageRows=Request.Form("PageRows")
		Response.Cookies("Temp")("ModifyRange")=ModifyRange
		Response.Cookies("Temp")("CurSelectedRows")=CurSelectedRows
		Response.Cookies("Temp")("PageRows")=PageRows
	else
		'说明从step3返回来的
		FieldID=Request.Cookies("Temp")("BatchFieldID")
		optModify=Request.Cookies("Temp")("optModify")
		ValueStr=Request.Cookies("Temp")("ValueStr")
		FieldByStr=Request.Cookies("Temp")("FieldByStr")
		FormulaStr=Request.Cookies("Temp")("FormulaStr")
	end if

	dim BodyStr,GCScript
	WExcel.GetBatchModifyPage cint(UserID),cint(SheetID),cint(FieldID),cint(optModify),cstr(ValueStr),cint(FieldByStr),cstr(FormulaStr),BodyStr,GCScript
	Response.Write GCScript
	CheckErr
%>
<HTML>
<HEAD>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</HEAD>
<BODY LANGUAGE=javascript onload="return window_onload()">
	<form METHOD="post" name="frmData">
		<table width="70%" align=center border=0 cellPadding=0 cellSpacing=1>
			<tr height=35>
				<td colspan=2>
					<b>第2步:设定修改值</b>
				</td>
			</tr>
			<tr height=185>
				<td>
					<%=BodyStr%>
				</td>
			</tr>
			<tr height=40>
				<td>
					<p id=Prompt>说明:数值、文字、日期和下拉框型字段可按公式值修改。</p>
				</td>
			</tr>
			<tr height=40 valign=bottom>
				<td colspan=6>
					<table align=center width="71%">
						<tr>
							<td width="33%"><input id="btnCancel" type="button" value="取消" name="btnCancel" style="cursor:hand; WIDTH: 65px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return CancelMe()"></td>
							<td width="33%"><input id="btnPre" type="button" value="上一步" name="btnPre" style="cursor:hand; WIDTH: 65px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Pre()"></td>
							<td width="33%"><input id="btnNext" type="button" value="下一步" name="btnNext" style="cursor:hand; WIDTH: 65px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Next()"></td>
						</tr>
					</table>
				</td>
			</tr>
			<input TYPE="hidden" NAME="CoID" value="<%=CoID%>">
			<input TYPE="hidden" NAME="SheetID" value="<%=SheetID%>">
		</table>
	</form>
</BODY>
</HTML>

⌨️ 快捷键说明

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