예제 #1
0
 public void addToProductQuantity(int product, int amount, Session session)
 {
     if (product < 0)
     {
         throw new ArgumentException("illegal product number");
     }
     if (amount <= 0)
     {
         throw new IllegalAmountException("error - amount must be a positive number");
     }
     db.addToProductQuantity(product, amount, session);
 }
예제 #2
0
 public void addToProductQuantity(int product, int amount, int session)
 {
     if (product < 0)
     {
         throw new ILLArgumentException("illegal product number");
     }
     if (amount <= 0)
     {
         throw new AlreadyExistException("Error: Quantity must be a positive number");
     }
     db.addToProductQuantity(product, amount, session);
 }