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

📄 yptj.jsp

📁 jsp写的一个简单的售药系统(系统需求分析).采用sql2000数据库,通过odbc连接
💻 JSP
字号:
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="Connections/syxt.jsp" %>
<%
Driver DriverRecordset1 = (Driver)Class.forName(MM_syxt_DRIVER).newInstance();
Connection ConnRecordset1 = DriverManager.getConnection(MM_syxt_STRING,MM_syxt_USERNAME,MM_syxt_PASSWORD);
PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement("SELECT * FROM dbo.ypms");
ResultSet Recordset1 = StatementRecordset1.executeQuery();
boolean Recordset1_isEmpty = !Recordset1.next();
boolean Recordset1_hasData = !Recordset1_isEmpty;
Object Recordset1_data;
int Recordset1_numRows = 0;
%>
<%
int Repeat1__numRows = -1;
int Repeat1__index = 0;
Recordset1_numRows += Repeat1__numRows;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>药品资料</title>
<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>

	<script type="text/javascript">
		
		//定义临时参数id
var param_show_oldid="";
var param_show_number=0;
//鼠标移入到td区域,打开‘参数纠错’
function open_modify_div(param_id,kb){
	if (!(document.getElementById(param_id+'_3'))){
		if (param_show_number==1){
				var param_span_show='';
				param_span_show = document.getElementById(param_show_oldid+'_3');
				document.getElementById(param_show_oldid+'_2').removeChild(param_span_show);
				param_show_number--;	
				param_show_oldid="";
			}
		param_show_number++;
		param_show_oldid = param_id;
		var param_span_show='';
		param_span_show += '<span id="'+param_id+'_3" style="float:right;" bgcolor="#ffffff">';
		param_span_show += '<img src="./e2.gif" style="margin:7px">';
		param_span_show += '<a href="./xgyp.jsp?ypbh='+kb+'">参数纠错</a></span>';
		document.getElementById(param_id+'_2').innerHTML = param_span_show + document.getElementById(param_id+'_2').innerHTML;
	}
			//<span id="param_4871_3" style="float:right;" class="param_td1" bgcolor="#ffffff"><img src="http://icon.zol.com.cn/detail0802/e2.gif" style="margin:7px"><a href="javascript:modify_param('param_4871','133527','1');">参数纠错</a></span>
	return false;
}

		
		</script>


</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <label>  <br />
  </label>
  <table width="719" height="68" border="1" id="02">

    <tr>
      <th height="23" scope="col">药品编号</th>
      <th scope="col">品名</th>
      <th scope="col">规格</th>
      <th scope="col">单位</th>
      <th scope="col">成本单价</th>
      <th scope="col">销售单价</th>
      <th scope="col">有效期</th>
    </tr>
    
      <% while ((Recordset1_hasData)&&(Repeat1__numRows-- != 0)) {
	  String ypbhs=Recordset1.getObject("ypbh").toString();
	  
	   %>
       <tr onmouseover="open_modify_div('param_<%=ypbhs%>','<%=ypbhs%>')"> <td height="37" align="center"  id="param_<%=ypbhs%>_2"><%=ypbhs%></td>
        <td align="center"><%=(((Recordset1_data = Recordset1.getObject("pm"))==null || Recordset1.wasNull())?"":Recordset1_data)%></td>
        <td align="center"><%=(((Recordset1_data = Recordset1.getObject("gg"))==null || Recordset1.wasNull())?"":Recordset1_data)%></td>
        <td align="center"><%=(((Recordset1_data = Recordset1.getObject("dw"))==null || Recordset1.wasNull())?"":Recordset1_data)%></td>
        <td align="center"><%=(((Recordset1_data = Recordset1.getObject("cbdj"))==null || Recordset1.wasNull())?"":Recordset1_data)%></td>
        <td align="center"><%=(((Recordset1_data = Recordset1.getObject("xsdj"))==null || Recordset1.wasNull())?"":Recordset1_data)%></td>
        <td align="center"><p><%=(((Recordset1_data = Recordset1.getObject("yxq"))==null || Recordset1.wasNull())?"":Recordset1_data)%></p></td></tr>
        <%
  Repeat1__index++;
  Recordset1_hasData = Recordset1.next();
}
%>

  </table>
  <label><br />
  <br />  
  <br />
  </label>
  <input name="000" type="submit" id="000" onclick="MM_goToURL('parent','addyp.jsp');return document.MM_returnValue" value="添加记录" />
</form>
</body>
</html>
<%
Recordset1.close();
StatementRecordset1.close();
ConnRecordset1.close();
%>

⌨️ 快捷键说明

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