/// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(PreliminarySourceIdentificationType other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.PreliminarySourceIdentificationTypeID == PreliminarySourceIdentificationTypeID);
 }
Пример #2
0
        public string GetDisplay()
        {
            if (PreliminarySourceIdentificationType.IsOther())
            {
                return($"Other: {ExplanationIfTypeIsOther}");
            }

            return(PreliminarySourceIdentificationType.PreliminarySourceIdentificationTypeDisplayName);
        }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static OnlandVisualTrashAssessmentPreliminarySourceIdentificationType CreateNewBlank(OnlandVisualTrashAssessment onlandVisualTrashAssessment, PreliminarySourceIdentificationType preliminarySourceIdentificationType)
 {
     return(new OnlandVisualTrashAssessmentPreliminarySourceIdentificationType(onlandVisualTrashAssessment, preliminarySourceIdentificationType));
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public OnlandVisualTrashAssessmentPreliminarySourceIdentificationType(OnlandVisualTrashAssessment onlandVisualTrashAssessment, PreliminarySourceIdentificationType preliminarySourceIdentificationType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.OnlandVisualTrashAssessmentPreliminarySourceIdentificationTypeID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.OnlandVisualTrashAssessmentID = onlandVisualTrashAssessment.OnlandVisualTrashAssessmentID;
     this.OnlandVisualTrashAssessment   = onlandVisualTrashAssessment;
     onlandVisualTrashAssessment.OnlandVisualTrashAssessmentPreliminarySourceIdentificationTypes.Add(this);
     this.PreliminarySourceIdentificationTypeID = preliminarySourceIdentificationType.PreliminarySourceIdentificationTypeID;
 }