📄 deviceslist.jsp
字号:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="common.Constants"%>
<%@page import="java.util.List"%>
<%@page import="domain.DeviceCatagory"%>
<%@page import="java.util.ArrayList"%>
<%@page import="dal.DeviceCatagoryDao"%>
<%@page import="domain.DevicesInfo"%>
<%@page import="dal.DevicesDao"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SystemTitle %></title>
<link href="../css/body.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.HeaderStyle
{
color: #000000;
font-weight: normal;
text-align: left;
height: 17px;
vertical-align: middle;
filter:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr='#ECF5FD',endColorStr='#DBEBFC');
border-bottom: 1px solid #B9CCDD;
border-top:0px;
border-left:0px;
border-right:0px;
}
</style>
</head>
<%
String action=request.getParameter("action");
DevicesDao dao=new DevicesDao();
if(action!=null&&action.equals("Delete")){
String id=request.getParameter("device_id");
if(id!=null&&!"".equals(id)){
DevicesInfo d=new DevicesInfo();
d.setDeviceId(Integer.valueOf(id));
boolean value=dao.deleteDB(d);
//if(value){
response.sendRedirect("DevicesEdit.jsp");
//}
}
}
%>
<%
List<DevicesInfo> dclist=new ArrayList<DevicesInfo>();
dclist=dao.getDeviceCatagoryList();
%>
<body>
<form action="">
<div id="main">
<div id="headTitle" class="Div_Openwindow_Title" >
<span class="OpenWindow_Title" id="title">
设备列表
</span>
</div>
<div id="btn_area" class="Div_Openwindow_Btn">
<a href="DevicesEdit.jsp">新建设备</a>
</div>
<table class="FelxGridTable" >
<tr>
<td class="Interval"></td>
<td >
<table id="list" width="100%">
<tr style="width: 200px;">
<td class="HeaderStyle">设备名称</td>
<td class="HeaderStyle">类别</td>
<td class="HeaderStyle">设备编码</td>
<td class="HeaderStyle">设备描述</td>
<td class="HeaderStyle">生产厂家</td>
<td class="HeaderStyle">功能描述</td>
<td class="HeaderStyle">操作</td>
</tr>
<%
for(DevicesInfo d:dclist){
%>
<tr>
<td class=""><%=d.getDeviceName() %></td>
<td class=""><%=d.getCatagory().getCatagoryName()%></td>
<td class=""><%=d.getDeviceCode() %></td>
<td class=""><%=d.getDeviceDesc() %></td>
<td class=""><%=d.getDeviceMaker() %></td>
<td class=""><%=d.getDeviceFunction() %></td>
<td class="">
<a href="DevicesEdit.jsp?action=Edit&deviceId=<%=d.getDeviceId() %>" >编辑</a>
<a href="DevicesList.jsp?action=Delete&device_id=<%=d.getDeviceId() %>" >删除</a>
</td>
</tr>
<%} %>
</table>
</td>
<td class="Interval"></td>
</tr>
</table>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -