📄 confaction.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package xing.five.struts.action;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import xing.five.beans.FollowInf;
import xing.five.beans.FollowInfDAO;
import xing.five.beans.WorngInf;
import xing.five.beans.WorngInfDAO;
/**
* MyEclipse Struts
* Creation date: 01-16-2008
*
* XDoclet definition:
* @struts.action validate="true"
* @struts.action-forward name="conf" path="/subworng.jsp"
*/
public class ConfAction extends Action {
/*
* Generated Methods
*/
/**
* Method execute
* @param mapping
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
// TODO Auto-generated method stub
//确认缺陷,提交到缺陷表中
Integer id=new Integer(request.getParameter("id"));
WorngInfDAO dao=new WorngInfDAO();
WorngInf worng = dao.findById(id);
// WorngInf worng=new WorngInf();
worng.setState("已确认");
dao.update(worng);
System.out.print("dsfddf");
System.out.print(id);
//跟踪缺陷,提交到跟踪表中
FollowInfDAO fdao=new FollowInfDAO();
//String worngname=new String(request.getSession().getAttribute("worngname").toString());
//FollowInf follow=fdao.findByname(worngname);
FollowInf follow=fdao.findById(id);
System.out.print(follow.getName());
Date date=new Date();
follow.setQrDate(date);
follow.setState("已确认");
follow.setQrPeople(request.getSession().getAttribute("pname").toString());
fdao.save(follow);
/*WorngInf worng=dao.findById(id);
request.setAttribute("bugs", worng);
System.out.print(worng.getBDate());
*/
return mapping.findForward("conf");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -