📄 goods_update.asp
字号:
<%
'##############################################################################
'#
'# 文 件 名 : goods_update.asp
'#
'#
'# 创 建 人 : yaoxiaohui
'# 日 期 : 2002-11-7
'#
'# 修改历史 : ****年**月**日 ******
'# 修改内容 : **************************************************
'#
'# 功能描述 : 修改库存物品或设备信息
'# 版 本 : v1.0
'#
'# Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'##############################################################################
'------------------------------------------------------------------------------
'---- 服务器端设置
'------------------------------------------------------------------------------
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- include files begin -->
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="../include/commonpage.inc" -->
<!-- #include file="goods_update.inc" -->
<!-- include files end -->
<%
'##############################################################################
'---- 服务器端代码
'##############################################################################
call CheckSecurity()
'------------------------------------------------------------------------------
'---- 用户权限检查
'------------------------------------------------------------------------------
if hasright(ID_STOCK) < RIGHT_WRITE then
Response.Clear
Response.Redirect "../include/error.asp?error=只有仓库管理员才能对库存进行操作!"
Response.end
end if
'******************************************************************************
'---- 建立数据库连接
'------------------------------------------------------------------------------
dim conn
set conn = DBConnection
'******************************************************************************
'---- 分页相关的变量定义
'------------------------------------------------------------------------------
dim pGoodsID : pGoodsID = GetParam("id")
dim sFileName :sFileName = "goods_update.asp"
if IsEmpty(pGoodsID) then
Response.Clear
Server.Transfer("../common/error.asp")
Response.end
end if
if UCase(Request.ServerVariables("REQUEST_METHOD") = "POST") then
dim sFormAction : sFormAction = GetParam("FormAction")
select case sFormAction
case "update"
call UpdateBasic()
case "cancel"
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">
<style type="text/css">
.conts {display:none}
input {color:blue;border-width:1}
</style>
<OBJECT id=closes classid="CLSID:ADB880A6-D8FF-11CF-9377-00AA003B7A11"><param name="Command" value="close"></OBJECT>
<script language="javascript">
///////////////////////////////////////////////////////////////////////////////
function mover()
{
var obj = window.event.srcElement;
obj.style.color = 'blue';
}
///////////////////////////////////////////////////////////////////////////////
function mout()
{
var obj = window.event.srcElement;
obj.style.color = 'black';
}
///////////////////////////////////////////////////////////////////////////////
function btnUpdate_OnClick()
{
if (isCharsInBag(frmDetail.quantity.value,"0123456789")==false)
{alert("库存数输入数字格式不对!");frmDetail.quantity.focus();return;}
if (isCharsInBag(frmDetail.min_quantity.value,"0123456789")==false)
{alert("最小库存输入数字格式不对!");frmDetail.min_quantity.focus();return;}
frmDetail.FormAction.value = "update";
frmDetail.submit();
}
///////////////////////////////////////////////////////////////////////////////
function btnCancel_OnClick()
{
frmDetail.submit();
window.parent.location.href="goods_update.asp?id=<%=pGoodsID%>";
}
///////////////////////////////////////////////////////////////////////////////
function closethis()
{ closes.click(); return; } // 关闭窗口
///////////////////////////////////////////////////////////////////////////////
function isCharsInBag (s, bag)
{
var i;
// Search through string's characters one by one.
// If character is in bag, append to returnString.
for (i = 0; i < s.length; i++)
{
// Check that current character isn't whitespace.
var c = s.charAt(i);
if (bag.indexOf(c) == -1) return false;
}
return true;
}
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="../images/bg/bg0.jpg">
<br>
<%
'response.write sSQL & sWhere & sOrderby & "<br>" : response.end
Response.Write OuterTableHeader
Response.Write HeaderWithMenu
Response.Write InnerTableHeader
'******************************************************************************
'---- 主体从这里开始
'------------------------------------------------------------------------------
Response.Write TableFormGoods
'------------------------------------------------------------------------------
'---- 主体到这里结束
'******************************************************************************
Response.Write InnerTableTailer
Response.Write Footer
Response.Write OuterTableTailer
Disconnect(conn)
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -