public ApproveUploadGisViewData(Person currentPerson, Models.FocusArea focusArea, MapInitJson mapInitJson) : base(currentPerson) { MapInitJson = mapInitJson; FocusAreaDetailUrl = SitkaRoute <FocusAreaController> .BuildUrlFromExpression(c => c.Detail(focusArea)); }
public GrantAllocationAwardGridSpec(Person currentPerson, Models.FocusArea focusArea) { ObjectNameSingular = $"{Models.FieldDefinition.GrantAllocationAward.GetFieldDefinitionLabel()}"; ObjectNamePlural = $"{Models.FieldDefinition.GrantAllocationAward.GetFieldDefinitionLabelPluralized()} associated with {focusArea.FocusAreaName}"; var userHasCreatePermissions = new GrantAllocationAwardCreateFeature().HasPermissionByPerson(currentPerson); if (userHasCreatePermissions) { var contentUrl = SitkaRoute <GrantAllocationAwardController> .BuildUrlFromExpression(t => t.NewForAFocusArea(focusArea)); CreateEntityModalDialogForm = new ModalDialogForm(contentUrl, 950, $"Create a new {ObjectNameSingular}"); } var userHasDeletePermissions = new GrantAllocationAwardDeleteFeature().HasPermissionByPerson(currentPerson); if (userHasDeletePermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), userHasDeletePermissions, x.CanGrantAllocationAwardBeDeleted(), true), 30, DhtmlxGridColumnFilterType.None); } Add(Models.FieldDefinition.GrantNumber.ToGridHeaderString(), x => x.GrantAllocation.GrantModification.Grant.GrantNumber, 140, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(Models.FieldDefinition.GrantAllocationName.ToGridHeaderString("Funding Grant Allocation"), x => UrlTemplate.MakeHrefString(x.GrantAllocation.GetDetailUrl(), x.GrantAllocation.GrantAllocationName), 250, DhtmlxGridColumnFilterType.Text); Add(Models.FieldDefinition.GrantAllocationAwardName.ToGridHeaderString(), x => UrlTemplate.MakeHrefString(x.GetDetailUrl(), x.GrantAllocationAwardName), 150, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(Models.FieldDefinition.GrantAllocationAwardAmount.ToGridHeaderString(), x => x.GrantAllocationAwardAmount, 90, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add("Spent Amount", x => x.SpentAmount, 90, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add("Remaining Amount", x => x.Balance, 90, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardExpirationDate.ToGridHeaderString(), x => x.GrantAllocationAwardExpirationDate, 90, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.ProgramIndexProjectCode.ToGridHeaderString(), x => x.GrantAllocation.GetAssociatedProgramIndexProjectCodePairsCommaDelimited(), 90, DhtmlxGridColumnFilterType.SelectFilterStrict); }
public void UpdateModel(Models.FocusArea focusArea) { focusArea.FocusAreaName = FocusAreaName; focusArea.FocusAreaStatusID = FocusAreaStatusID; focusArea.DNRUplandRegionID = DNRUplandRegionID; focusArea.FocusAreaID = FocusAreaID; focusArea.PlannedFootprintAcres = PlannedFootprintAcres; }
public EditViewModel(Models.FocusArea focusArea) { FocusAreaID = focusArea.FocusAreaID; FocusAreaName = focusArea.FocusAreaName; FocusAreaStatusID = focusArea.FocusAreaStatusID; DNRUplandRegionID = focusArea.DNRUplandRegionID; PlannedFootprintAcres = focusArea.PlannedFootprintAcres; }
public void UpdateModel(Models.FocusArea focusArea) { using (var disposableTempFile = DisposableTempFile.MakeDisposableTempFileEndingIn(".gdb.zip")) { var gdbFile = disposableTempFile.FileInfo; FileResourceData.SaveAs(gdbFile.FullName); HttpRequestStorage.DatabaseEntities.FocusAreaLocationStagings.RemoveRange(focusArea.FocusAreaLocationStagings.ToList()); focusArea.FocusAreaLocationStagings.Clear(); FocusAreaLocationStaging.CreateFocusAreaLocationStagingListFromGdb(gdbFile, focusArea); } }
public GrantAllocationAwardGridSpec(Person currentPerson, Models.FocusArea focusArea) : this(currentPerson) { ObjectNameSingular = $"{Models.FieldDefinition.GrantAllocationAward.GetFieldDefinitionLabel()}"; ObjectNamePlural = $"{Models.FieldDefinition.GrantAllocationAward.GetFieldDefinitionLabelPluralized()} associated with {focusArea.FocusAreaName}"; var userHasCreatePermissions = new GrantAllocationAwardCreateFeature().HasPermissionByPerson(currentPerson); if (userHasCreatePermissions) { var contentUrl = SitkaRoute <GrantAllocationAwardController> .BuildUrlFromExpression(t => t.NewForAFocusArea(focusArea)); CreateEntityModalDialogForm = new ModalDialogForm(contentUrl, 950, $"Create a new {ObjectNameSingular}"); } }
public EditLocationViewData(Person currentPerson, Models.FocusArea focusArea) : base(currentPerson) { PageTitle = $"Edit {Models.FieldDefinition.FocusArea.GetFieldDefinitionLabel()} Location"; FocusArea = focusArea; EditBoundaryUrl = SitkaRoute <FocusAreaController> .BuildUrlFromExpression(c => c.EditLocation(focusArea)); ApproveGisUploadUrl = SitkaRoute <FocusAreaController> .BuildUrlFromExpression(c => c.ApproveUploadGis(focusArea)); FocusAreaDetailUrl = SitkaRoute <FocusAreaController> .BuildUrlFromExpression(c => c.Detail(focusArea)); }
public DetailViewData(Person currentPerson, Models.FocusArea focusArea, MapInitJson mapInitJson, bool hasSpatialData, GrantAllocationAwardGridSpec grantAllocationAwardGridSpec ) : base(currentPerson) { FocusArea = focusArea; PageTitle = focusArea.FocusAreaName; ProjectFocusAreaGridName = "ProjectFocusAreaGrid"; ProjectFocusAreaGridDataUrl = SitkaRoute <FocusAreaController> .BuildUrlFromExpression(fac => fac.DetailProjectFocusAreaGridJsonData(focusArea)); GrantAllocationAwardGridSpec = grantAllocationAwardGridSpec; GrantAllocationAwardGridName = "grantAllocationAwardGridSpec"; GrantAllocationAwardGridDataUrl = SitkaRoute <GrantAllocationAwardController> .BuildUrlFromExpression(gaa => gaa.GrantAllocationAwardByFocusAreaGridJsonData(focusArea)); //EntityName = $"{Models.FieldDefinition.FocusArea.GetFieldDefinitionLabel()}"; UserHasFocusAreaManagePermissions = new FocusAreaManageFeature().HasPermissionByPerson(CurrentPerson); EditFocusAreaUrl = SitkaRoute <FocusAreaController> .BuildUrlFromExpression(c => c.Edit(focusArea)); EditLocationUrl = SitkaRoute <FocusAreaController> .BuildUrlFromExpression(c => c.EditLocation(focusArea)); DeleteFocusAreaLocationUrl = SitkaRoute <FocusAreaController> .BuildUrlFromExpression( c => c.DeleteFocusAreaLocation(focusArea)); ProjectsIncludingLeadImplementingGridSpec = new ProjectsIncludingLeadImplementingGridSpec(CurrentPerson, false) { ObjectNameSingular = $"{Models.FieldDefinition.Project.GetFieldDefinitionLabel()}", ObjectNamePlural = $"{Models.FieldDefinition.Project.GetFieldDefinitionLabelPluralized()} associated with {focusArea.FocusAreaName}", SaveFiltersInCookie = true }; //GrantAllocations are accessed from the Grant Index page ManageGrantAllocationsUrl = SitkaRoute <GrantController> .BuildUrlFromExpression(c => c.Index()); IndexUrl = SitkaRoute <FocusAreaController> .BuildUrlFromExpression(c => c.Index()); MapInitJson = mapInitJson; HasSpatialData = hasSpatialData; }
public void UpdateModel(Models.FocusArea focusArea) { focusArea.FocusAreaLocation = DbGeometry.FromText(FocusAreaLocationWkt, FirmaWebConfiguration.GeoSpatialReferenceID); }