📄 editroomaction.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.yourcompany.struts.action;
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 org.apache.struts.action.DynaActionForm;
import service.BusinessRoom;
import entities.Room;
/**
* MyEclipse Struts
* Creation date: 07-08-2007
*
* XDoclet definition:
* @struts.action path="/editroom" name="editroomForm" input="/module/kfguanli/search/editroominf.jsp" scope="request" validate="true"
* @struts.action-forward name="error" path="/module/error.jsp"
* @struts.action-forward name="success" path="/module/success.jsp"
*/
public class EditroomAction extends Action {
/*
* Generated Methods
*/
/**
* Method execute
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
* @throws Exception
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
DynaActionForm editroomForm = (DynaActionForm) form;// TODO Auto-generated method stub
String oldroomnum = editroomForm.getString("oldroom");
String newroomnum = editroomForm.getString("newroom");
String station = editroomForm.getString("station");
String khname = editroomForm.getString("khname");
String khsex = editroomForm.getString("khsex");
String telnum = editroomForm.getString("telnum");
String fax = editroomForm.getString("fax");
String dengjitime = editroomForm.getString("dengjitime");
String ruzhutime = editroomForm.getString("ruzhutime");
String beizhu = editroomForm.getString("beizhu");
Room room = new Room();
BusinessRoom bs = new BusinessRoom();
room.setDengjitime(dengjitime);
room.setFax(fax);
room.setKhname(khname);
room.setKhsex(khsex);
room.setRoomnum(newroomnum);
room.setRuzhutime(ruzhutime);
room.setStation(station);
room.setTelnum(telnum);
room.setBeizhu(beizhu);
bs.updateRoom(room, oldroomnum);
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -