/// <summary>
 /// Constructor for building a new simple object with the POCO class
 /// </summary>
 public OrganizationRelationshipTypeSimple(OrganizationRelationshipType organizationRelationshipType)
     : this()
 {
     OrganizationRelationshipTypeID   = organizationRelationshipType.OrganizationRelationshipTypeID;
     OrganizationRelationshipTypeName = organizationRelationshipType.OrganizationRelationshipTypeName;
     OrganizationRelationshipTypeCanOnlyBeRelatedOnceToAProject      = organizationRelationshipType.IsOrganizationRelationshipTypeRequired;
     OrganizationRelationshipTypeHasOrganizationsWithSpatialBoundary = organizationRelationshipType.HasOrganizationsWithSpatialBoundary();
     OrganizationRelationshipTypeDescription      = organizationRelationshipType.OrganizationRelationshipTypeDescription;
     OrganizationRelationshipTypeIsPrimaryContact = organizationRelationshipType.IsPrimaryContact;
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ProjectOrganization(Project project, Organization organization, OrganizationRelationshipType organizationRelationshipType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectOrganizationID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectID             = project.ProjectID;
     this.Project = project;
     project.ProjectOrganizations.Add(this);
     this.OrganizationID = organization.OrganizationID;
     this.Organization   = organization;
     organization.ProjectOrganizations.Add(this);
     this.OrganizationRelationshipTypeID = organizationRelationshipType.OrganizationRelationshipTypeID;
     this.OrganizationRelationshipType   = organizationRelationshipType;
     organizationRelationshipType.ProjectOrganizations.Add(this);
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ProjectOrganizationUpdate CreateNewBlank(ProjectUpdateBatch projectUpdateBatch, Organization organization, OrganizationRelationshipType organizationRelationshipType)
 {
     return(new ProjectOrganizationUpdate(projectUpdateBatch, organization, organizationRelationshipType));
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ProjectOrganization CreateNewBlank(Project project, Organization organization, OrganizationRelationshipType organizationRelationshipType)
 {
     return(new ProjectOrganization(project, organization, organizationRelationshipType));
 }
 public static string GetDeleteUrl(this OrganizationRelationshipType organizationRelationshipType)
 {
     return(SitkaRoute <OrganizationTypeAndOrganizationRelationshipTypeController> .BuildUrlFromExpression(c =>
                                                                                                           c.DeleteOrganizationRelationshipType(organizationRelationshipType.OrganizationRelationshipTypeID)));
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static OrganizationTypeOrganizationRelationshipType CreateNewBlank(OrganizationType organizationType, OrganizationRelationshipType organizationRelationshipType)
 {
     return(new OrganizationTypeOrganizationRelationshipType(organizationType, organizationRelationshipType));
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public OrganizationTypeOrganizationRelationshipType(OrganizationType organizationType, OrganizationRelationshipType organizationRelationshipType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.OrganizationTypeOrganizationRelationshipTypeID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.OrganizationTypeID = organizationType.OrganizationTypeID;
     this.OrganizationType   = organizationType;
     organizationType.OrganizationTypeOrganizationRelationshipTypes.Add(this);
     this.OrganizationRelationshipTypeID = organizationRelationshipType.OrganizationRelationshipTypeID;
     this.OrganizationRelationshipType   = organizationRelationshipType;
     organizationRelationshipType.OrganizationTypeOrganizationRelationshipTypes.Add(this);
 }