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

📄 warehouse_modify.asp

📁 在线医药销售管理系统
💻 ASP
字号:
<%@ Language=VBScript %>
<%
'***********************************
'修改仓库信息
'入口参数:edit_whs_id( 要修改的仓库编号)
'出口参数:
'1。Tstr_whs_id(仓库编号)
'2。Tstr_whs_name(仓库名称)
'3。Tstr_whs_addr(仓库地址)
'4.Tstr_whs_telephone(联系电话)
'5 Tstr_whs_zipcode(邮政编号)
'作者:蒋柳   日期:2001。6。4
'***********************************
%>
<HTML>
<%
'取得参数
Tedit_whs_id=Request("tedit_whs_id")
%>
<%
'数据库连接
if Session("Gs_StaffID")="" then
Response.Write "网页已过期,请重试!"
Response.End 
end if 
dim DBconn
set DBconn=server.CreateObject("ADODB.Connection")
DBconn.Open Application("Connection2_ConnectionString")
'取得数据
set Rswhs=server.CreateObject ("ADODB.Recordset")
rswhs.CursorLocation=3
Sql="select whs_id,whs_name,whs_addr,whs_telephone,whs_zipcode from Basic_warehouse where whs_id='"&tedit_whs_id&"'"
Rswhs.Open Sql,DBconn,2
%>
<HEAD>
<TITLE>修改仓库信息</TITLE>
<script language="vbscript">
<!--
Function checkTel(checkTel_checkStr)
  dim checkTel_checkOK
  dim checkstr
  dim checkTel_decPoints
  dim checkTel_allNum
  checkTel_checkOK = "0123456789_#*** -,"
  checkstr=trim(checkTel_checkStr)
  checkTel = true
  checkTel_decPoints = 0
  checkTel_allNum = ""
  for i = 1 to len(checkStr)
    ch = mid(checkStr,i,1)
    for j = 1 to len(checkTel_checkOK)
      if ch = Mid (checkTel_checkOK,j,1) then
         Exit For        
      end if
      if j = len(checkTel_checkOK) then
         checkTel = false
         Exit For
      end if
    next
  next
End function
Function checknum(checkNum_checkStr)
  dim checkNum_checkOK
  dim checkstr
  dim checkNum_decPoints
  dim checkNum_allNum
  checkNum_checkOK = "0123456789."
  checkstr=trim(checkNum_checkStr)
  checknum = true
  checkNum_decPoints = 0
  checkNum_allNum = ""
  for i = 1 to len(checkStr)
    ch = Mid (checkStr,i,1)
    for j = 1 to len(checkNum_checkOK)
      if ch = Mid (checkNum_checkOK,j,1) then
         Exit For        
      end if
      if j = len(checkNum_checkOK) then
         checknum = false
         Exit For
      end if
    next
  next
End function
 
Function Submit() 
	frm_whs_new.Submit 	
End Function

Function SubmitForm()
	If Validate = false Then
		Exit Function
	else
		Submit()
	End If
End Function
Function Validate()
Validate = true

  if trim(document.frm_whs_new.Tstr_whs_name.value) = "" then
    msgbox "请输入仓库名称!",,"CMS系统提示"
    Validate = False	
    Exit Function
  End If
  if trim(document.frm_whs_new.Tstr_whs_addr.value) = "" then
    msgbox "请输入仓库地址!",,"CMS系统提示"
    Validate = False	
    Exit Function
  End If
  if trim(document.frm_whs_new.Tstr_whs_addr.value) = "" then
    msgbox "请输入仓库地址!",,"CMS系统提示"
    Validate = False	
    Exit Function
  End If
  if trim(document.frm_whs_new.Tstr_whs_telephone) = "" then
    msgbox "请输入仓库联系电话!",,"CMS系统提示"
    Validate = False	
    Exit Function
  End If
  if trim(document.frm_whs_new.Tstr_whs_zipcode.value) = "" then
    msgbox "请输入仓库地址的邮政编码!",,"CMS系统提示"
    Validate = False	
    Exit Function
  End If
  
 if checknum(document.frm_whs_new.Tstr_whs_zipcode.value) = False then
	msgbox "邮政编号必须为数字,请检查后重新输入!",,"Cms系统提示!"
	Validate = False
	Exit Function
  End if
 if checkTel(document.frm_whs_new.Tstr_whs_telephone.value) = False then
	msgbox "你输入的电话号码有误,请检查后重新输入!",,"Cms系统提示"
	Validate = False
	Exit Function
  End if
End function
-->
</script>

</HEAD>
<BODY>
<p><font size="5">仓库维护>>修改仓库信息</font></p>
<hr>
<form method="post" action="warehouse_modify_opr.asp" name=frm_whs_new >
 <input type= hidden name=tedit_whs_id value=<%=(Tedit_whs_id)%>>
 
  <table width="75%" border="0">
    <tr> 
      <td width="170"> 
        <div align="right">仓库代码:</div>
      </td>
      <td colspan="3" width="82%"> 
      
        <%Response.Write  rswhs("whs_id")%>
      </td>
    </tr>
    <tr> 
      <td width="170" height="2"> 
        <div align="right">仓库名称:</div>
      </td>
      <td colspan="3" width="82%" height="2"> 
        <input type="text" name="Tstr_whs_name" size="30" maxlength=20 value="<%=Server.HTMLEncode(rswhs("whs_name"))%>">***
      </td>
    </tr>
    <tr> 
      <td width="170"> 
        <div align="right">仓库地址:</div>
      </td>
      <td colspan="3" width="82%"> 
        <input type="text" name="Tstr_whs_addr" size="60" maxlength=30  value="<%=Server.HTMLEncode(rswhs("whs_addr"))%>">***
      </td>
    </tr>
    <tr> 
      <td width="170" height="15"> 
        <div align="right">联系电话:</div>
      </td>
      <td colspan="3" height="15" width="82%" > 
        <input type="text" name="Tstr_whs_telephone" maxlength=20 value="<%=Server.HTMLEncode(rswhs("whs_telephone"))%>">***
      </td>
    </tr>
    <tr> 
      <td width="170"> 
        <div align="right">邮政编码:</div>
      </td>
      <td colspan="3" width="82%"> 
        <input type="text" name="Tstr_whs_zipcode" maxlength=6 value="<%=Server.HTMLEncode(rswhs("whs_zipcode"))%>">***
      </td>
    </tr>
    <tr> 
      <td colspan="4"> 
        <div align="center">
          <hr>
        <INPUT id=submit1 name=submit1 type=button value=提交 onclick='vbscript:SubmitForm()'>
          <input type="button" name="Submit2" value="返回" onclick='window.location="warehouse_list.asp" '>
        </div>
      </td>
    </tr>

  </table>
</form>

</BODY>
<%
   DBconn.Close 
%>
</HTML>

⌨️ 快捷键说明

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