?? deletecustomeraction.java
字號(hào):
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.ascent.struts.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.ascent.bean.Customer;
/**
* MyEclipse Struts Creation date: 07-23-2006
*
* XDoclet definition:
*
* @struts.action input="userlist.jsp" validate="true"
*/
public class DeleteCustomerAction extends BaseAction {
/*
* 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) {
int customer_id = Integer.parseInt(request.getParameter("customer_id"));
/**
* 管理員刪除用戶
*/
Customer cust = this.getCustomerService().getCustomer(customer_id);
this.getCustomerService().removeCustomer(cust);
return mapping.findForward("deletesuccess");
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -