资源简介
这个本人的毕业设计,今天无意发现,分享给大家,希望对大家有所帮助,有所不足,希望大家谅解
代码片段和文件信息
package com.action;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.struts2.ServletActionContext;
import com.dao.TGongDAO;
import com.dao.TNewsDAO;
import com.model.TGong;
import com.model.TNews;
import com.opensymphony.xwork2.ActionSupport;
public class gongAction extends ActionSupport
{
private Integer id;
private String mingcheng;
private String chexing;
private Integer piaojia;
private String message;
private String path;
private TGongDAO gongDAO;
public String gongAdd()
{
TGong gong=new TGong();
gong.setMingcheng(mingcheng);
gong.setChexing(chexing);
gong.setPiaojia(piaojia);
//gong.setXianlu(xianlu);
gongDAO.save(gong);
this.setMessage(“操作成功“);
this.setPath(“gongMana.action“);
return “succeed“;
}
public String gongMana()
{
List gongList=gongDAO.findAll();
Map request=(Map)ServletActionContext.getContext().get(“request“);
request.put(“gongList“ gongList);
return ActionSupport.SUCCESS;
}
public String xl()
{
TGong xl=gongDAO.findById(id);
Map session=(Map)ServletActionContext.getContext().get(“session“);
session.put(“xl“ xl);
return ActionSupport.SUCCESS;
}
public String gongDel()
{
TGong gong=gongDAO.findById(id);
gongDAO.delete(gong);
this.setMessage(“操作成功“);
this.setPath(“gongMana.action“);
return “succeed“;
}
public String gongAll()
{
List gongList=gongDAO.findAll();
Map request=(Map)ServletActionContext.getContext().get(“request“);
request.put(“gongList“ gongList);
return ActionSupport.SUCCESS;
}
public String gongDetailQian()
{
TGong gong=gongDAO.findById(id);
Map request=(Map)ServletActionContext.getContext().get(“request“);
request.put(“gong“ gong);
return ActionSupport.SUCCESS;
}
public String mingchengChaxun()
{
String sql=“from TGong where mingcheng like ‘%“+mingcheng.trim()+“%‘“;
List gongList=gongDAO.getHibernateTemplate().find(sql);
Map request=(Map)ServletActionContext.getContext().get(“request“);
request.put(“gongList“ gongList);
return ActionSupport.SUCCESS;
}
/*public String xianluChaxun()
{
String sql=“from TGong where xianlu like ‘%“+xianlu.trim()+“%‘“;
List gongList=gongDAO.getHibernateTemplate().find(sql);
Map request=(Map)ServletActionContext.getContext().get(“request“);
request.put(“gongList“ gongList);
return ActionSupport.SUCCESS;
}*/
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getMingcheng() {
return mingcheng;
}
public void setMingcheng(String mingcheng) {
this.mingcheng = mingcheng;
}
public String getChexing() {
return chexing;
}
public void setChexing(String chexing) {
this.chexing = chexing;
}
public Integer getPiaojia() {
return pi
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-01-16 11:37 gong\
文件 5798 2015-05-04 10:32 gong\.classpath
目录 0 2017-01-16 11:37 gong\.externalToolBuilders\
文件 552 2015-05-04 10:32 gong\.externalToolBuilders\org.eclipse.wst.common.project.facet.core.builder (4).launch
文件 548 2015-05-04 10:32 gong\.externalToolBuilders\org.eclipse.wst.jsdt.core.ja
目录 0 2018-01-17 11:45 gong\.myeclipse\
文件 578 2015-05-15 23:52 gong\.myhibernatedata
文件 285 2015-06-02 08:34 gong\.myme
文件 2627 2015-05-04 10:32 gong\.project
目录 0 2017-01-16 11:37 gong\.settings\
文件 500 2015-05-04 10:32 gong\.settings\.jsdtscope
文件 117 2015-05-04 10:32 gong\.settings\org.eclipse.core.resources.prefs
文件 629 2015-05-04 10:32 gong\.settings\org.eclipse.jdt.core.prefs
文件 450 2015-05-04 10:32 gong\.settings\org.eclipse.wst.common.component
文件 252 2015-05-04 10:32 gong\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2015-05-04 10:32 gong\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2015-05-04 10:32 gong\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 6372 2015-05-04 10:32 gong\.settings\org.springfr
文件 479 2015-05-04 10:32 gong\.springBeans
目录 0 2017-01-16 11:39 gong\WebRoot\
目录 0 2017-01-16 11:39 gong\WebRoot\me
文件 39 2015-05-04 10:32 gong\WebRoot\me
目录 0 2017-01-16 11:39 gong\WebRoot\WEB-INF\
文件 3533 2015-06-02 08:37 gong\WebRoot\WEB-INF\applicationContext.xm
目录 0 2017-01-16 11:39 gong\WebRoot\WEB-INF\classes\
目录 0 2017-01-16 11:39 gong\WebRoot\WEB-INF\classes\com\
目录 0 2017-01-16 11:39 gong\WebRoot\WEB-INF\classes\com\action\
文件 4983 2015-06-02 08:34 gong\WebRoot\WEB-INF\classes\com\action\UserAction.class
文件 4005 2015-06-02 08:34 gong\WebRoot\WEB-INF\classes\com\action\gongAction.class
文件 404 2015-06-02 08:34 gong\WebRoot\WEB-INF\classes\com\action\indexAction.class
文件 4528 2015-06-02 08:34 gong\WebRoot\WEB-INF\classes\com\action\liuyanAction.class
............此处省略994个文件信息
评论
共有 条评论