Beispiel #1
0
 /// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(TreatmentBMPAssessmentType other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.TreatmentBMPAssessmentTypeID == TreatmentBMPAssessmentTypeID);
 }
Beispiel #2
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static TreatmentBMPAssessment CreateNewBlank(TreatmentBMP treatmentBMP, TreatmentBMPType treatmentBMPType, FieldVisit fieldVisit, TreatmentBMPAssessmentType treatmentBMPAssessmentType)
 {
     return(new TreatmentBMPAssessment(treatmentBMP, treatmentBMPType, fieldVisit, treatmentBMPAssessmentType, default(bool)));
 }
Beispiel #3
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public TreatmentBMPAssessment(TreatmentBMP treatmentBMP, TreatmentBMPType treatmentBMPType, FieldVisit fieldVisit, TreatmentBMPAssessmentType treatmentBMPAssessmentType, bool isAssessmentComplete) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.TreatmentBMPAssessmentID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.TreatmentBMPID           = treatmentBMP.TreatmentBMPID;
     this.TreatmentBMP             = treatmentBMP;
     treatmentBMP.TreatmentBMPAssessments.Add(this);
     this.TreatmentBMPTypeID = treatmentBMPType.TreatmentBMPTypeID;
     this.TreatmentBMPType   = treatmentBMPType;
     treatmentBMPType.TreatmentBMPAssessments.Add(this);
     this.FieldVisitID = fieldVisit.FieldVisitID;
     this.FieldVisit   = fieldVisit;
     fieldVisit.TreatmentBMPAssessments.Add(this);
     this.TreatmentBMPAssessmentTypeID = treatmentBMPAssessmentType.TreatmentBMPAssessmentTypeID;
     this.IsAssessmentComplete         = isAssessmentComplete;
 }