예제 #1
0
 public SourceControlBMPSimple(SourceControlBMPAttribute sourceControlBMPAttribute)
 {
     SourceControlBMPID = null;
     SourceControlBMPAttributeCategoryID   = sourceControlBMPAttribute.SourceControlBMPAttributeCategoryID;
     SourceControlBMPAttributeCategoryName = sourceControlBMPAttribute.SourceControlBMPAttributeCategory.SourceControlBMPAttributeCategoryName;
     SourceControlBMPAttributeID           = sourceControlBMPAttribute.SourceControlBMPAttributeID;
     SourceControlBMPAttributeName         = sourceControlBMPAttribute.SourceControlBMPAttributeName;
     IsPresent            = null;
     SourceControlBMPNote = null;
 }
예제 #2
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static SourceControlBMP CreateNewBlank(WaterQualityManagementPlan waterQualityManagementPlan, SourceControlBMPAttribute sourceControlBMPAttribute)
 {
     return(new SourceControlBMP(waterQualityManagementPlan, sourceControlBMPAttribute));
 }
예제 #3
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public SourceControlBMP(WaterQualityManagementPlan waterQualityManagementPlan, SourceControlBMPAttribute sourceControlBMPAttribute) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.SourceControlBMPID           = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.WaterQualityManagementPlanID = waterQualityManagementPlan.WaterQualityManagementPlanID;
     this.WaterQualityManagementPlan   = waterQualityManagementPlan;
     waterQualityManagementPlan.SourceControlBMPs.Add(this);
     this.SourceControlBMPAttributeID = sourceControlBMPAttribute.SourceControlBMPAttributeID;
     this.SourceControlBMPAttribute   = sourceControlBMPAttribute;
     sourceControlBMPAttribute.SourceControlBMPs.Add(this);
 }
예제 #4
0
 public static void DeleteSourceControlBMPAttribute(this IQueryable <SourceControlBMPAttribute> sourceControlBMPAttributes, SourceControlBMPAttribute sourceControlBMPAttributeToDelete)
 {
     DeleteSourceControlBMPAttribute(sourceControlBMPAttributes, new List <SourceControlBMPAttribute> {
         sourceControlBMPAttributeToDelete
     });
 }