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

📄 eaddeq.asp.bak

📁 物业管理和办公自动化系统
💻 BAK
字号:
<%
'************************************************************************************************
' 文件名: eaddeq.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
' 创建人 : zhouyun
' 日 期 : 2002-11-10
' 
' 修改历史 :
'   ****年**月**日 ****** 修改内容:**************************************************
' 功能描述 : add equipment
'  版 本 :
'************************************************************************************************
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/commonpage.inc" -->
<!-- #include file="einclude.asp" -->
<!-- #include file="eaddeq.inc" -->

<%
'call CheckSecurity(ID_EQUIPMENT)

'********************************************************************************************************
' 服务器端代码

'********************************************************************************************************
' 建立数据库连接
dim conn
Set conn=DBConnection
' 定义全局变量:
'			pSysId:	传递到本页面的参数
Dim gSid : gSid = GetParam("id")
Dim gEid : gEid = GetParam("eid")
Dim gPid : gPid = GetParam("pid")

If gEid="" and gSid = "" Then
	ww "请在左边的系统树中选择需新增设备的系统!"
	
	response.end
End If
'********************************************************************************************************
' 如果是提交,则调用函数InsertSys或UpdateSys或DeleteSys更新数据库
Dim sFormAction
if UCase(Request.ServerVariables("REQUEST_METHOD") = "POST") then
	sFormAction = GetParam("FormAction")
	select case sFormAction
	case "insert":
		call AddEq()
	case "insertchild":
		call AddChildEq()
	case "update":
		call UpdateEq()
	case "delete":
		call DeleteEq()
	case "replace":
		call ReplaceEq()
	end select
end if

%>

<html>
<head>
<title>上海信息大楼	Shanghai Information Tower</title>
<meta http-equiv="Content-Type"	content="text/html;charset=gb2312">
<link rel="stylesheet" href="../include/common.css" type="text/css">
<script language="javascript" src="eq.js"></script>

<!-- 日历 -->
<IFRAME style="display:none;position:absolute;width:148;height:194;z-index=100" ID="CalFrame" MarginHeight=0 MarginWidth=0 noresize frameborder=0 scrolling=no src="../include/cal/calendar.htm"></IFRAME>
<script language="javascript" src="../include/cal/calendar.js"></script>
<script for=document event="onclick()">
<!--
document.all.CalFrame.style.display="none";
//-->
</script>
<!-- 日历 -->

<script language="javascript">
function OnFloorChange()
{
	var sFloor, sRoomNo;
	var objFloor, objRoom;

	// 楼层和机房编码 <select> 对象
	objFloor = document.all.floor;				// 楼层
	objRoom = document.all.room_no;		// 机房选项对象

	// 选中的楼层
	sFloor = objFloor.options[objFloor.selectedIndex].value;

	// 清空机房编号选项,然后从备选机房编号列表中逐个检查是否和楼层编码一致,如果一致,则放入选项列表
	objRoom.innerHTML = "";					
	for (var j=0; j < document.all.roomlist.options.length; j++)
	{
		// 机房编号
		sRoomNo = document.all.roomlist.options[j].value;

		// 如果机房编号和楼层编号一致,则放到创建一个<option>选项
		if (sRoomNo.substr(0,2) == sFloor) 
			objRoom.options[objRoom.options.length] = new Option(sRoomNo, sRoomNo, 0, 0)
	}
}
</script>

</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >

<%
'Response.Write OuterTableHeader
'Response.Write HeaderWithMenu(conn)
'Response.Write InnerTableHeader
'********************************************************************************************************
' 主体从这里开始

'-------------------------------------------------------------------------------------------------------------------------------------------------
If IsEmpty(GetParam("eid")) Then
	ww InsertTable()
Else
	ww UpdateTable()
End If
' 主体到这里结束
'********************************************************************************************************
'Response.Write InnerTableTailer
'Response.Write Footer
'Response.Write OuterTableTailer
'response.end
Disconnect(conn)
%>

<script language="javascript">
// 在页面下载结束之前设置缺省选中的值
if ("<%=pFloor%>" == "")
	document.all.floor.selectedIndex = 0;					// 如果是新增,则选中第一个楼层
else
	document.all.floor.value = "<%=pFloor%>";		// 如果是修改,则选中相应的楼层值
OnFloorChange();


if ("<%=pRoomNo%>" != "")
	document.all.room_no.value = "<%=pRoomNo%>";		// 机房编号则选中相应的值
</script>

</body>
</html>

⌨️ 快捷键说明

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