📄 catagorylist.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"%><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");
DeviceCatagoryDao dao=new DeviceCatagoryDao();
if(action!=null&&action.equals("Delete")){
String id=request.getParameter("catagory_id");
if(id!=null&&!"".equals(id)){
DeviceCatagory d=new DeviceCatagory();
d.setCategoryId(Integer.valueOf(id));
boolean value=dao.deleteDB(d);
//if(value){
response.sendRedirect("CatagoryList.jsp");
//}
}
}
%>
<%
List<DeviceCatagory> dclist=new ArrayList<DeviceCatagory>();
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="CatagoryEdit.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>
</tr>
<%
for(DeviceCatagory d:dclist){
%>
<tr>
<td class=""><%=d.getCatagoryName() %></td>
<td class=""><%=d.getCatogoryCode() %></td>
<td class=""><%=d.getCatagoryDesc() %></td>
<td class="">
<a href="CatagoryEdit.jsp?action=Edit&catagory_id=<%=d.getCategoryId() %>" >编辑</a>
<a href="CatagoryList.jsp?action=Delete&catagory_id=<%=d.getCategoryId() %>" >删除</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 + -