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

📄 ywrc.asp

📁 一个学校的医务管理
💻 ASP
字号:
<!--#include file="conn1.asp"-->
<%
yname=request("yname")
unit=request("unit")
cnt=request("cnt")
rdate=request("rdate")
jprice=request("jprice")
cprice=request("cprice")
lb=request("lb")
if yname<>"" then
	sql="insert into yw(yname,unit,cnt,rdate,jprice,cprice,lb)values('"& yname &"','"& unit &"','"& cnt &"','"& rdate &"','"& jprice &"','"& cprice &"','"& lb &"')"
	conn.execute sql
	td="您的数据已成功添加!"
end if 
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css">
<title>学生健康档案</title>
<style type="text/css">
<!--
body {
	background-color: #d6dff7;
}
.style2 {color: #990000}
-->
</style>
<script language="javascript">
function check(){
if(form1.yname.value==""){
alert("药物名称不能为空!");
form1.yname.focus;
return false;
}
else if(form1.unit.value==""){
alert("请输入药物的单位!");
form1.unit.focus;
return false;
}
else if(form1.cnt.value==""){
alert("请输入药物的数量!");
form1.cnt.focus;
return false;
}
else if(form1.jprice.value==""){
alert("请输入此药物的进价!");
form1.jprice.focus;
return false;
}
else if(form1.cprice.value==""){
alert("请输入此药物的出价!");
form1.cprice.focus;
return false;
}
else if(form1.lb.value==""){
alert("请选择药物的类别!");
form1.lb.focus;
return false;
}
else {
return true;
}
}
</script>
</head>

<body align="center">
 <table width="564" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="564" height="50"><br></td>
  </tr>
  <tr>
    <td><form name="form1" method="post" action="ywrc.asp" onSubmit="return check()" >
      -----&gt; 药物入库<tr>
          <td><hr size="1"align="left" noshade></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td align="center" valign="top"><br>
		  <%id=request("id")
if id<>"" then
	sql="select * from yw where id="&id
	set rs=conn.execute(sql)
%>
            <table width="485" border="1" cellpadding="0" cellspacing="0" bordercolor="#BFCDF2" align="center">
            <tr>
              <td width="564" height="32"> 名  称 :                <input name="yname" type="text" id="yname" <%if rs("yname")<>"" then%>value="<%=rs("yname")%>"<%end if%> size="30">
      </td>
            </tr>
            <tr>
              <td height="38"> 单  位 :                <input name="unit" type="text" id="cnt32" size="11" <%if rs("unit")<>"" then%>value="<%=rs("unit")%>"<%end if%>>       
      数 量:
      
      <input name="cnt" type="text" id="cnt23" size="10" <%if rs("cnt")<>"" then%>value="<%=rs("cnt")%>"<%end if%>>              </td>
            </tr>
			           <tr>
			             <td align="left" valign="middle" height="38">  入库时间:
                           <input name="rdate" type="text" id="rdate" <%if rs("rdate")<>"" then%>value="<%=rs("rdate")%>"<%end if%> size="15">
(请用格式 04-05-06 即为04年5月6日) </td>
                </tr>
			           <tr>
			             <td align="left" valign="middle" height="38"> 进  价 : 
			               <input name="jprice" type="text" id="yw12" size="15" <%if rs("jprice")<>"" then%>value="<%=rs("jprice")%>"<%end if%>>
 元</td>
                </tr>
			           <tr>
			             <td align="left" valign="middle" height="38">
			                  出  价 :			                   <input name="cprice" type="text" id="cprice" size="15" <%if rs("cprice")<>"" then%>value="<%=rs("cprice")%>"<%end if%>>	 
	 
	元</td>
            </tr>
			           <tr>
			             <td align="left" valign="middle" height="38"> 类  别 :
                           <select name="lb" id="select">
                             <option >请选择</option>
                             <option value="针剂" <%if rs("lb")="针剂" then%>selected<%end if%>>针剂</option>
                             <option value="消毒剂"<%if rs("lb")="消毒剂" then%>selected<%end if%>>消毒剂</option>
                             <option value="辅料类"<%if rs("lb")="辅烊类" then%>selected<%end if%>>辅烊类</option>
                             <option value="口服药"<%if rs("lb")="口服药" then%>selected<%end if%>>口服药</option>
                             <option value="中成药"<%if rs("lb")="中成药" then%>selected<%end if%>>中成药</option>
                             <option value="器械类"<%if rs("lb")="器械类" then%>selected<%end if%>>器械类</option>
                           </select></td>
            </tr>
			           <tr>
			             <td align="center" valign="middle" height="38"><input type="submit" name="Submit" value="提交">   
			               <input type="reset" name="Submit2" value="重置"> 
		                 </td></table>
          </tr></form>
<tr>
              <td align="center" valign="top" class="style2"> <%if td<>"" then%><%=td%><%end if%></td>
</tr>
        
        <tr>
          <td height="65" align="center">&nbsp;</td>
        </tr>
        <tr>
          <td align="center"><!--#include file="foot.asp"--></td>

</tr></table>
<%sql="delete * from yw where id="&id
conn.execute sql%>
<%else%>

<%'_____________________________________用户输入时%>
            <table width="485" border="1" cellpadding="0" cellspacing="0" bordercolor="#BFCDF2" align="center">
            <tr>
              <td width="564" height="32"> 名  称 :                <input name="yname" type="text" id="yname"  size="30">
      </td>
            </tr>
            <tr>
              <td height="38"> 单  位 :                <input name="unit" type="text" id="cnt32" size="11" >       
      数 量:
      
      <input name="cnt" type="text" id="cnt23" size="10" >              </td>
            </tr>
			           <tr>
			             <td align="left" valign="middle" height="38">  入库时间:
                           <input name="rdate" type="text" id="rdate"  size="15">
(请用格式 04-05-06 即为04年5月6日) </td>
                </tr>
			           <tr>
			             <td align="left" valign="middle" height="38"> 进  价 : 
			               <input name="jprice" type="text" id="yw12" size="15" >
 元</td>
                </tr>
			           <tr>
			             <td align="left" valign="middle" height="38">
			                  出  价 :			                   <input name="cprice" type="text" id="cprice" size="15" >	 
	 
	元</td>
            </tr>
			           <tr>
			             <td align="left" valign="middle" height="38"> 类  别 :
                           <select name="lb" id="select">
                             <option selected>请选择</option>
                             <option value="针剂" >针剂</option>
                             <option value="消毒剂">消毒剂</option>
                             <option value="辅料类">辅烊类</option>
                             <option value="口服药">口服药</option>
                             <option value="中成药">中成药</option>
                             <option value="器械类">器械类</option>
                           </select></td>
            </tr>
			           <tr>
			             <td align="center" valign="middle" height="38"><input type="submit" name="Submit" value="提交">   
			               <input type="reset" name="Submit2" value="重置"> 
		                 </td></table>
          </tr></form>
<tr>
              <td align="center" valign="top" class="style2"> <%if td<>"" then%><%=td%><%end if%></td>
</tr>
        
        <tr>
          <td height="65" align="center">&nbsp;</td>
        </tr>
        <tr>
          <td align="center"><!--#include file="foot.asp"--></td>

</tr></table>
<%end if%>
</body>
</html>

⌨️ 快捷键说明

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