Esempio n. 1
0
  public Collection<Bill> getByClientID(int clientID) {
    Collection<Bill> all = _gateway.getAll();
    ArrayList<Bill> results = new ArrayList<Bill>();
    Client client;

    for (Bill q : all) {
      client = q.getClient();

      if (client != null && client.getID() == clientID) {
        results.add(q);
      }
    }

    return results;
  }
Esempio n. 2
0
 public void update(Bill bill) {
   _gateway.update(bill);
 }
Esempio n. 3
0
  public void delete(Bill bill) {
    if (bill.getType() == TransactionType.Invoice) bill.cancel();

    _gateway.delete(bill);
  }
Esempio n. 4
0
 public boolean insert(Bill bill) {
   return _gateway.add(bill);
 }
Esempio n. 5
0
 public Bill getByID(int id) {
   return _gateway.getByID(id);
 }
Esempio n. 6
0
 public Collection<Bill> getAll() {
   return _gateway.getAll();
 }
 public void deleteProductPackage(Package productPackage) {
   _gateway.delete(productPackage);
 }
 public void updateProductPackage(Package productPackage) {
   _gateway.update(productPackage);
 }
 public void insertProductPackage(Package productPackage) {
   _gateway.add(productPackage);
 }
 public Package getProductPackage(int id) {
   return _gateway.getByID(id);
 }
 public Collection<Package> getProductPackageList() {
   return _gateway.getAll();
 }