Ejemplo n.º 1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Dates == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Dates");
     }
     if (PrePaymentAmount == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "PrePaymentAmount");
     }
     if (Service == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Service");
     }
     if (Dates != null)
     {
         foreach (var element in Dates)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (PrePaymentAmount != null)
     {
         PrePaymentAmount.Validate();
     }
     if (Service != null)
     {
         Service.Validate();
     }
     if (TotalAmount != null)
     {
         TotalAmount.Validate();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (CancellationFee == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "CancellationFee");
     }
     if (NoShowFee == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "NoShowFee");
     }
     if (PrePaymentAmount == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "PrePaymentAmount");
     }
     if (RatePlan == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "RatePlan");
     }
     if (TaxDetails == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "TaxDetails");
     }
     if (TimeSlices == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "TimeSlices");
     }
     if (TotalGrossAmount == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "TotalGrossAmount");
     }
     if (UnitGroup == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "UnitGroup");
     }
     if (CancellationFee != null)
     {
         CancellationFee.Validate();
     }
     if (CityTax != null)
     {
         CityTax.Validate();
     }
     if (NoShowFee != null)
     {
         NoShowFee.Validate();
     }
     if (PrePaymentAmount != null)
     {
         PrePaymentAmount.Validate();
     }
     if (RatePlan != null)
     {
         RatePlan.Validate();
     }
     if (TaxDetails != null)
     {
         foreach (var element in TaxDetails)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (TimeSlices != null)
     {
         foreach (var element1 in TimeSlices)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
     if (TotalGrossAmount != null)
     {
         TotalGrossAmount.Validate();
     }
     if (UnitGroup != null)
     {
         UnitGroup.Validate();
     }
     if (ValidationMessages != null)
     {
         foreach (var element2 in ValidationMessages)
         {
             if (element2 != null)
             {
                 element2.Validate();
             }
         }
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Arrival == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Arrival");
     }
     if (ChannelCode == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ChannelCode");
     }
     if (Departure == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Departure");
     }
     if (TimeSlices == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "TimeSlices");
     }
     if (AdditionalGuests != null)
     {
         foreach (var element in AdditionalGuests)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (Commission != null)
     {
         Commission.Validate();
     }
     if (PrePaymentAmount != null)
     {
         PrePaymentAmount.Validate();
     }
     if (PrimaryGuest != null)
     {
         PrimaryGuest.Validate();
     }
     if (Services != null)
     {
         foreach (var element1 in Services)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
     if (TimeSlices != null)
     {
         foreach (var element2 in TimeSlices)
         {
             if (element2 != null)
             {
                 element2.Validate();
             }
         }
     }
 }