/// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ProjectOrganization CreateNewBlank(Project project, Organization organization, RelationshipType relationshipType)
 {
     return(new ProjectOrganization(project, organization, relationshipType));
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public GisUploadSourceOrganization(string gisUploadSourceOrganizationName, bool adjustProjectTypeBasedOnTreatmentTypes, ProjectStage projectStageDefault, bool dataDeriveProjectStage, Organization defaultLeadImplementerOrganization, RelationshipType relationshipTypeForDefaultOrganization, bool importAsDetailedLocationInsteadOfTreatments, bool applyCompletedDateToProject, bool applyStartDateToProject, Program program, bool importAsDetailedLocationInAdditionToTreatments) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.GisUploadSourceOrganizationID          = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.GisUploadSourceOrganizationName        = gisUploadSourceOrganizationName;
     this.AdjustProjectTypeBasedOnTreatmentTypes = adjustProjectTypeBasedOnTreatmentTypes;
     this.ProjectStageDefaultID  = projectStageDefault.ProjectStageID;
     this.DataDeriveProjectStage = dataDeriveProjectStage;
     this.DefaultLeadImplementerOrganizationID = defaultLeadImplementerOrganization.OrganizationID;
     this.DefaultLeadImplementerOrganization   = defaultLeadImplementerOrganization;
     defaultLeadImplementerOrganization.GisUploadSourceOrganizationsWhereYouAreTheDefaultLeadImplementerOrganization.Add(this);
     this.RelationshipTypeForDefaultOrganizationID = relationshipTypeForDefaultOrganization.RelationshipTypeID;
     this.RelationshipTypeForDefaultOrganization   = relationshipTypeForDefaultOrganization;
     relationshipTypeForDefaultOrganization.GisUploadSourceOrganizationsWhereYouAreTheRelationshipTypeForDefaultOrganization.Add(this);
     this.ImportAsDetailedLocationInsteadOfTreatments = importAsDetailedLocationInsteadOfTreatments;
     this.ApplyCompletedDateToProject = applyCompletedDateToProject;
     this.ApplyStartDateToProject     = applyStartDateToProject;
     this.ProgramID = program.ProgramID;
     this.Program   = program;
     program.GisUploadSourceOrganizations.Add(this);
     this.ImportAsDetailedLocationInAdditionToTreatments = importAsDetailedLocationInAdditionToTreatments;
 }
 public static void DeleteRelationshipType(this IQueryable <RelationshipType> relationshipTypes, RelationshipType relationshipTypeToDelete)
 {
     DeleteRelationshipType(relationshipTypes, new List <RelationshipType> {
         relationshipTypeToDelete
     });
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static GisUploadSourceOrganization CreateNewBlank(ProjectStage projectStageDefault, Organization defaultLeadImplementerOrganization, RelationshipType relationshipTypeForDefaultOrganization, Program program)
 {
     return(new GisUploadSourceOrganization(default(string), default(bool), projectStageDefault, default(bool), defaultLeadImplementerOrganization, relationshipTypeForDefaultOrganization, default(bool), default(bool), default(bool), program, default(bool)));
 }