Пример #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;
  }
Пример #2
0
 public void update(Bill bill) {
   _gateway.update(bill);
 }
Пример #3
0
  public void delete(Bill bill) {
    if (bill.getType() == TransactionType.Invoice) bill.cancel();

    _gateway.delete(bill);
  }
Пример #4
0
 public boolean insert(Bill bill) {
   return _gateway.add(bill);
 }
Пример #5
0
 public Bill getByID(int id) {
   return _gateway.getByID(id);
 }
Пример #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();
 }