Exemplo n.º 1
0
 /// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(ProjectCustomAttributeDataType other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.ProjectCustomAttributeDataTypeID == ProjectCustomAttributeDataTypeID);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ProjectCustomAttributeType(string projectCustomAttributeTypeName, ProjectCustomAttributeDataType projectCustomAttributeDataType, bool isRequired, bool isViewableOnFactSheet, ProjectCustomAttributeGroup projectCustomAttributeGroup) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectCustomAttributeTypeID     = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectCustomAttributeTypeName   = projectCustomAttributeTypeName;
     this.ProjectCustomAttributeDataTypeID = projectCustomAttributeDataType.ProjectCustomAttributeDataTypeID;
     this.IsRequired                    = isRequired;
     this.IsViewableOnFactSheet         = isViewableOnFactSheet;
     this.ProjectCustomAttributeGroupID = projectCustomAttributeGroup.ProjectCustomAttributeGroupID;
     this.ProjectCustomAttributeGroup   = projectCustomAttributeGroup;
     projectCustomAttributeGroup.ProjectCustomAttributeTypes.Add(this);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ProjectCustomAttributeType CreateNewBlank(ProjectCustomAttributeDataType projectCustomAttributeDataType, ProjectCustomAttributeGroup projectCustomAttributeGroup)
 {
     return(new ProjectCustomAttributeType(default(string), projectCustomAttributeDataType, default(bool), default(bool), projectCustomAttributeGroup));
 }