salesDAO.updateSalesEntry(sales);
return new ModelAndView("redirect:listBill.htm");
}
public ModelAndView viewPrevBill(HttpServletRequest request, HttpServletResponse response)throws Exception
{
ModelMap modelMap = new ModelMap();
if(request.getParameter("billNo") !=null)
{
long billId=Long.parseLong(request.getParameter("billNo"));
System.out.println(billId);
modelMap.addAttribute("items", salesDAO.selectByBillId(billId));
}
modelMap.addAttribute("bill", new Sales());
return new ModelAndView("prevEntry",modelMap);
}