Exemplo n.º 1
0
 /// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(ProjectApprovalStatus other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.ProjectApprovalStatusID == ProjectApprovalStatusID);
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static Project CreateNewBlank(ProjectType projectType, ProjectStage projectStage, ProjectLocationSimpleType projectLocationSimpleType, ProjectApprovalStatus projectApprovalStatus)
 {
     return(new Project(projectType, projectStage, default(string), default(bool), projectLocationSimpleType, projectApprovalStatus, default(string)));
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public Project(ProjectType projectType, ProjectStage projectStage, string projectName, bool isFeatured, ProjectLocationSimpleType projectLocationSimpleType, ProjectApprovalStatus projectApprovalStatus, string fhtProjectNumber) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectID     = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectTypeID = projectType.ProjectTypeID;
     this.ProjectType   = projectType;
     projectType.Projects.Add(this);
     this.ProjectStageID = projectStage.ProjectStageID;
     this.ProjectName    = projectName;
     this.IsFeatured     = isFeatured;
     this.ProjectLocationSimpleTypeID = projectLocationSimpleType.ProjectLocationSimpleTypeID;
     this.ProjectApprovalStatusID     = projectApprovalStatus.ProjectApprovalStatusID;
     this.FhtProjectNumber            = fhtProjectNumber;
 }