Example #1
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public MatchmakerOrganizationTaxonomyBranch(Organization organization, TaxonomyBranch taxonomyBranch, bool isActive) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.MatchmakerOrganizationTaxonomyBranchID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.OrganizationID = organization.OrganizationID;
     this.Organization   = organization;
     organization.MatchmakerOrganizationTaxonomyBranches.Add(this);
     this.TaxonomyBranchID = taxonomyBranch.TaxonomyBranchID;
     this.TaxonomyBranch   = taxonomyBranch;
     taxonomyBranch.MatchmakerOrganizationTaxonomyBranches.Add(this);
     this.IsActive = isActive;
 }
Example #2
0
        /// <summary>
        /// Constructor for building a new object with MinimalConstructor required fields in preparation for insert into database
        /// </summary>
        public ObligationRequest(bool isModification, int contractTypeID, int obligationRequestStatusID, string descriptionOfNeed, DateTime createDate, int createPersonID) : this()
        {
            // Mark this as a new object by setting primary key with special value
            this.ObligationRequestID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();

            this.IsModification            = isModification;
            this.ContractTypeID            = contractTypeID;
            this.ObligationRequestStatusID = obligationRequestStatusID;
            this.DescriptionOfNeed         = descriptionOfNeed;
            this.CreateDate     = createDate;
            this.CreatePersonID = createPersonID;
        }
        /// <summary>
        /// Constructor for building a new object with MinimalConstructor required fields in preparation for insert into database
        /// </summary>
        public ProjectProjectStatus(int projectID, int projectStatusID, DateTime projectProjectStatusUpdateDate, int projectProjectStatusCreatePersonID, DateTime projectProjectStatusCreateDate, bool isFinalStatusUpdate) : this()
        {
            // Mark this as a new object by setting primary key with special value
            this.ProjectProjectStatusID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();

            this.ProjectID       = projectID;
            this.ProjectStatusID = projectStatusID;
            this.ProjectProjectStatusUpdateDate     = projectProjectStatusUpdateDate;
            this.ProjectProjectStatusCreatePersonID = projectProjectStatusCreatePersonID;
            this.ProjectProjectStatusCreateDate     = projectProjectStatusCreateDate;
            this.IsFinalStatusUpdate = isFinalStatusUpdate;
        }
Example #4
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public CostAuthorityProject(CostAuthority costAuthority, Project project, bool isPrimaryProjectCawbs) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.CostAuthorityProjectID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.CostAuthorityID        = costAuthority.CostAuthorityID;
     this.CostAuthority          = costAuthority;
     costAuthority.CostAuthorityProjects.Add(this);
     this.ProjectID = project.ProjectID;
     this.Project   = project;
     project.CostAuthorityProjects.Add(this);
     this.IsPrimaryProjectCawbs = isPrimaryProjectCawbs;
 }
Example #5
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public Organization(string organizationName, bool isActive, OrganizationType organizationType, bool useOrganizationBoundaryForMatchmaker, bool isUnknownOrUnspecified) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.OrganizationID     = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.OrganizationName   = organizationName;
     this.IsActive           = isActive;
     this.OrganizationTypeID = organizationType.OrganizationTypeID;
     this.OrganizationType   = organizationType;
     organizationType.Organizations.Add(this);
     this.UseOrganizationBoundaryForMatchmaker = useOrganizationBoundaryForMatchmaker;
     this.IsUnknownOrUnspecified = isUnknownOrUnspecified;
 }
 /// <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;
 }
Example #7
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public AgreementPerson(Agreement agreement, Person person, AgreementPersonRole agreementPersonRole) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.AgreementPersonID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.AgreementID       = agreement.AgreementID;
     this.Agreement         = agreement;
     agreement.AgreementPeople.Add(this);
     this.PersonID = person.PersonID;
     this.Person   = person;
     person.AgreementPeople.Add(this);
     this.AgreementPersonRoleID = agreementPersonRole.AgreementPersonRoleID;
 }
