deletepunishaction.java

来自「这是图书管理系统 ~~用JSP实现的 大家要的可以」· Java 代码 · 共 30 行

JAVA
30
字号

package jthink.action.admin;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.Action;
import jthink.bean.*;
import jthink.bean.db.*;
import jthink.tookit.*;

public class DeletePunishAction extends Action {
    public ActionForward execute(ActionMapping mapping, ActionForm form,
                                 HttpServletRequest request,
                                 HttpServletResponse response) {
        int punish_ID=Integer.parseInt(request.getParameter("punish_ID"));
        DataBean db=new DataBean();
        if(db.deletePunish(punish_ID))
        {
                   request.setAttribute("UpdatePunishMsg",
                                        "<script>alert('支付成功')</script>");
               } else {
                   request.setAttribute("DeletePunishMsg",
                                        "<script>alert('支付失败')</script>");
        }
        return MyForward.forward(mapping.findForward("punishPage"), "?page=1");
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?