Example #1
0
 public void addStoreVisibleDiscount(int store, double percentage, string duration, int session)
 {
     if (store < 0)
     {
         throw new ILLArgumentException("illegal store number");
     }
     if (percentage <= 0 || percentage >= 1)
     {
         throw new IllegalAmountException("percentage of discount must be a number between 0 to 1");
     }
     if (session < 0)
     {
         throw new NullReferenceException("session is a null reference");
     }
     db.addStoreVisibleDiscount(store, percentage, duration, session);
 }