Example #8
0
        /// <summary>
        /// Constructor for building a new object with MinimalConstructor required fields in preparation for insert into database
        /// </summary>
        public GrantModification(string grantModificationName, int grantID, DateTime grantModificationStartDate, DateTime grantModificationEndDate, int grantModificationStatusID, decimal grantModificationAmount) : this()
        {
            // Mark this as a new object by setting primary key with special value
            this.GrantModificationID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();

            this.GrantModificationName = grantModificationName;
            this.GrantID = grantID;
            this.GrantModificationStartDate = grantModificationStartDate;
            this.GrantModificationEndDate   = grantModificationEndDate;
            this.GrantModificationStatusID  = grantModificationStatusID;
            this.GrantModificationAmount    = grantModificationAmount;
        }
        /// <summary>
        /// Constructor for building a new object with MinimalConstructor required fields in preparation for insert into database
        /// </summary>
        public ExternalMapLayer(string displayName, string layerUrl, bool displayOnAllProjectMaps, bool layerIsOnByDefault, bool isActive, bool isTiledMapService) : this()
        {
            // Mark this as a new object by setting primary key with special value
            this.ExternalMapLayerID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();

            this.DisplayName             = displayName;
            this.LayerUrl                = layerUrl;
            this.DisplayOnAllProjectMaps = displayOnAllProjectMaps;
            this.LayerIsOnByDefault      = layerIsOnByDefault;
            this.IsActive                = isActive;
            this.IsTiledMapService       = isTiledMapService;
        }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public GrantAllocationChangeLog(GrantAllocation grantAllocation, Person changePerson, DateTime changeDate) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.GrantAllocationChangeLogID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.GrantAllocationID          = grantAllocation.GrantAllocationID;
     this.GrantAllocation            = grantAllocation;
     grantAllocation.GrantAllocationChangeLogs.Add(this);
     this.ChangePersonID = changePerson.PersonID;
     this.ChangePerson   = changePerson;
     changePerson.GrantAllocationChangeLogsWhereYouAreTheChangePerson.Add(this);
     this.ChangeDate = changeDate;
 }
        /// <summary>
        /// Constructor for building a new object with MinimalConstructor required fields in preparation for insert into database
        /// </summary>
        public OnlandVisualTrashAssessment(int createdByPersonID, DateTime createdDate, int stormwaterJurisdictionID, int onlandVisualTrashAssessmentStatusID, bool isTransectBackingAssessment, bool isProgressAssessment) : this()
        {
            // Mark this as a new object by setting primary key with special value
            this.OnlandVisualTrashAssessmentID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();

            this.CreatedByPersonID                   = createdByPersonID;
            this.CreatedDate                         = createdDate;
            this.StormwaterJurisdictionID            = stormwaterJurisdictionID;
            this.OnlandVisualTrashAssessmentStatusID = onlandVisualTrashAssessmentStatusID;
            this.IsTransectBackingAssessment         = isTransectBackingAssessment;
            this.IsProgressAssessment                = isProgressAssessment;
        }
