📄 membermodifyaction.java
字号:
package com.member.web.action;
import org.apache.struts.action.ActionForward;
import com.common.struts.*;
import com.member.dao.MemberDao;
import com.member.form.Member;
public class MemberModifyAction extends AbstractAction {
public MemberModifyAction() {
}
public ActionForward execute(ActionContext actionContext) throws java.lang.Exception {
String memberID = actionContext.getParameter("memberID");
String memberAccount = actionContext.getParameter("memberAccount");
String memberPass = actionContext.getParameter("memberPass");
String realName = actionContext.getParameter("realName");
String gender = actionContext.getParameter("gender");
String birthday = actionContext.getParameter("birthday");
String company = actionContext.getParameter("company");
String department = actionContext.getParameter("department");
String address = actionContext.getParameter("address");
String postCode = actionContext.getParameter("postCode");
String province = actionContext.getParameter("province");
String city = actionContext.getParameter("city");
String phone = actionContext.getParameter("phone");
String MSN = actionContext.getParameter("MSN");
String email = actionContext.getParameter("email");
String foodhabit = actionContext.getParameter("foodhabit");
Member info = new Member(memberID,memberAccount,memberPass,
realName,gender, birthday,company, department,
address, postCode,province, city,phone, MSN, email,foodhabit,null,null);
MemberDao dao = new MemberDao();
int nRet = dao.updatMemberToDb(info);
if(nRet > 0)
{
Member model = dao.getOneMemberByID(memberID);
actionContext.getSession().setAttribute("myMemberModel",model);
actionContext.getSession().setAttribute("memberName", memberAccount);
}
return actionContext.getMapping().findForward("modifyMember");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -