/// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(SizingBasisType other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.SizingBasisTypeID == SizingBasisTypeID);
 }
示例#2
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public TreatmentBMP(string treatmentBMPName, TreatmentBMPType treatmentBMPType, StormwaterJurisdiction stormwaterJurisdiction, Organization ownerOrganization, bool inventoryIsVerified, TrashCaptureStatusType trashCaptureStatusType, SizingBasisType sizingBasisType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.TreatmentBMPID     = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.TreatmentBMPName   = treatmentBMPName;
     this.TreatmentBMPTypeID = treatmentBMPType.TreatmentBMPTypeID;
     this.TreatmentBMPType   = treatmentBMPType;
     treatmentBMPType.TreatmentBMPs.Add(this);
     this.StormwaterJurisdictionID = stormwaterJurisdiction.StormwaterJurisdictionID;
     this.StormwaterJurisdiction   = stormwaterJurisdiction;
     stormwaterJurisdiction.TreatmentBMPs.Add(this);
     this.OwnerOrganizationID = ownerOrganization.OrganizationID;
     this.OwnerOrganization   = ownerOrganization;
     ownerOrganization.TreatmentBMPsWhereYouAreTheOwnerOrganization.Add(this);
     this.InventoryIsVerified      = inventoryIsVerified;
     this.TrashCaptureStatusTypeID = trashCaptureStatusType.TrashCaptureStatusTypeID;
     this.SizingBasisTypeID        = sizingBasisType.SizingBasisTypeID;
 }
示例#3
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static TreatmentBMP CreateNewBlank(TreatmentBMPType treatmentBMPType, StormwaterJurisdiction stormwaterJurisdiction, Organization ownerOrganization, TrashCaptureStatusType trashCaptureStatusType, SizingBasisType sizingBasisType)
 {
     return(new TreatmentBMP(default(string), treatmentBMPType, stormwaterJurisdiction, ownerOrganization, default(bool), trashCaptureStatusType, sizingBasisType));
 }