Example #12
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ObligationItem(string obligationItemKey, ObligationNumber obligationNumber, Vendor vendor) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ObligationItemID   = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ObligationItemKey  = obligationItemKey;
     this.ObligationNumberID = obligationNumber.ObligationNumberID;
     this.ObligationNumber   = obligationNumber;
     obligationNumber.ObligationItems.Add(this);
     this.VendorID = vendor.VendorID;
     this.Vendor   = vendor;
     vendor.ObligationItems.Add(this);
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public PerformanceMeasure(string performanceMeasureDisplayName, MeasurementUnitType measurementUnitType, PerformanceMeasureType performanceMeasureType, bool isSummable, PerformanceMeasureDataSourceType performanceMeasureDataSourceType, bool canBeChartedCumulatively, bool includeInBiOpAnnualReport) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.PerformanceMeasureID          = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.PerformanceMeasureDisplayName = performanceMeasureDisplayName;
     this.MeasurementUnitTypeID         = measurementUnitType.MeasurementUnitTypeID;
     this.PerformanceMeasureTypeID      = performanceMeasureType.PerformanceMeasureTypeID;
     this.IsSummable = isSummable;
     this.PerformanceMeasureDataSourceTypeID = performanceMeasureDataSourceType.PerformanceMeasureDataSourceTypeID;
     this.CanBeChartedCumulatively           = canBeChartedCumulatively;
     this.IncludeInBiOpAnnualReport          = includeInBiOpAnnualReport;
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public GrantAllocationAwardSuppliesLineItem(GrantAllocationAward grantAllocationAward, string grantAllocationAwardSuppliesLineItemDescription, string grantAllocationAwardSuppliesLineItemTarOrMonth, DateTime grantAllocationAwardSuppliesLineItemDate, decimal grantAllocationAwardSuppliesLineItemAmount) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.GrantAllocationAwardSuppliesLineItemID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.GrantAllocationAwardID = grantAllocationAward.GrantAllocationAwardID;
     this.GrantAllocationAward   = grantAllocationAward;
     grantAllocationAward.GrantAllocationAwardSuppliesLineItems.Add(this);
     this.GrantAllocationAwardSuppliesLineItemDescription = grantAllocationAwardSuppliesLineItemDescription;
     this.GrantAllocationAwardSuppliesLineItemTarOrMonth  = grantAllocationAwardSuppliesLineItemTarOrMonth;
     this.GrantAllocationAwardSuppliesLineItemDate        = grantAllocationAwardSuppliesLineItemDate;
     this.GrantAllocationAwardSuppliesLineItemAmount      = grantAllocationAwardSuppliesLineItemAmount;
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ProjectGeospatialAreaTypeNoteUpdate(ProjectUpdateBatch projectUpdateBatch, GeospatialAreaType geospatialAreaType, string notes) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectGeospatialAreaTypeNoteUpdateID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectUpdateBatchID = projectUpdateBatch.ProjectUpdateBatchID;
     this.ProjectUpdateBatch   = projectUpdateBatch;
     projectUpdateBatch.ProjectGeospatialAreaTypeNoteUpdates.Add(this);
     this.GeospatialAreaTypeID = geospatialAreaType.GeospatialAreaTypeID;
     this.GeospatialAreaType   = geospatialAreaType;
     geospatialAreaType.ProjectGeospatialAreaTypeNoteUpdates.Add(this);
     this.Notes = notes;
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public GisUploadAttempt(GisUploadSourceOrganization gisUploadSourceOrganization, Person gisUploadAttemptCreatePerson, DateTime gisUploadAttemptCreateDate) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.GisUploadAttemptID            = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.GisUploadSourceOrganizationID = gisUploadSourceOrganization.GisUploadSourceOrganizationID;
     this.GisUploadSourceOrganization   = gisUploadSourceOrganization;
     gisUploadSourceOrganization.GisUploadAttempts.Add(this);
     this.GisUploadAttemptCreatePersonID = gisUploadAttemptCreatePerson.PersonID;
     this.GisUploadAttemptCreatePerson   = gisUploadAttemptCreatePerson;
     gisUploadAttemptCreatePerson.GisUploadAttemptsWhereYouAreTheGisUploadAttemptCreatePerson.Add(this);
     this.GisUploadAttemptCreateDate = gisUploadAttemptCreateDate;
 }
