示例#1
0
 public bool CanPurchase(Person p)
 {
     if (!(PersonValidatorStatic.IsValid(p)))
     {
         throw new Exception("validation failed");
     }
     if (p.SSID!=null &&
         p.SubscriptionType!=null &&
         p.CreditOnFile>0)
     {
         return true;
     }
     return false;
 }
示例#2
0
        public bool CanPurchase(Person p)
        {
            if (!(validator.IsValid(p)))
            {
                return false;
            }

            if (p.SSID!=null &&
                p.SubscriptionType!=null &&
                p.CreditOnFile>0)
            {
                return true;
            }

            return false;
        }
示例#3
0
 public static bool CheckValue(Person p)
 {
     return false;
 }
示例#4
0
 public static void LogPersonCreate(Person person)
 {
     string error = "Log file not configured!";
     Thread.Sleep(2 * 1000);
     throw new Exception(error);
 }