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

📄 cangku_add.asp

📁 下了就能用 不信你看一下 一定能用的
💻 ASP
字号:
<!--#include file="../conn.asp"-->
<%
  dim ckadd
    ckadd=douhao(trim(request("ckadd")))
    storehouse_id=douhao(trim(request("storehouse_id")))
	storehouse_name=douhao(trim(request("storehouse_name")))
	storehouse_address=douhao(trim(request("storehouse_address")))
	storehouse_type=douhao(trim(request("storehouse_type")))
	storehouse_capacity=douhao(trim(request("storehouse_capacity")))
	storehouse_manager=douhao(trim(request("storehouse_manager")))
	storehouse_tel=douhao(trim(request("storehouse_tel"))) '电话
	storehouse_remark=douhao(trim(request("storehouse_remark")))

if ckadd<>"" then
  set rs=server.createobject("adodb.recordset")
  rs.open "select * from ht_Storehouse where storehouse_name='"&storehouse_name&"' or storehouse_id='"&storehouse_id&"'" ,conn,1,1
  if not rs.eof then
     response.write "<script language='javascript'>alert('编号或名称已存在!请不要重复添加!');history.back();</script>"
     response.end
  else
  end if
  rs.close
  set rs=nothing
end if
if ckadd="确定"  then

   conn.execute "insert into ht_Storehouse (storehouse_id,storehouse_name,storehouse_address,storehouse_type,storehouse_capacity,storehouse_manager,storehouse_tel,storehouse_remark) values ('"&storehouse_id&"','"&storehouse_name&"','"&storehouse_address&"','"&shorehouse_type&"','"&storehouse_capacity&"','"&storehouse_manager&"','"&storehouse_tel&"','"&storehouse_remark&"')"
   response.write "<script language='javascript'>window.opener.location.href = window.opener.location.href;window.close();</script>"
elseif ckadd="新增" then
  conn.execute "insert into ht_Storehouse (storehouse_id,storehouse_name,storehouse_address,storehouse_type,storehouse_capacity,storehouse_manager,storehouse_tel,storehouse_remark) values ('"&storehouse_id&"','"&storehouse_name&"','"&storehouse_address&"','"&storehouse_type&"','"&storehouse_capacity&"','"&storehouse_manager&"','"&storehouse_tel&"','"&storehouse_remark&"')"
   response.write "<script language='javascript'>window.opener.location.href = window.opener.location.href;</script>"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>基础资料维护--仓库增加</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/body.css" rel="stylesheet" type="text/css">
 <script language="javascript">
			function check(){
			if (document.ck.storehouse_id.value==''){
			alert('请输入仓库编号!');
			document.ck.storehouse_id.focus();
			return false;
			
			history.back();
			}
			if (document.ck.storehouse_name.value==''){
			alert('请输入仓库名称!');
			document.ck.storehouse_name.focus();
			return false;
			history.back();
			}
			return true;
			}
			</script>
</head>

<body leftmargin="0" topmargin="00" marginwidth="0" marginheight="0">
<table width="100%" height="156" border="0" cellspacing="0">
  <tr> 
    <td height="156" class="borderon"> 
      <form action="cangku_add.asp" method="post" name="ck" id="ck">
        <table width="377" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="78"><div align="right">仓库编号:</div></td>
            <td colspan="3"><input name="storehouse_id" type="text" id="storehouse_id" size="5"></td>
          </tr>
          <tr>
            <td><div align="right">仓库名称:</div></td>
            <td colspan="3"><input name="storehouse_name" type="text" id="storehouse_name" size="25"></td>
          </tr>
          <tr>
            <td><div align="right">仓库地址:</div></td>
            <td colspan="3"><input name="storehouse_address" type="text" id="storehouse_address" size="30"></td>
          </tr>
          <tr>
            <td><div align="right">仓库容量:</div></td>
            <td width="125"><input name="storehouse_capacity" type="text" size="15"></td>
            <td width="70">仓库类型:</td>
            <td width="104"><input name="storehouse_type" type="text" id="storehouse_type" size="10"></td>
          </tr>
          <tr>
            <td><div align="right">管 理 员:</div></td>
            <td><input name="storehouse_manager" type="text" id="storehouse_manager" size="15"></td>
            <td>联系电话:</td>
            <td><input name="storehouse_tel" type="text" id="storehouse_tel" size="12"></td>
          </tr>
          <tr>
            <td><div align="right">备  注:</div></td>
            <td colspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td colspan="4"><div align="center">
                <textarea name="storehouse_remark" cols="40" rows="5" id="storehouse_remark"><%=storehouse_remark%></textarea>
            </div></td>
          </tr>
          <tr>
            <td height="30" colspan="4" valign="bottom"><div align="center">
              <input name="ckadd" type="submit" id="ckadd" onClick="javascript:return check();" value=" 确定 ">
              <input type="button" name="Submit2" value=" 取消 " onClick="javascript:window.close();">
              <input name="ckadd" type="submit" id="ckadd" onClick="javascript:return check();" value=" 新增 ">
</div></td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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