@At("queryTeacher")
@Ok("jsp:show")
public void QueryTeacher(HttpServletRequest request,HttpSession session){
List<Teacher> teacherList = dao.query(Teacher.class, null);
Teacher teacher2=new Teacher();
for (Teacher teacher1 : teacherList){
int lessId = teacher1.getLessId();
teacher2.setLessId(lessId);
}
session.setAttribute("lessonid",teacher2);
request.setAttribute("teacherlist",teacherList);
@At("deletelesson")
@Ok(">>:queryTeacher")
public boolean DeleteLesson(HttpServletRequest request, HttpSession session){
int lessonid = Integer.parseInt(String.valueOf(session.getAttribute("lessonid")));
Lesson lesson = dao.fetchLinks(dao.fetch(Lesson.class, lessonid), "students");
request.setAttribute("lesson",lesson);
return true;
}
2 回复
添加回复
请先登陆