/// <summary>
 /// Sets the value of the <c>&lt;PreferenceType&gt;</c> element.
 /// </summary>
 /// <param name="val">A PreferenceType object</param>
 /// <remarks>
 /// <para>The SIF specification defines the meaning of this element as: "The Type of preference"</para>
 /// <para>Version: 2.6</para>
 /// <para>Since: 2.3</para>
 /// </remarks>
 public void SetPreferenceType(PreferenceType val)
 {
     SetField(CateringDTD.DIETARYPREFERENCE_PREFERENCETYPE, val);
 }
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="preferenceType">The Type of preference</param>
 ///<param name="mealComponent">The component of meal</param>
 ///
 public DietaryPreference(PreferenceType preferenceType, string mealComponent) : base(CateringDTD.DIETARYPREFERENCE)
 {
     this.SetPreferenceType(preferenceType);
     this.MealComponent = mealComponent;
 }
 /// <summary>
 /// Sets the value of the <c>&lt;PreferenceType&gt;</c> element.
 /// </summary>
 /// <param name="val">A PreferenceType object</param>
 /// <remarks>
 /// <para>The SIF specification defines the meaning of this element as: "The Type of preference"</para>
 /// <para>Version: 2.6</para>
 /// <para>Since: 2.3</para>
 /// </remarks>
 public void SetPreferenceType( PreferenceType val )
 {
     SetField( CateringDTD.DIETARYPREFERENCE_PREFERENCETYPE, val );
 }
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="preferenceType">The Type of preference</param>
 ///<param name="mealComponent">The component of meal</param>
 ///
 public DietaryPreference( PreferenceType preferenceType, string mealComponent )
     : base(CateringDTD.DIETARYPREFERENCE)
 {
     this.SetPreferenceType( preferenceType );
     this.MealComponent = mealComponent;
 }
Example #5
0
 ///<summary>Adds the value of the <c>&lt;DietaryPreference&gt;</c> element.</summary>
 /// <param name="PreferenceType">The Type of preference</param>
 /// <param name="MealComponent">The component of meal</param>
 ///<remarks>
 /// <para>This form of <c>setDietaryPreference</c> is provided as a convenience method
 /// that is functionally equivalent to the method <c>AddDietaryPreference</c></para>
 /// <para>Version: 2.6</para>
 /// <para>Since: 2.3</para>
 /// </remarks>
 public void AddDietaryPreference(PreferenceType PreferenceType, string MealComponent)
 {
     AddChild(CateringDTD.DIETARYPREFERENCELIST_DIETARYPREFERENCE, new DietaryPreference(PreferenceType, MealComponent));
 }