コード例 #1
0
 @RequestMapping(value = "/saveExpanses.htm", method = RequestMethod.POST)
 public void saveExpanses(@ModelAttribute("ExpansesFormBean") ExpansesFormBean objExpBean) {
   ExpansesHibernateBean objExpHiberBean = new ExpansesHibernateBean();
   objExpHiberBean.setExpanse(objExpBean.getExpanse());
   objExpHiberBean.setId(objExpBean.getId());
   objExpHiberBean.setName(objExpBean.getName());
   objExpHiberBean.setAddedDate(new Date().toString());
   objExpService.saveExpanses(objExpHiberBean);
 }
コード例 #2
0
 @RequestMapping(value = "/feeSubmit.htm", method = RequestMethod.POST)
 public ModelAndView feeSubmission(@ModelAttribute("feeFormBeam") FeeFormBean feeFormBean) {
   StudentFeeBean feeBean = new StudentFeeBean();
   SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
   Date date = null;
   try {
     date = sdf.parse(sdf.format(new Date()));
   } catch (ParseException e) {
     e.printStackTrace();
   }
   feeBean.setBranchCode("s002");
   feeBean.setRegNo(Long.parseLong(feeFormBean.getRegNo()));
   feeBean.setFeeDaposited(feeFormBean.getFeeDaposited());
   feeBean.setFine(feeFormBean.getFine());
   feeBean.setRollno(Long.parseLong(feeFormBean.getRegNo()));
   feeBean.setStudentClass(feeFormBean.getStudentClass());
   feeBean.setDepDate(date.toString());
   objExpService.feeSubmit(feeBean);
   ModelAndView mv = new ModelAndView();
   mv.setViewName("accountPanel");
   return mv;
 }