hzj_inputaction.jsp
来自「服务器tomcat 数据库mysql Hospital Managemen」· JSP 代码 · 共 486 行 · 第 1/2 页
JSP
486 行
<%@ page language="java" import="java.sql.*, java.util.*" %>
<%!
Connection con=null;
int input_id=0;
int medicine_id=0;
int medicine_number=0;
String place=null;
int inputer_id=0;
java.sql.Date input_date=null;
Calendar rightNow = null;
java.util.Date now=null;
float unit_price=0;
float total_price=0;
%>
<HTML>
<HEAD>
<TITLE>Hospital Management System</TITLE>
<!--CharSet-->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<link rel="stylesheet" href="images/CSS.CSS" type="text/css">
<style type="text/css">
<!--
.STYLE1 {
font-size: 18px;
font-weight: bold;
}
-->
</style>
<SCRIPT LANGUAGE=javascript type="text/javascript">
<!--
function window_onload() {
<!--Page.OnLoad-->
}
//-->
</SCRIPT>
</HEAD>
<BODY BGCOLOR=#CC9933 leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--Counter-->
<!--Something Here-->
<%
try{
input_id=Integer.parseInt(request.getParameter("input_id"));
medicine_id=Integer.parseInt(request.getParameter("medicine_id"));
medicine_number=Integer.parseInt(request.getParameter("medicine_number"));
inputer_id=Integer.parseInt(request.getParameter("inputer_id"));
place=request.getParameter("input_place");
unit_price=Float.parseFloat(request.getParameter("unit_price"));
total_price=unit_price*medicine_number;
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql:///lenovo_db?user=root&password=amethyst&useUnicode=true&characterEncoding=gb2312");
PreparedStatement ps=con.prepareStatement("insert into input values(?,?,?,?,?,?,?,?)");
ps.setInt(1,input_id);
ps.setInt(2,medicine_id);
ps.setInt(3,medicine_number);
ps.setString(4,place);
ps.setInt(5,inputer_id);
rightNow = Calendar.getInstance();
now=rightNow.getTime();
input_date=new java.sql.Date(now.getTime());
ps.setDate(6,input_date);
ps.setFloat(7,unit_price);
ps.setFloat(8,total_price);
ps.executeUpdate();
ps.close();
%>
<%
}
catch(Exception ex)
{
System.out.println(ex);
}
%>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" height="203">
<tr>
<td colspan="3" height="20"><img src="images/index_top1.gif" width="778" height="20"></td>
</tr>
<tr>
<td height="165" width="50"><img src="images/index_top2.gif" width="50" height="165"></td>
<td height="165" width="165" background="images/01.gif"><img src="images/index_pic.gif" width="165" height="165"></td>
<td height="165" width="563" background="images/index_top3.gif" valign="top"><table border="0" cellspacing="0" cellpadding="0" width="563" align="center">
<tr>
<td height="25" width="303"><font color="#FFFFFF"><b></b></font>
<div align="center"><font color="#000000"><b><font size="5">
<!--Your Company Name-->
Hospital Management System </font></b></font></div></td>
<td height="25" width="260"> </td>
</tr>
<tr>
<td height="30" width="303"><font color="#FFFFFF"><b></b></font>
<div align="center"><font size="4" color="#000000">
<!--Your Company Name.English-->
By Lenovo Group </font></div></td>
<td height="30" width="260"> </td>
</tr>
<tr>
<td height="30" width="303"><div align="center"></div></td>
<td height="30" width="260"> </td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3" height="18"><img src="images/index_top4.gif" width="778" height="18"></td>
</tr>
</table>
<!--横幅条-->
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" background="images/index_lmbg.gif" height="60">
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="35">
<tr>
<td width="9%"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="35" background="images/index_lm.gif">
<tr>
<td width="100%"><div align="center"><b><a href="index.html">index</a></b> </div></td>
</tr>
</table></td>
<!--Button1.Content.Begin-->
<td width="13%"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="35" background="images/index_lm.gif">
<tr>
<td width="100%"><div align="center"><b>
<!--Button1.Link-->
<a href="#">
<!--Button1-->
appointment schedule </a></b></div></td>
</tr>
</table></td>
<!--Button1.Content.End-->
<!--Button2.Content.Begin-->
<td width="9%"><table width="100%" height="35" border="0" cellpadding="0" cellspacing="0" background="images/index_lm.gif">
<tr>
<td width="100%"><div align="center"><b>
<!--Button2.Link-->
<a href="#">
<!--Button2-->
ADT</a></b></div></td>
</tr>
</table></td>
<!--Button2.Content.End-->
<!--Button3.Content.Begin-->
<td width="10%"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="35" background="images/index_lm.gif">
<tr>
<td width="100%"><div align="center"><b>
<!--Button3.Link-->
<a href="#">
<!--Button3-->
bed mangement </a></b></div></td>
</tr>
</table></td>
<!--Button3.Content.End-->
<!--Button4.Content.Begin-->
<td width="12%"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="35" background="images/index_lm.gif">
<tr>
<td width="100%"><div align="center"><b>
<!--Button4.Link-->
<a href="#">
<!--Button4-->
doctor workstation </a></b></div></td>
</tr>
</table></td>
<!--Button4.Content.End-->
<!--Button5.Content.Begin-->
<td width="8%"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="35" background="images/index_lm.gif">
<tr>
<td width="100%"><div align="center"><b>
<!--Button5.Link-->
<a href="#">
<!--Button5-->
LIS</a></b></div></td>
</tr>
</table></td>
<!--Button5.Content.End-->
<!--Button6.Content.Begin-->
<td width="8%"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="35" background="images/index_lm.gif">
<tr>
<td width="100%"><div align="center"><b>
<!--Button6.Link-->
<a href="#">
<!--Button6-->
EMS</a></b></div></td>
</tr>
</table></td>
<!--Button6.Content.End-->
<!--Button7.Content.Begin-->
<td width="12%"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="35" background="images/index_lm.gif">
<tr>
<td width="100%"><div align="center"><b>
<!--Button7.Link-->
<a href="#">
<!--Button7-->
pharmacy management </a></b></div></td>
</tr>
</table></td>
<!--Button7.Content.End-->
<!--Button8.Content.Begin-->
<td width="12%"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="35" background="images/index_lm.gif">
<tr>
<td width="100%"><div align="center"><b>
<!--Button8.Link-->
<a href="#">
<!--Button8-->
finance management </a></b></div></td>
</tr>
</table></td>
<!--Button8.Content.End-->
<!--Button9.Content.Begin-->
<td width="9%"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="35" background="images/index_lm.gif">
<tr>
<td width="100%"><div align="center"><b>
<!--Button9.Link-->
<a href="#">
<!--Button9-->
LSS</a></b></div></td>
</tr>
</table></td>
<!--Button9.Content.End-->
<!--Button10.Content.Begin-->
<td width="9%"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="35" background="images/index_lm.gif">
<tr>
<td width="100%"><div align="center"><b>
<!--Button10.Link-->
<a href="#">
<!--Button10-->
SMS</a></b></div></td>
</tr>
</table></td>
<!--Button10.Content.End-->
</tr>
</table></td>
</tr>
</table>
<!--横幅条-->
<!--内容-->
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#E4EDFB">
<tr>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?