Package pojo

Examples of pojo.Bill


  }

  //get bill info by idBill
  public Bill getBillInfo(int idBill) {
    logger.debug("getBillInfo by idBill start");
    Bill bill = null;
    Session session = HibernateUtil.getSessionFactory().openSession();
    try {
      bill = (Bill) session.get(Bill.class, idBill);
      logger.debug("getBillInfo by idBill success");
    } catch (HibernateException ex) {
View Full Code Here


  //delete Bill
  public boolean delBill(int idBill) {
    logger.debug("delBill start");
    Session session = HibernateUtil.getSessionFactory().openSession();
    Bill bill = (Bill) session.get(Bill.class, idBill);
    if (bill == null) {
      return false;
    }
    Transaction transaction = null;
    try {
View Full Code Here

  //update Bill
  public boolean updateBill(Integer idBill, Integer idstatus) {
    logger.debug("updateBill start");
    Session session = HibernateUtil.getSessionFactory().openSession();
    Bill bill = (Bill) session.get(Bill.class, idBill);
    session.save(bill);
    session.close();
    if (bill == null) {
      return false;
    }
    session = HibernateUtil.getSessionFactory().openSession();
    bill.getDeliverstatus().setIdstatus(idstatus);
    Transaction transaction = null;
    try {
      transaction = session.beginTransaction();
      session.saveOrUpdate(bill);
      transaction.commit();
View Full Code Here

            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++) {
View Full Code Here

TOP

Related Classes of pojo.Bill

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.