예제 #1
0
 @RequestMapping(value = "add", method = RequestMethod.GET)
 public ModelAndView add(@ModelAttribute(value = "Schedule") Schedule schedule) {
   ModelAndView mv = new ModelAndView("adminSchedule/add");
   mv.addObject("applicants", applicantService.getAll());
   mv.addObject("roles", roleService.getAll());
   return mv;
 }
예제 #2
0
 @RequestMapping(value = "edit", method = RequestMethod.GET)
 public ModelAndView edit(
     @ModelAttribute(value = "Schedule") Schedule schedule, @Context HttpServletRequest request) {
   ModelAndView mv = null;
   int id = Integer.parseInt(request.getParameter("id"));
   Schedule sch = scheduleService.getByScheduleId(id);
   if (sch != null) {
     mv = new ModelAndView("adminSchedule/edit");
     mv.addObject("schedule", sch);
     mv.addObject("applicant", applicantService.getByApplicantId(sch.getApplicantId()));
     mv.addObject("applicants", applicantService.getAll());
     mv.addObject("role", roleService.getByRoleId(sch.getInterviewer()));
     mv.addObject("roles", roleService.getAll());
   }
   return mv;
 }