📄 getdoctorappointmentinfo.jsp
字号:
<%@ page contentType="text/html; charset=gbk"%><%@ include file = "../include/ccs.inc" %>
<%@ page import="hospital.db.dboperation.*" %>
<%@ page import="hospital.db.*" %>
<%@ page import="java.sql.*" %>
<html>
<head>
<title>医院门诊预约系统-医生预约信息</title>
</head>
<%
String did=request.getParameter("did");
String _doctorInfo="";
ResultSet rs=null;
Patient patient=(Patient)session.getAttribute("patient");
try{
if(patient==null)
patient=new Patient(Patient.ANONYMOUS);
int a=patient.getDoctorAppointmentInfo(did);
if(a==1){
_doctorInfo="查询成功";
rs=patient.getResultSet();
}
else if(a==-1)
_doctorInfo="数据库异常";
else if(a==0)
_doctorInfo="一般异常";
else
_doctorInfo="DID不存在";
}
catch(InvalidUserException iue){
_doctorInfo="非法用户名";
}
%>
<body bgcolor="#FFFFFF">
<table width="770" height="423" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td height="421" bgcolor="#FFFFFF"><%@ include file = "../include/head.inc" %>
<table width="770" height="290" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%@ include file = "../include/patient.inc" %>
<td width="603" align="center" valign="top">
<table width="100%" height="85%" border="0" cellpadding="3" cellspacing="1" bgcolor="#666666">
<tr>
<td width="100%" height="257" align="center" valign="top" bgcolor="E3EDFF">
<br>
<p align="left"><%=_doctorInfo%> 单击“当前可预约数量”进行预约</p>
<%if(rs!=null && rs.next()){%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th></th>
<th>周日上午</th>
<th>周日下午</th>
<th>周一上午</th>
<th>周一下午</th>
<th>周二上午</th>
<th>周二下午</th>
<th>周三上午</th>
<th>周三下午</th>
<th>周四上午</th>
<th>周四下午</th>
<th>周五上午</th>
<th>周五下午</th>
<th>周六上午</th>
<th>周六下午</th>
</tr>
<tr align="center">
<td>当前可预约数</td>
<%for(int i=2;i<16;i++){
int day=i/2-1;
int ap=i%2;
out.print("<td><a href=\"makeAppointment.jsp?did="+did+"&day="+day+"&ap="+ap+"\">"+rs.getInt(i)+"</a></td>");
}%>
</tr>
<tr align="center">
<td>最大可预约数</td>
<%for(int i=17;i<31;i++)
out.print("<td>"+rs.getInt(i)+"</td>");%>
</tr>
</table>
<%}%>
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<%
if(patient!=null)
patient.closeConnection();
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -