if(errors != "")
{
ModelAndView modelAndView = new ModelAndView("ITInternalUserTransactionCreation");
modelAndView.addObject("currentuser", currentuser);
InternalUserTransaction trans = new InternalUserTransaction();
modelAndView.addObject("transaction", trans);
modelAndView.addObject("errors", errors);
return modelAndView;
} else{
transaction.setStatus("approved");
transaction.setDeptId(2);//2:IT dept
String res = transactionBO.save(transaction);
if(res.matches("fail")){
errors = errors + "Employee ID does'nt exist!";
ModelAndView modelAndView = new ModelAndView("ITInternalUserTransactionCreation");
modelAndView.addObject("currentuser", currentuser);
InternalUserTransaction trans = new InternalUserTransaction();
modelAndView.addObject("transaction", trans);
modelAndView.addObject("errors", errors);
return modelAndView;