67,515
社区成员
发帖
与我相关
我的任务
分享
public void updateStudent(StudentVO student) throws DAOException {
try {
if(null != student){
this.getSqlMapClient().update("updateStudent", student);
}
} catch (Exception e) {
throw new DAOException(e);
}
}
// 修改所有学员信息
public void updateStudent(StudentVO student) throws DAOException {
this.studentDao.updateStudent(student);
}
// 跳转到修改页面
public ActionForward toUpdateStudent(ActionMapping mapping,
ActionForm actionForm, HttpServletRequest request,
HttpServletResponse response) throws DAOException{
//StudentForm stuForm = (StudentForm)actionForm;
String stuId = request.getParameter("stuId");
StudentVO stuVO = new StudentVO();
stuVO = studentService.getStudentAllById(stuId);
request.setAttribute("stuVO", stuVO);
return mapping.findForward("updateStudent");
}
/**
* 修改学员信息
* @param mapping
* @param actionForm
* @param request
* @param response
* @return
* @throws DAOException
*/
public ActionForward doUpdateStudent(ActionMapping mapping,
ActionForm actionForm, HttpServletRequest request,
HttpServletResponse response) throws DAOException{
StudentForm stuForm = (StudentForm)actionForm;
StudentVO stuVO = new StudentVO();
stuVO.setStuId(stuForm.getStuId());
stuVO.setStuName(stuForm.getStuName());
stuVO.setStuAddress(stuForm.getStuAddress());
this.studentService.updateStudent(stuVO);
return this.doStudentList(mapping, actionForm, request, response);
}