Example #17
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public QuickBMP(WaterQualityManagementPlan waterQualityManagementPlan, TreatmentBMPType treatmentBMPType, string quickBMPName) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.QuickBMPID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.WaterQualityManagementPlanID = waterQualityManagementPlan.WaterQualityManagementPlanID;
     this.WaterQualityManagementPlan   = waterQualityManagementPlan;
     waterQualityManagementPlan.QuickBMPs.Add(this);
     this.TreatmentBMPTypeID = treatmentBMPType.TreatmentBMPTypeID;
     this.TreatmentBMPType   = treatmentBMPType;
     treatmentBMPType.QuickBMPs.Add(this);
     this.QuickBMPName = quickBMPName;
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ProjectRelevantCostTypeUpdate(ProjectUpdateBatch projectUpdateBatch, CostType costType, ProjectRelevantCostTypeGroup projectRelevantCostTypeGroup) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectRelevantCostTypeUpdateID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectUpdateBatchID            = projectUpdateBatch.ProjectUpdateBatchID;
     this.ProjectUpdateBatch = projectUpdateBatch;
     projectUpdateBatch.ProjectRelevantCostTypeUpdates.Add(this);
     this.CostTypeID = costType.CostTypeID;
     this.CostType   = costType;
     costType.ProjectRelevantCostTypeUpdates.Add(this);
     this.ProjectRelevantCostTypeGroupID = projectRelevantCostTypeGroup.ProjectRelevantCostTypeGroupID;
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ProjectTypePerformanceMeasure(ProjectType projectType, PerformanceMeasure performanceMeasure, bool isPrimaryProjectType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectTypePerformanceMeasureID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectTypeID = projectType.ProjectTypeID;
     this.ProjectType   = projectType;
     projectType.ProjectTypePerformanceMeasures.Add(this);
     this.PerformanceMeasureID = performanceMeasure.PerformanceMeasureID;
     this.PerformanceMeasure   = performanceMeasure;
     performanceMeasure.ProjectTypePerformanceMeasures.Add(this);
     this.IsPrimaryProjectType = isPrimaryProjectType;
 }
        /// <summary>
        /// Constructor for building a new object with MinimalConstructor required fields in preparation for insert into database
        /// </summary>
        public OrganizationRelationshipType(string organizationRelationshipTypeName, bool canStewardProjects, bool isPrimaryContact, bool isOrganizationRelationshipTypeRequired, bool reportInAccomplishmentsDashboard, bool showOnFactSheet) : this()
        {
            // Mark this as a new object by setting primary key with special value
            this.OrganizationRelationshipTypeID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();

            this.OrganizationRelationshipTypeName = organizationRelationshipTypeName;
            this.CanStewardProjects = canStewardProjects;
            this.IsPrimaryContact   = isPrimaryContact;
            this.IsOrganizationRelationshipTypeRequired = isOrganizationRelationshipTypeRequired;
            this.ReportInAccomplishmentsDashboard       = reportInAccomplishmentsDashboard;
            this.ShowOnFactSheet = showOnFactSheet;
        }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public GrantAllocationAwardContractorInvoice(GrantAllocationAward grantAllocationAward, string grantAllocationAwardContractorInvoiceDescription, string grantAllocationAwardContractorInvoiceNumber, DateTime grantAllocationAwardContractorInvoiceDate, GrantAllocationAwardContractorInvoiceType grantAllocationAwardContractorInvoiceType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.GrantAllocationAwardContractorInvoiceID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.GrantAllocationAwardID = grantAllocationAward.GrantAllocationAwardID;
     this.GrantAllocationAward   = grantAllocationAward;
     grantAllocationAward.GrantAllocationAwardContractorInvoices.Add(this);
     this.GrantAllocationAwardContractorInvoiceDescription = grantAllocationAwardContractorInvoiceDescription;
     this.GrantAllocationAwardContractorInvoiceNumber      = grantAllocationAwardContractorInvoiceNumber;
     this.GrantAllocationAwardContractorInvoiceDate        = grantAllocationAwardContractorInvoiceDate;
     this.GrantAllocationAwardContractorInvoiceTypeID      = grantAllocationAwardContractorInvoiceType.GrantAllocationAwardContractorInvoiceTypeID;
 }
Example #22
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ProjectImageUpdate(ProjectUpdateBatch projectUpdateBatch, string caption, string credit, bool isKeyPhoto, bool excludeFromFactSheet) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectImageUpdateID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectUpdateBatchID = projectUpdateBatch.ProjectUpdateBatchID;
     this.ProjectUpdateBatch   = projectUpdateBatch;
     projectUpdateBatch.ProjectImageUpdates.Add(this);
     this.Caption              = caption;
     this.Credit               = credit;
     this.IsKeyPhoto           = isKeyPhoto;
     this.ExcludeFromFactSheet = excludeFromFactSheet;
 }
