📄 editbook.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.zxf.struts.book;
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 com.db.Jdo;
/**
* MyEclipse Struts
* Creation date: 01-08-2008
*
* XDoclet definition:
* @struts.action path="/editbook" name="editbookForm" scope="request" validate="true"
*/
public class EditBook extends Action {
/*
* Generated Methods
*/
/**
* Method execute
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
EditBookForm editbookForm = (EditBookForm) form;// TODO Auto-generated method stub
String bookname=editbookForm.getBookname();
String price=editbookForm.getPrice();
String count=editbookForm.getCount();
String agio=editbookForm.getAgio();
String press=editbookForm.getPress();
String pressdate=editbookForm.getPressdate();
String ibsn=editbookForm.getIbsn();
String types=editbookForm.getTypes();
String author=editbookForm.getAuthor();
String content=editbookForm.getContent();
String id=editbookForm.getId();
Jdo jdo=new Jdo();
jdo.executeUpdate("update book set bookname='"+bookname+"',bookprice="+price+",remaincount="+count+",bookagio="+agio+" ,press='"+press+"' ,pressdate='"+pressdate+"' ,ibsn='"+ibsn+"' ,smallcatalogid="+types+",author='"+author+"',content='"+content+"' where bookid="+id);//
jdo.destroy();
return mapping.findForward("sucess");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -