コード例 #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Booker == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Booker");
     }
     if (Id == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Id");
     }
     if (Booker != null)
     {
         Booker.Validate();
     }
     if (PaymentAccount != null)
     {
         PaymentAccount.Validate();
     }
     if (Reservations != null)
     {
         foreach (var element in Reservations)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
 }
コード例 #2
0
ファイル: GroupItemModel.cs プロジェクト: randyrod/oss-traces
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Booker == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Booker");
     }
     if (Id == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Id");
     }
     if (Name == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Name");
     }
     if (PropertyIds == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "PropertyIds");
     }
     if (Actions != null)
     {
         foreach (var element in Actions)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (Blocks != null)
     {
         foreach (var element1 in Blocks)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
     if (Booker != null)
     {
         Booker.Validate();
     }
     if (PaymentAccount != null)
     {
         PaymentAccount.Validate();
     }
 }
コード例 #3
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Booker == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Booker");
     }
     if (Name == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Name");
     }
     if (PropertyIds == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "PropertyIds");
     }
     if (Booker != null)
     {
         Booker.Validate();
     }
     if (PaymentAccount != null)
     {
         PaymentAccount.Validate();
     }
 }
コード例 #4
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Balance == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Balance");
     }
     if (BookingId == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "BookingId");
     }
     if (CancellationFee == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "CancellationFee");
     }
     if (Id == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Id");
     }
     if (NoShowFee == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "NoShowFee");
     }
     if (PrimaryGuest == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "PrimaryGuest");
     }
     if (Property == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Property");
     }
     if (RatePlan == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "RatePlan");
     }
     if (TotalGrossAmount == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "TotalGrossAmount");
     }
     if (UnitGroup == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "UnitGroup");
     }
     if (Actions != null)
     {
         foreach (var element in Actions)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (AdditionalGuests != null)
     {
         foreach (var element1 in AdditionalGuests)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
     if (AssignedUnits != null)
     {
         foreach (var element2 in AssignedUnits)
         {
             if (element2 != null)
             {
                 element2.Validate();
             }
         }
     }
     if (Balance != null)
     {
         Balance.Validate();
     }
     if (Booker != null)
     {
         Booker.Validate();
     }
     if (CancellationFee != null)
     {
         CancellationFee.Validate();
     }
     if (CityTax != null)
     {
         CityTax.Validate();
     }
     if (Commission != null)
     {
         Commission.Validate();
     }
     if (Company != null)
     {
         Company.Validate();
     }
     if (NoShowFee != null)
     {
         NoShowFee.Validate();
     }
     if (PaymentAccount != null)
     {
         PaymentAccount.Validate();
     }
     if (PrimaryGuest != null)
     {
         PrimaryGuest.Validate();
     }
     if (Property != null)
     {
         Property.Validate();
     }
     if (RatePlan != null)
     {
         RatePlan.Validate();
     }
     if (Services != null)
     {
         foreach (var element3 in Services)
         {
             if (element3 != null)
             {
                 element3.Validate();
             }
         }
     }
     if (TimeSlices != null)
     {
         foreach (var element4 in TimeSlices)
         {
             if (element4 != null)
             {
                 element4.Validate();
             }
         }
     }
     if (TotalGrossAmount != null)
     {
         TotalGrossAmount.Validate();
     }
     if (Unit != null)
     {
         Unit.Validate();
     }
     if (UnitGroup != null)
     {
         UnitGroup.Validate();
     }
     if (ValidationMessages != null)
     {
         foreach (var element5 in ValidationMessages)
         {
             if (element5 != null)
             {
                 element5.Validate();
             }
         }
     }
 }