• 大小: 6.3MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-27
  • 语言: Java
  • 标签: JAVA  JSP  养老院  

资源简介

本系统提供养老院的登录注册,养老院房间管理,登记管理

资源截图

代码片段和文件信息

package com.action;

import java.io.IOException;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.dao.DB;
import com.orm.Tchuang;
import com.service.liuService;

public class chuang_servlet extends HttpServlet
{
public void service(HttpServletRequest reqHttpServletResponse res)throws ServletException IOException 
{
        String type=req.getParameter(“type“);

if(type.endsWith(“chuangAdd“))
{
chuangAdd(req res);
}
if(type.endsWith(“chuangMana“))
{
chuangMana(req res);
}
if(type.endsWith(“chuangDel“))
{
chuangDel(req res);
}
if(type.endsWith(“chuangSelect“))
{
chuangSelect(req res);
}
}




public void chuangAdd(HttpServletRequest reqHttpServletResponse res)
{
//int id=0;
int sushe_id=Integer.parseInt(req.getParameter(“sushe_id“));
String chuanghao=req.getParameter(“chuanghao“);
String zt=“空闲“;
String del=“no“;

String sql=“insert into t_chuang(sushe_idchuanghaoztdel) values(????)“;
object[] params={sushe_idchuanghaoztdel};
DB mydb=new DB();
mydb.doPstm(sql params);
mydb.closed();

req.setAttribute(“msg“ “操作成功“);
        String targetURL = “/common/msg.jsp“;
dispatch(targetURL req res);
}

public void chuangMana(HttpServletRequest reqHttpServletResponse res) throws ServletException IOException
{
List chuangList=new ArrayList();
String sql=“select * from t_chuang where del=‘no‘ order by sushe_idchuanghao“;
object[] params={};
DB mydb=new DB();
try
{
mydb.doPstm(sql params);
ResultSet rs=mydb.getRs();
while(rs.next())
{
Tchuang chuang=new Tchuang();

chuang.setId(rs.getInt(“id“));
chuang.setSushe_id(rs.getInt(“sushe_id“));
chuang.setChuanghao(rs.getString(“chuanghao“));
chuang.setZt(rs.getString(“zt“));

chuang.setDel(rs.getString(“del“));

chuang.setSushe(liuService.getSushe(rs.getInt(“sushe_id“)));
chuangList.add(chuang);
    }
rs.close();
}
catch(Exception e)
{
e.printStackTrace();
}
mydb.closed();

req.setAttribute(“chuangList“ chuangList);
req.getRequestDispatcher(“admin/chuang/chuangMana.jsp“).forward(req res);
}

public void chuangDel(HttpServletRequest reqHttpServletResponse res)
{
int id=Integer.parseInt(req.getParameter(“id“));
String sql=“update t_chuang set del=‘yes‘ where id=?“;
object[] params={id};
DB mydb=new DB();
mydb.doPstm(sql params);
mydb.closed();

req.setAttribute(“msg“ “操作成功“);
        String targetURL = “/common/msg.jsp“;
dispatch(targetURL req res);
}


public void chuangSelect(HttpServletRequest reqHt

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       15100  2016-11-24 23:25  db_yangyxt.sql
     目录           0  2016-11-21 09:01  yangyxt\
     文件         529  2016-11-21 17:01  yangyxt\.classpath
     目录           0  2016-11-21 14:01  yangyxt\.externalToolBuilders\
     文件         552  2016-11-21 17:01  yangyxt\.externalToolBuilders\org.eclipse.wst.common.project.facet.core.builder.launch
     文件         548  2016-11-21 09:01  yangyxt\.externalToolBuilders\org.eclipse.wst.jsdt.core.javascriptValidator.launch
     目录           0  2016-11-21 19:01  yangyxt\.myeclipse\
     文件         294  2016-11-21 16:08  yangyxt\.mymetadata
     文件        2212  2016-11-21 16:08  yangyxt\.project
     目录           0  2016-11-21 17:01  yangyxt\.settings\
     文件         500  2016-11-21 09:01  yangyxt\.settings\.jsdtscope
     文件         192  2016-11-21 12:01  yangyxt\.settings\org.eclipse.core.resources.prefs
     文件         395  2016-11-21 17:01  yangyxt\.settings\org.eclipse.jdt.core.prefs
     文件         450  2016-11-21 12:01  yangyxt\.settings\org.eclipse.wst.common.component
     文件         252  2016-11-21 12:01  yangyxt\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2016-11-21 12:01  yangyxt\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2016-11-21 12:01  yangyxt\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2016-11-21 16:01  yangyxt\src\
     目录           0  2016-11-21 12:01  yangyxt\src\com\
     目录           0  2016-11-24 01:27  yangyxt\src\com\action\
     文件        4525  2016-11-22 02:33  yangyxt\src\com\action\chuang_servlet.java
     文件        3480  2016-11-23 13:51  yangyxt\src\com\action\chuku_servlet.java
     文件        5174  2016-11-21 16:46  yangyxt\src\com\action\goods_servlet.java
     文件        6478  2016-11-21 11:01  yangyxt\src\com\action\guanggao_servlet.java
     文件        1423  2016-11-21 16:52  yangyxt\src\com\action\index_servlet.java
     文件        4280  2016-11-22 02:27  yangyxt\src\com\action\laoren_servlet.java
     文件        3120  2016-11-21 13:01  yangyxt\src\com\action\lianjie_servlet.java
     文件        6676  2016-11-21 13:01  yangyxt\src\com\action\liuyan_servlet.java
     文件        5848  2016-11-23 12:02  yangyxt\src\com\action\org_servlet.java
     文件        3889  2016-11-24 11:40  yangyxt\src\com\action\richang_servlet.java
     文件        3653  2016-11-23 13:46  yangyxt\src\com\action\ruku_servlet.java
............此处省略921个文件信息

评论

共有 条评论