Пример #1
0
 @Override
 public int insert(Schedule s) {
   return jdbcTemplate.update(
       SQLCommand.SCHEDULE_INSERT,
       new Object[] {
         s.getApplicantId(),
         s.getScheduleDate(),
         s.getScheduleTime(),
         s.getInterviewer(),
         s.getMessageForApplicant(),
         s.getMessageForInterviewer(),
         s.getScheduleStatus(),
         s.getRemarks()
       });
 }
Пример #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;
 }