Example #23
0
        private ViewResult ViewEdit(EditViewModel viewModel, TreatmentBMPAssessmentObservationType treatmentBMPAssessmentObservationType)
        {
            var instructionsNeptunePage              = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManageObservationTypeInstructions);
            var observationInstructionsNeptunePage   = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManageObservationTypeObservationInstructions);
            var labelAndUnitsInstructionsNeptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManageObservationTypeLabelsAndUnitsInstructions);

            var submitUrl = ModelObjectHelpers.IsRealPrimaryKeyValue(viewModel.TreatmentBMPAssessmentObservationTypeID) ? SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(x => x.Edit(viewModel.TreatmentBMPAssessmentObservationTypeID)) : SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(x => x.New());

            var viewData = new EditViewData(CurrentPerson, MeasurementUnitType.All, ObservationTypeSpecification.All, ObservationThresholdType.All, ObservationTargetType.All, ObservationTypeCollectionMethod.All.ToList(), submitUrl, instructionsNeptunePage, observationInstructionsNeptunePage, labelAndUnitsInstructionsNeptunePage, treatmentBMPAssessmentObservationType);

            return(RazorView <Edit, EditViewData, EditViewModel>(viewData, viewModel));
        }
Example #24
0
        /// <summary>
        /// Constructor for building a new object with MinimalConstructor required fields in preparation for insert into database
        /// </summary>
        public GeospatialAreaType(string geospatialAreaTypeName, string geospatialAreaTypeNamePluralized, string geospatialAreaLayerName, bool displayOnAllProjectMaps, bool onByDefaultOnProjectMap, bool onByDefaultOnOtherMaps) : this()
        {
            // Mark this as a new object by setting primary key with special value
            this.GeospatialAreaTypeID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();

            this.GeospatialAreaTypeName           = geospatialAreaTypeName;
            this.GeospatialAreaTypeNamePluralized = geospatialAreaTypeNamePluralized;
            this.GeospatialAreaLayerName          = geospatialAreaLayerName;
            this.DisplayOnAllProjectMaps          = displayOnAllProjectMaps;
            this.OnByDefaultOnProjectMap          = onByDefaultOnProjectMap;
            this.OnByDefaultOnOtherMaps           = onByDefaultOnOtherMaps;
        }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ClassificationPerformanceMeasure(Classification classification, PerformanceMeasure performanceMeasure, bool isPrimaryChart) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ClassificationPerformanceMeasureID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ClassificationID = classification.ClassificationID;
     this.Classification   = classification;
     classification.ClassificationPerformanceMeasures.Add(this);
     this.PerformanceMeasureID = performanceMeasure.PerformanceMeasureID;
     this.PerformanceMeasure   = performanceMeasure;
     performanceMeasure.ClassificationPerformanceMeasures.Add(this);
     this.IsPrimaryChart = isPrimaryChart;
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public Organization(string organizationName, string organizationShortName, bool isActive, OrganizationType organizationType, bool isEditable) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.OrganizationID        = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.OrganizationName      = organizationName;
     this.OrganizationShortName = organizationShortName;
     this.IsActive           = isActive;
     this.OrganizationTypeID = organizationType.OrganizationTypeID;
     this.OrganizationType   = organizationType;
     organizationType.Organizations.Add(this);
     this.IsEditable = isEditable;
 }
