/// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(ProjectPersonRelationshipType other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.ProjectPersonRelationshipTypeID == ProjectPersonRelationshipTypeID);
 }
Example #2
0
 /// <summary>
 /// Constructor for building a new simple object with the POCO class
 /// </summary>
 public ProjectPersonRelationshipTypeSimple(ProjectPersonRelationshipType relationshipType)
     : this()
 {
     ProjectPersonRelationshipTypeID          = relationshipType.ProjectPersonRelationshipTypeID;
     ProjectPersonRelationshipTypeName        = relationshipType.ProjectPersonRelationshipTypeName;
     ProjectPersonRelationshipTypeDisplayName = relationshipType.ProjectPersonRelationshipTypeDisplayName;
     IsRequired = relationshipType.IsRequired;
     ProjectPersonRelationshipTypeDescription = relationshipType.FieldDefinition.GetFieldDefinitionDescription().ToHtmlString().Replace("<p>", "").Replace("</p>", "");
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ProjectPerson(Project project, Person person, ProjectPersonRelationshipType projectPersonRelationshipType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectPersonID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectID       = project.ProjectID;
     this.Project         = project;
     project.ProjectPeople.Add(this);
     this.PersonID = person.PersonID;
     this.Person   = person;
     person.ProjectPeople.Add(this);
     this.ProjectPersonRelationshipTypeID = projectPersonRelationshipType.ProjectPersonRelationshipTypeID;
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ProjectPerson CreateNewBlank(Project project, Person person, ProjectPersonRelationshipType projectPersonRelationshipType)
 {
     return(new ProjectPerson(project, person, projectPersonRelationshipType));
 }
Example #5
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ProjectPersonUpdate CreateNewBlank(ProjectUpdateBatch projectUpdateBatch, Person person, ProjectPersonRelationshipType projectPersonRelationshipType)
 {
     return(new ProjectPersonUpdate(projectUpdateBatch, person, projectPersonRelationshipType));
 }
Example #6
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ProjectPersonUpdate(ProjectUpdateBatch projectUpdateBatch, Person person, ProjectPersonRelationshipType projectPersonRelationshipType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectPersonUpdateID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectUpdateBatchID  = projectUpdateBatch.ProjectUpdateBatchID;
     this.ProjectUpdateBatch    = projectUpdateBatch;
     projectUpdateBatch.ProjectPersonUpdates.Add(this);
     this.PersonID = person.PersonID;
     this.Person   = person;
     person.ProjectPersonUpdates.Add(this);
     this.ProjectPersonRelationshipTypeID = projectPersonRelationshipType.ProjectPersonRelationshipTypeID;
 }