/// <summary>
        /// Convert an IFactorField instance
        /// to a WebFactorField instance.
        /// </summary>
        /// <param name="factorField">An IFactorField instance.</param>
        /// <returns>A WebFactorField instance.</returns>
        private WebFactorField GetFactorField(IFactorField factorField)
        {
            WebFactorField webFactorField;

            webFactorField = new WebFactorField();
            webFactorField.DatabaseFieldName = factorField.DatabaseFieldName;
            webFactorField.FactorDataTypeId  = factorField.FactorDataType.Id;
            if (factorField.Enum.IsNull())
            {
                webFactorField.EnumId = -1;
            }
            else
            {
                webFactorField.EnumId = factorField.Enum.Id;
            }

            webFactorField.Id            = factorField.Id;
            webFactorField.Information   = factorField.Information;
            webFactorField.IsEnumField   = factorField.Enum.IsNotNull();
            webFactorField.IsMain        = factorField.IsMain;
            webFactorField.IsSubstantial = factorField.IsSubstantial;
            webFactorField.Label         = factorField.Label;
            webFactorField.Size          = factorField.Size;
            webFactorField.TypeId        = factorField.Type.Id;
            webFactorField.Unit          = factorField.Unit;

            return(webFactorField);
        }
 /// <summary>
 /// Create a SpeciesFactField instance.
 /// </summary>
 /// <param name="speciesFact">The SpeciesFact that this SpeciesFactField belongs to.</param>
 /// <param name="factorField">Factor field for the species fact field.</param>
 /// <param name="hasValue">Indication whether or not a value is initially specified.</param>
 /// <param name="value">The value of the species fact field.</param>
 public SpeciesFactField(ISpeciesFact speciesFact,
                         IFactorField factorField,
                         Boolean hasValue,
                         Object value)
 {
     FactorField = factorField;
     Id          = factorField.Id;
     SpeciesFact = speciesFact;
     this.Update(hasValue, value);
 }
 /// <summary>
 /// Create a SpeciesFactField instance.
 /// </summary>
 /// <param name="speciesFact">The SpeciesFact that this SpeciesFactField belongs to.</param>
 /// <param name="factorField">Factor field for the species fact field.</param>
 public SpeciesFactField(ISpeciesFact speciesFact,
                         IFactorField factorField)
     : this(speciesFact, factorField, false, null)
 {
 }