Example #27
0
        /// <summary>
        /// Constructor for building a new object with MinimalConstructor required fields in preparation for insert into database
        /// </summary>
        public GrantAllocationAwardPersonnelAndBenefitsLineItem(int grantAllocationAwardID, string grantAllocationAwardPersonnelAndBenefitsLineItemTarOrMonth, DateTime grantAllocationAwardPersonnelAndBenefitsLineItemDate, int grantAllocationAwardPersonnelAndBenefitsLineItemTarHours, decimal grantAllocationAwardPersonnelAndBenefitsLineItemHourlyRate, decimal grantAllocationAwardPersonnelAndBenefitsLineItemFringeRate) : this()
        {
            // Mark this as a new object by setting primary key with special value
            this.GrantAllocationAwardPersonnelAndBenefitsLineItemID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();

            this.GrantAllocationAwardID = grantAllocationAwardID;
            this.GrantAllocationAwardPersonnelAndBenefitsLineItemTarOrMonth = grantAllocationAwardPersonnelAndBenefitsLineItemTarOrMonth;
            this.GrantAllocationAwardPersonnelAndBenefitsLineItemDate       = grantAllocationAwardPersonnelAndBenefitsLineItemDate;
            this.GrantAllocationAwardPersonnelAndBenefitsLineItemTarHours   = grantAllocationAwardPersonnelAndBenefitsLineItemTarHours;
            this.GrantAllocationAwardPersonnelAndBenefitsLineItemHourlyRate = grantAllocationAwardPersonnelAndBenefitsLineItemHourlyRate;
            this.GrantAllocationAwardPersonnelAndBenefitsLineItemFringeRate = grantAllocationAwardPersonnelAndBenefitsLineItemFringeRate;
        }
Example #28
0
        private PartialViewResult ViewEdit(EditViewModel viewModel, FundingSourceCustomAttributeType fundingSourceCustomAttributeType)
        {
            var instructionsFirmaPage = FirmaPageTypeEnum.ManageFundingSourceCustomAttributeTypeInstructions.GetFirmaPage();
            var submitUrl             = ModelObjectHelpers.IsRealPrimaryKeyValue(viewModel.FundingSourceCustomAttributeTypeID)
                ? SitkaRoute <FundingSourceCustomAttributeTypeController> .BuildUrlFromExpression(x => x.Edit(viewModel.FundingSourceCustomAttributeTypeID))
                : SitkaRoute <FundingSourceCustomAttributeTypeController> .BuildUrlFromExpression(x => x.New());

            var viewData = new EditViewData(CurrentFirmaSession, MeasurementUnitType.All, FundingSourceCustomAttributeDataType.All, Role.All,
                                            submitUrl, instructionsFirmaPage, fundingSourceCustomAttributeType);

            return(RazorPartialView <Edit, EditViewData, EditViewModel>(viewData, viewModel));
        }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public GrantNoteInternal(Grant grant, Person createdByPerson, DateTime createdDate) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.GrantNoteInternalID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.GrantID             = grant.GrantID;
     this.Grant = grant;
     grant.GrantNoteInternals.Add(this);
     this.CreatedByPersonID = createdByPerson.PersonID;
     this.CreatedByPerson   = createdByPerson;
     createdByPerson.GrantNoteInternalsWhereYouAreTheCreatedByPerson.Add(this);
     this.CreatedDate = createdDate;
 }
Example #30
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public StormwaterJurisdiction(Organization organization, StateProvince stateProvince, StormwaterJurisdictionPublicBMPVisibilityType stormwaterJurisdictionPublicBMPVisibilityType, StormwaterJurisdictionPublicWQMPVisibilityType stormwaterJurisdictionPublicWQMPVisibilityType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.StormwaterJurisdictionID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.OrganizationID           = organization.OrganizationID;
     this.Organization             = organization;
     this.StateProvinceID          = stateProvince.StateProvinceID;
     this.StateProvince            = stateProvince;
     stateProvince.StormwaterJurisdictions.Add(this);
     this.StormwaterJurisdictionPublicBMPVisibilityTypeID  = stormwaterJurisdictionPublicBMPVisibilityType.StormwaterJurisdictionPublicBMPVisibilityTypeID;
     this.StormwaterJurisdictionPublicWQMPVisibilityTypeID = stormwaterJurisdictionPublicWQMPVisibilityType.StormwaterJurisdictionPublicWQMPVisibilityTypeID;
 }