Package dao

Examples of dao.BillDAO


                "Please buys something to checkout");
          } else {
            Date ngaymua = new Date();
            Deliverstatus status = deliverstatusDAO
                .getDefaultDeliverstatus();
            BillDAO billDAO = new BillDAOImpl();

            Bill hd = new Bill(status, kh.getIduser(), tongTien,
                hoten, diachi, dienthoai, ngaymua, null);
            billDAO.addBill(hd);

            Set<Billdetail> billdetails = new HashSet<Billdetail>();
            for (int i = 0; i < sanphams.size(); i++) {
              Billdetail dt = new Billdetail(hd, sanphams.get(i),
                  sanphams.get(i).getPrice(), soluongs.get(i));

              billDAO.addBill(dt);

            }

            request.removeAttribute("Cart",
                WebRequest.SCOPE_SESSION);
View Full Code Here


  // controller history shopping
  @RequestMapping(value = "/shoppinghistory")
  public String shoppinghistory(Model model, WebRequest request) {
    logger.debug("shoppinghistory start");
    prepareData(model, request);
    BillDAO hdDAO = new BillDAOImpl();
    if (request.getAttribute("TaiKhoan", WebRequest.SCOPE_SESSION) != null) {
      String taikhoan = request.getAttribute("TaiKhoan",
          WebRequest.SCOPE_SESSION).toString();
      List<Bill> listHoaDon = hdDAO.getListBill(taikhoan);

      float tongTien = 0;
      for (int i = 0; i < listHoaDon.size(); i++) {
        tongTien += listHoaDon.get(i).getToTal();
      }
View Full Code Here

TOP

Related Classes of dao.BillDAO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.