public LandownerCostShareLineItemProjectDetailGridSpec(Person currentPerson) { bool userHasEditPermissions = new GrantAllocationAwardLandownerCostShareLineItemEditAsAdminFeature().HasPermissionByPerson(currentPerson); int buttonGridWidth = 30; Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditLandownerCostShareLineItemUrl(), $"Edit {Models.FieldDefinition.GrantAllocationAwardLandownerCostShareLineItem.GetFieldDefinitionLabel()}"), userHasEditPermissions), buttonGridWidth, DhtmlxGridColumnFilterType.None); Add(Models.FieldDefinition.GrantAllocationAward.ToGridHeaderString(), a => a.GrantAllocationAwardID != null ? UrlTemplate.MakeHrefString(a.GrantAllocationAward.GetDetailUrl(), a.GrantAllocationAward.GrantAllocationAwardName) : new HtmlString($"No {Models.FieldDefinition.GrantAllocationAward.GetFieldDefinitionLabel()} set"), 150, DhtmlxGridColumnFilterType.Html); Add(Models.FieldDefinition.ProgramIndexProjectCode.ToGridHeaderString(), a => a.GrantAllocationAwardID != null ? a.GrantAllocationAward.GrantAllocation.GetAssociatedProgramIndexProjectCodePairsCommaDelimited() : "Not Available", 75, DhtmlxGridColumnFilterType.Text); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareStatus.GetFieldDefinitionLabel(), a => a.GetStatusDisplayName(), 125, DhtmlxGridColumnFilterType.Text); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareStartDate.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault()?.TreatmentStartDate, 125, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareEndDate.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault()?.TreatmentEndDate, 125, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareFootprintAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault()?.TreatmentFootprintAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareChippingAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Chipping)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostSharePruningAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Pruning)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareThinningAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Thinning)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareSlashAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Slash)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareMasticationAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Mastication)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareGrazingAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Grazing)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareLopAndScatterAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.LopAndScatter)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareBiomassRemovalAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.BiomassRemoval)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareHandPileAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.HandPile)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareBroadcastBurnAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.BroadcastBurn)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareHandPileBurnAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.HandPileBurn)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareMachinePileBurnAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.MachinePileBurn)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareOtherTreatmentAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Other)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareAllocatedAmount.ToGridHeaderString(), a => a.GrantAllocationAwardLandownerCostShareLineItemAllocatedAmount, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareTotalCost.ToGridHeaderString(), s => s.GrantAllocationAwardLandownerCostShareLineItemTotalCost, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareActualMatch.ToGridHeaderString(), s => s.GrantAllocationAwardLandownerCostShareLineItemActualMatch, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareGrantCost.ToGridHeaderString(), s => s.GrantAllocationAwardLandownerCostShareLineItemGrantCost, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareNotes.ToGridHeaderString(), a => a.GrantAllocationAwardLandownerCostShareLineItemNotes, 250, DhtmlxGridColumnFilterType.Text); }
public SuppliesLineItemGridSpec(Person currentPerson, Models.GrantAllocationAward grantAllocationAward) { ShowFilterBar = true; ObjectNameSingular = Models.FieldDefinition.GrantAllocationAwardSuppliesLineItem.GetFieldDefinitionLabel(); ObjectNamePlural = Models.FieldDefinition.GrantAllocationAwardSuppliesLineItem.GetFieldDefinitionLabelPluralized(); bool hasDeletePermission = new GrantAllocationAwardSuppliesLineItemDeleteFeature().HasPermissionByPerson(currentPerson); bool hasEditPermission = new GrantAllocationAwardSuppliesLineItemEditAsAdminFeature().HasPermissionByPerson(currentPerson); bool hasCreatePermission = new GrantAllocationAwardSuppliesLineItemCreateFeature().HasPermissionByPerson(currentPerson); if (hasCreatePermission) { var newSuppliesLineItemUrl = SitkaRoute <GrantAllocationAwardController> .BuildUrlFromExpression(t => t.NewSuppliesLineItemFromGrantAllocationAward(grantAllocationAward.PrimaryKey)); CreateEntityModalDialogForm = new ModalDialogForm(newSuppliesLineItemUrl, $"Create a new {Models.FieldDefinition.GrantAllocationAwardSupplies.GetFieldDefinitionLabel()} Line Item"); } //delete column if (hasDeletePermission) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteSuppliesLineItemUrl(), true, true), 30, DhtmlxGridColumnFilterType.None); } //edit column if (hasEditPermission) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditSuppliesLineItemUrl(), $"Edit this {Models.FieldDefinition.GrantAllocationAwardSupplies.GetFieldDefinitionLabel()} Line Item")), 30, DhtmlxGridColumnFilterType.None); } Add(Models.FieldDefinition.GrantAllocationAwardSuppliesDescription.ToGridHeaderString(), s => s.GrantAllocationAwardSuppliesLineItemDescription, 200, DhtmlxGridColumnFilterType.Text); Add(Models.FieldDefinition.GrantAllocationAwardSuppliesTarOrMonth.ToGridHeaderString(), s => s.GrantAllocationAwardSuppliesLineItemTarOrMonth, 125, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(Models.FieldDefinition.GrantAllocationAwardSuppliesDate.ToGridHeaderString(), s => s.GrantAllocationAwardSuppliesLineItemDate, 125, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.GrantAllocationAwardSuppliesAmount.ToGridHeaderString(), s => s.GrantAllocationAwardSuppliesLineItemAmount, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardSuppliesNotes.ToGridHeaderString(), s => s.GrantAllocationAwardSuppliesLineItemNotes, 250, DhtmlxGridColumnFilterType.Text); }
public GeospatialAreaMapLayerGridSpec(bool userCanManage) { var areGeospatialAreasExternallySourced = MultiTenantHelpers.AreGeospatialAreasExternallySourced(); if (userCanManage) { if (areGeospatialAreasExternallySourced) { var cssClasses = new List <string> { "btn", "btn-xs", "btn-firma" }; Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeModalDialogLink("Sync", x.GetSyncUrl(), 400, "Sync Data", true, "Sync", "Cancel", cssClasses, null, null), 60, DhtmlxGridColumnFilterType.None); } Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(x.GetEditMapLayerUrl(), "Edit Geospatial Area Map Layer"), 30, DhtmlxGridColumnFilterType.None); } Add("Display Name", x => x.GeospatialAreaTypeNamePluralized, 250); Add(FieldDefinitionEnum.GeospatialAreaMapLayerDisplayAsReferenceLayer.ToType().ToGridHeaderString(), x => x.DisplayOnAllProjectMaps ? "Yes" : "No", 175); Add(FieldDefinitionEnum.GeospatialAreaTypeOnByDefaultOnProjectMap.ToType().ToGridHeaderString(), x => x.OnByDefaultOnProjectMap ? "Yes" : "No", 175); if (areGeospatialAreasExternallySourced) { Add("Service Url", x => x.ServiceUrl, 450); } }
public GrantAllocationBudgetLineItemGridSpec(Models.Person currentPerson, Models.GrantAllocation grantAllocation) { ObjectNameSingular = $"{Models.FieldDefinition.GrantAllocationBudgetLineItem.GetFieldDefinitionLabel()}"; ObjectNamePlural = $"{Models.FieldDefinition.GrantAllocationBudgetLineItem.GetFieldDefinitionLabelPluralized()}"; SaveFiltersInCookie = true; var userHasEditPermissions = new GrantAllocationBudgetLineItemEditAsAdminFeature().HasPermissionByPerson(currentPerson); if (userHasEditPermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditGrantAllocationBudgetLineItemUrl(), $"Edit this {Models.FieldDefinition.GrantAllocationBudgetLineItem.GetFieldDefinitionLabel()}")), 30, DhtmlxGridColumnFilterType.None); var createNewGrantAllocationBudgetLineItemUrl = SitkaRoute <GrantAllocationController> .BuildUrlFromExpression(t => t.NewGrantAllocationBudgetLineItem(grantAllocation.PrimaryKey)); CreateEntityModalDialogForm = new ModalDialogForm(createNewGrantAllocationBudgetLineItemUrl, $"Create a new {Models.FieldDefinition.GrantAllocationBudgetLineItem.GetFieldDefinitionLabel()}"); } var userHasDeletePermissions = new GrantAllocationBudgetLineItemDeleteAsAdminFeature().HasPermissionByPerson(currentPerson); if (userHasDeletePermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteGrantAllocationBudgetLineItemUrl(), true, true), 30, DhtmlxGridColumnFilterType.None); } Add("Cost Type", x => x.CostType.CostTypeDisplayName, 125, DhtmlxGridColumnFilterType.Text); Add("Amount", x => x.GrantAllocationBudgetLineItemAmount, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add("Note", x => x.GrantAllocationBudgetLineItemNote, 650, DhtmlxGridColumnFilterType.Text); }
public static HtmlString GetEditButtonHtmlString(this ActionItem actionItem, bool userHasEditPermissions) { var buttonString = userHasEditPermissions ? $"{DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(actionItem.GetEditUrl(), ModalDialogFormHelper.DefaultDialogWidth, $"Edit {FieldDefinitionEnum.ActionItem.ToType().FieldDefinitionDisplayName}"))}" : string.Empty; return(new HtmlString(buttonString)); }
public ProjectStatusGridSpec() { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true), 30, DhtmlxGridColumnFilterType.None); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditUrl(), ModalDialogFormHelper.DefaultDialogWidth, "Edit Status")), 30, DhtmlxGridColumnFilterType.None); Add("Name", a => a.ProjectStatusName, 200, DhtmlxGridColumnFilterType.Html); Add("Display Name", a => a.ProjectStatusDisplayName, 200, DhtmlxGridColumnFilterType.Text); Add("Description", a => a.ProjectStatusDescription, 300); Add("Color", a => a.ProjectStatusColor, 150, DhtmlxGridColumnFilterType.None); }
public LandownerCostShareLineItemGridSpec(Person currentPerson, Models.GrantAllocationAward grantAllocationAward) { ShowFilterBar = true; ObjectNameSingular = Models.FieldDefinition.GrantAllocationAwardLandownerCostShareLineItem.GetFieldDefinitionLabel(); ObjectNamePlural = Models.FieldDefinition.GrantAllocationAwardLandownerCostShareLineItem.GetFieldDefinitionLabelPluralized(); bool hasDeletePermission = new GrantAllocationAwardLandownerCostShareLineItemDeleteFeature().HasPermissionByPerson(currentPerson); bool hasEditPermission = new GrantAllocationAwardLandownerCostShareLineItemEditAsAdminFeature().HasPermissionByPerson(currentPerson); bool hasCreatePermission = new GrantAllocationAwardLandownerCostShareLineItemCreateFeature().HasPermissionByPerson(currentPerson); if (hasCreatePermission) { var newLandownerCostShareLineItemUrl = SitkaRoute <GrantAllocationAwardController> .BuildUrlFromExpression(t => t.NewLandownerCostShareLineItemFromGrantAllocationAward(grantAllocationAward.PrimaryKey)); CreateEntityModalDialogForm = new ModalDialogForm(newLandownerCostShareLineItemUrl, $"Create a new {Models.FieldDefinition.GrantAllocationAwardLandownerCostShare.GetFieldDefinitionLabel()} Line Item"); } //delete column if (hasDeletePermission) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteLandownerCostShareLineItemUrl(), true, true), 30, DhtmlxGridColumnFilterType.None); } //edit column if (hasEditPermission) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditLandownerCostShareLineItemUrl(), $"Edit this {Models.FieldDefinition.GrantAllocationAwardLandownerCostShare.GetFieldDefinitionLabel()} Line Item")), 30, DhtmlxGridColumnFilterType.None); } Add(Models.FieldDefinition.Project.ToGridHeaderString(), a => UrlTemplate.MakeHrefString(a.Project.GetDetailUrl(), a.Project.ProjectName), 150, DhtmlxGridColumnFilterType.Html); Add(Models.FieldDefinition.ProgramIndexProjectCode.ToGridHeaderString(), a => a.GrantAllocationAwardID != null ? a.GrantAllocationAward.GrantAllocation.GetAssociatedProgramIndexProjectCodePairsCommaDelimited() : "Not Available", 75, DhtmlxGridColumnFilterType.Text); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareStatus.GetFieldDefinitionLabel(), a => a.GetStatusDisplayName(), 125, DhtmlxGridColumnFilterType.Text); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareStartDate.GetFieldDefinitionLabel(), a => a.Treatments.FirstOrDefault()?.TreatmentStartDate, 125, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareEndDate.GetFieldDefinitionLabel(), a => a.Treatments.FirstOrDefault()?.TreatmentEndDate, 125, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareFootprintAcres.GetFieldDefinitionLabel(), a => a.Treatments.FirstOrDefault()?.TreatmentFootprintAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareChippingAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Chipping)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostSharePruningAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Pruning)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareThinningAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Thinning)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareSlashAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Slash)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareMasticationAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Mastication)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareGrazingAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Grazing)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareLopAndScatterAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.LopAndScatter)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareBiomassRemovalAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.BiomassRemoval)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareHandPileAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.HandPile)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareBroadcastBurnAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.BroadcastBurn)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareHandPileBurnAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.HandPileBurn)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareMachinePileBurnAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.MachinePileBurn)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareOtherTreatmentAcres.GetFieldDefinitionLabel(), a => a.Treatments.SingleOrDefault(x => x.TreatmentDetailedActivityType == TreatmentDetailedActivityType.Other)?.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareAllocatedAmount.ToGridHeaderString(), a => a.GrantAllocationAwardLandownerCostShareLineItemAllocatedAmount, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareTotalCost.ToGridHeaderString(), s => s.GrantAllocationAwardLandownerCostShareLineItemTotalCost, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareActualMatch.ToGridHeaderString(), s => s.GrantAllocationAwardLandownerCostShareLineItemActualMatch, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareGrantCost.ToGridHeaderString(), s => s.GrantAllocationAwardLandownerCostShareLineItemGrantCost, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareNotes.ToGridHeaderString(), a => a.GrantAllocationAwardLandownerCostShareLineItemNotes, 250, DhtmlxGridColumnFilterType.Text); }
public ProjectCustomAttributeTypeGridSpec() { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true, true), 30, DhtmlxGridColumnFilterType.None); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditUrl(), ModalDialogFormHelper.DefaultDialogWidth, "Edit Attribute")), 30, DhtmlxGridColumnFilterType.None); Add(Models.FieldDefinition.ProjectCustomAttribute.ToGridHeaderString(), a => UrlTemplate.MakeHrefString(a.GetDetailUrl(), a.ProjectCustomAttributeTypeName), 200, DhtmlxGridColumnFilterType.Html); Add("Description", a => a.ProjectCustomAttributeTypeDescription, 300); Add(Models.FieldDefinition.ProjectCustomAttributeDataType.ToGridHeaderString(), a => a.ProjectCustomAttributeDataType.ProjectCustomAttributeDataTypeDisplayName, 100, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(Models.FieldDefinition.MeasurementUnit.ToGridHeaderString(), a => a.GetMeasurementUnitDisplayName(), 100, DhtmlxGridColumnFilterType.SelectFilterStrict); Add("Required?", a => a.IsRequired.ToYesNo(), 100, DhtmlxGridColumnFilterType.SelectFilterStrict); }
private static HtmlString MakeEditIconAndLinkBootstrapIfAvailable(FirmaSession currentFirmaSession, EvaluationCriteria evaluationCriteria) { if (EvaluationManageFeature.HasEvaluationManagePermission(currentFirmaSession, evaluationCriteria.Evaluation)) { string linkTitleText = $"Edit {FieldDefinitionEnum.EvaluationCriteria.ToType().GetFieldDefinitionLabel()} '{evaluationCriteria.EvaluationCriteriaName}'"; string editDialogUrl = evaluationCriteria.GetEditUrl(); return(DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(editDialogUrl, linkTitleText)); } return(new HtmlString(string.Empty)); }
public TagGridSpec(bool hasManagePermissions) { if (hasManagePermissions) { Add(string.Empty, a => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(SitkaRoute <TagController> .BuildUrlFromExpression(t => t.Edit(a.TagID)), $"Edit Tag'{a.TagName}'")), 30); } Add("Field", a => a.TagName, 300); }
public static HtmlString MakeProjectStatusEditLinkButton(ProjectProjectStatus projectProjectStatus, bool canEditProjectStatus, bool canEditFinalStatusReport) { var editIconAsModalDialogLinkBootstrap = new HtmlString(string.Empty); if ((canEditProjectStatus && !projectProjectStatus.IsFinalStatusUpdate) || (canEditFinalStatusReport && projectProjectStatus.IsFinalStatusUpdate)) { editIconAsModalDialogLinkBootstrap = DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap( projectProjectStatus.GetEditProjectProjectStatusUrl() , $"Add {FieldDefinitionEnum.StatusUpdate.ToType().GetFieldDefinitionLabel()} Details:"); } return(editIconAsModalDialogLinkBootstrap); }
public ActionItemsGridSpec(FirmaSession currentFirmaSession) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true), 30, DhtmlxGridColumnFilterType.None); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditUrl(), ModalDialogFormHelper.DefaultDialogWidth, "Edit Status")), 30, DhtmlxGridColumnFilterType.None); Add($"{FieldDefinitionEnum.ActionItemText.ToType().GetFieldDefinitionLabel()}", x => x.ActionItemText, 200, DhtmlxGridColumnFilterType.Text); Add($"{FieldDefinitionEnum.ActionItemAssignedToPerson.ToType().GetFieldDefinitionLabel()}", x => x.AssignedToPerson.GetFullNameFirstLastAsUrl(currentFirmaSession), 150, DhtmlxGridColumnFilterType.SelectFilterHtmlStrict); Add($"{FieldDefinitionEnum.ActionItemState.ToType().GetFieldDefinitionLabel()}", x => x.ActionItemState.ActionItemStateDisplayName, 120, DhtmlxGridColumnFilterType.SelectFilterStrict); Add($"{FieldDefinitionEnum.ActionItemAssignedOnDate.ToType().GetFieldDefinitionLabel()}", x => x.AssignedOnDate, 120); Add($"{FieldDefinitionEnum.ActionItemDueByDate.ToType().GetFieldDefinitionLabel()}", x => x.DueByDate, 120); Add($"{FieldDefinitionEnum.ActionItemCompletedOnDate.ToType().GetFieldDefinitionLabel()}", x => x.CompletedOnDate, 120); Add($"Related {FieldDefinitionEnum.Status.ToType().GetFieldDefinitionLabel()}", x => x.ProjectProjectStatus?.GetDropdownDisplayName() ?? "", 200, DhtmlxGridColumnFilterType.Text); }
public ActionItemsUserGridSpec(FirmaSession currentFirmaSession) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), new ActionItemManageFeature().HasPermission(currentFirmaSession, x).HasPermission), 30, DhtmlxGridColumnFilterType.None); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(x.GetEditUrl(), $"Edit {FieldDefinitionEnum.ActionItem.ToType().GetFieldDefinitionLabel()}", true, new ActionItemManageFeature().HasPermission(currentFirmaSession, x).HasPermission), 30, DhtmlxGridColumnFilterType.None); Add($"{FieldDefinitionEnum.ActionItemText.ToType().GetFieldDefinitionLabel()}", x => x.ActionItemText, 200, DhtmlxGridColumnFilterType.Text); Add($"{FieldDefinitionEnum.Project.ToType().GetFieldDefinitionLabel()}", x => x.Project.GetDisplayNameAsUrl(), 200, DhtmlxGridColumnFilterType.Html); Add($"{FieldDefinitionEnum.ActionItemState.ToType().GetFieldDefinitionLabel()}", x => x.ActionItemState.ActionItemStateDisplayName, 120, DhtmlxGridColumnFilterType.SelectFilterStrict); Add($"{FieldDefinitionEnum.ActionItemAssignedOnDate.ToType().GetFieldDefinitionLabel()}", x => x.AssignedOnDate, 120); Add($"{FieldDefinitionEnum.ActionItemDueByDate.ToType().GetFieldDefinitionLabel()}", x => x.DueByDate, 120); Add($"{FieldDefinitionEnum.ActionItemCompletedOnDate.ToType().GetFieldDefinitionLabel()}", x => x.CompletedOnDate, 120); Add($"Related {FieldDefinitionEnum.Status.ToType().GetFieldDefinitionLabel()}", x => x.ProjectProjectStatus?.GetDropdownDisplayName() ?? "", 200, DhtmlxGridColumnFilterType.Text); }
public FundingSourceCustomAttributeTypeGridSpec() { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true), 30, DhtmlxGridColumnFilterType.None); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditUrl(), ModalDialogFormHelper.DefaultDialogWidth, "Edit Attribute")), 30, DhtmlxGridColumnFilterType.None); Add(FieldDefinitionEnum.FundingSourceCustomAttribute.ToType().ToGridHeaderString(), a => UrlTemplate.MakeHrefString(a.GetDetailUrl(), a.FundingSourceCustomAttributeTypeName), 200, DhtmlxGridColumnFilterType.Html); Add("Description", a => a.FundingSourceCustomAttributeTypeDescription, 300); Add(FieldDefinitionEnum.FundingSourceCustomAttributeDataType.ToType().ToGridHeaderString(), a => a.FundingSourceCustomAttributeDataType.FundingSourceCustomAttributeDataTypeDisplayName, 100, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(FieldDefinitionEnum.MeasurementUnit.ToType().ToGridHeaderString(), a => a.GetMeasurementUnitDisplayName(), 100, DhtmlxGridColumnFilterType.SelectFilterStrict); Add("Required?", a => a.IsRequired.ToYesNo(), 100, DhtmlxGridColumnFilterType.SelectFilterHtmlStrict); Add(FieldDefinitionEnum.FundingSourceCustomAttributeTypeViewableBy.ToType().ToGridHeaderString(), a => a.GetViewableRoles(), 200, DhtmlxGridColumnFilterType.Html); Add($"Include In {FieldDefinitionEnum.FundingSource.ToType().GetFieldDefinitionLabel()} Grid?", a => a.IncludeInFundingSourceGrid.ToYesNo() ?? ViewUtilities.NoAnswerProvided, 100, DhtmlxGridColumnFilterType.SelectFilterStrict); }
public ReportTemplateGridSpec(bool hasManagePermissions) { if (hasManagePermissions) { Add(string.Empty, a => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(SitkaRoute <ReportsController> .BuildUrlFromExpression(t => t.Delete(a)), true), 30, DhtmlxGridColumnFilterType.None); Add(string.Empty, a => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(SitkaRoute <ReportsController> .BuildUrlFromExpression(t => t.Edit(a)), "Edit Report Template"), 30, DhtmlxGridColumnFilterType.None); } Add("Display Name", a => a.DisplayName, 200); Add("Description", a => a.Description, 400); Add("Model", a => a.ReportTemplateModel.ReportTemplateModelDisplayName, 100); //Add("Model Type", a => a.ReportTemplateModelType.ReportTemplateModelTypeDisplayName, 100); Add("Template File", a => a.DownloadTemplateLink(), 200, DhtmlxGridColumnFilterType.Html); }
private static HtmlString MakeEditIconAndLinkBootstrapIfAvailable(FirmaSession currentFirmaSession, ProjectEvaluation projectEvaluation) { if (EvaluationManageFeature.HasEvaluationManagePermission(currentFirmaSession, projectEvaluation.Evaluation)) { if (projectEvaluation.Evaluation.EvaluationStatusID == (int)EvaluationStatusEnum.InProgress) { return(DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(projectEvaluation.GetEditUrl(), $"Evaluate {FieldDefinitionEnum.Project.ToType().GetFieldDefinitionLabel()} '{projectEvaluation.Project.GetDisplayName()}'")); } return(DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(projectEvaluation.GetEditUrl(), $"Evaluate {FieldDefinitionEnum.Project.ToType().GetFieldDefinitionLabel()} '{projectEvaluation.Project.GetDisplayName()}'", false)); } return(new HtmlString(string.Empty)); }
public IndexGridSpec(bool hasEditPermissions) { if (hasEditPermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(SitkaRoute <SolicitationController> .BuildUrlFromExpression(sc => sc.DeleteSolicitation(x)), true), 30); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(SitkaRoute <SolicitationController> .BuildUrlFromExpression(sc => sc.Edit(x)), $"Edit {FieldDefinitionEnum.Solicitation.ToType().GetFieldDefinitionLabel()}"), 30); } Add($"{FieldDefinitionEnum.Solicitation.ToType().GetFieldDefinitionLabel()} Name", a => a.SolicitationName, 200, DhtmlxGridColumnFilterType.Text); Add("Attachment Instructions", a => !string.IsNullOrEmpty(a.AttachmentInstructions) ? a.AttachmentInstructionsHtmlString : new HtmlString(string.Empty), 600, DhtmlxGridColumnFilterType.Html); Add("Is Active", a => a.IsActive.ToYesNo(), 65, DhtmlxGridColumnFilterType.SelectFilterStrict); }
public ProjectCustomAttributeTypeGridSpec() { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true), 30, DhtmlxGridColumnFilterType.None); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditUrl(), ModalDialogFormHelper.DefaultDialogWidth, "Edit Attribute")), 30, DhtmlxGridColumnFilterType.None); Add(FieldDefinitionEnum.ProjectCustomAttribute.ToType().ToGridHeaderString(), a => UrlTemplate.MakeHrefString(a.GetDetailUrl(), a.ProjectCustomAttributeTypeName), 200, DhtmlxGridColumnFilterType.Html); Add("Description", a => a.ProjectCustomAttributeTypeDescription, 300); Add(FieldDefinitionEnum.ProjectCustomAttributeGroup.ToType().ToGridHeaderString(), a => a.ProjectCustomAttributeGroup?.ProjectCustomAttributeGroupName ?? string.Empty, 150, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(FieldDefinitionEnum.ProjectCustomAttributeDataType.ToType().ToGridHeaderString(), a => a.ProjectCustomAttributeDataType.ProjectCustomAttributeDataTypeDisplayName, 100, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(FieldDefinitionEnum.MeasurementUnit.ToType().ToGridHeaderString(), a => a.GetMeasurementUnitDisplayName(), 100, DhtmlxGridColumnFilterType.SelectFilterStrict); Add("Required?", a => a.IsRequired.ToYesNo(), 100, DhtmlxGridColumnFilterType.SelectFilterHtmlStrict); Add(FieldDefinitionEnum.ProjectCustomAttributeTypeEditableBy.ToType().ToGridHeaderString(), x => x.GetEditableRoles(), 150, DhtmlxGridColumnFilterType.Html); Add(FieldDefinitionEnum.ProjectCustomAttributeTypeViewableBy.ToType().ToGridHeaderString(), a => a.GetViewableRoles(), 200, DhtmlxGridColumnFilterType.Html); Add("Viewable on fact sheet?", a => a.IsViewableOnFactSheet.ToYesNo(), 140, DhtmlxGridColumnFilterType.Html); }
private void GrantModificationGridSpecConstructorImpl(Person currentPerson, Models.Grant grantToAssociate) { Check.Ensure(grantToAssociate != null, "Grant is null. Creating a New Grant Modification without a current Grant is currently not supported."); ObjectNameSingular = $"{Models.FieldDefinition.GrantModification.GetFieldDefinitionLabel()}"; ObjectNamePlural = $"{Models.FieldDefinition.GrantModification.GetFieldDefinitionLabelPluralized()}"; SaveFiltersInCookie = true; var userHasCreatePermissions = new GrantModificationCreateFeature().HasPermissionByPerson(currentPerson); if (userHasCreatePermissions && grantToAssociate != null) { var contentUrl = SitkaRoute <GrantModificationController> .BuildUrlFromExpression(gmc => gmc.NewGrantModificationForAGrant(grantToAssociate.PrimaryKey)); CreateEntityModalDialogForm = new ModalDialogForm(contentUrl, 950, $"Create a new {Models.FieldDefinition.GrantModification.GetFieldDefinitionLabel()}"); } // hidden columns for use by JavaScript Add(GrantModificationIDHiddenColumnName, x => x.GrantModificationID, 0); Add(GrantModificationNameHiddenColumnName, x => x.GrantModificationName, 0); var userHasDeletePermissions = new GrantModificationDeleteFeature().HasPermissionByPerson(currentPerson); if (userHasDeletePermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true, true), 30, DhtmlxGridColumnFilterType.None); } var userHasEditPermissions = new GrantModificationEditAsAdminFeature().HasPermissionByPerson(currentPerson); if (userHasEditPermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap( new ModalDialogForm(x.GetEditUrl(), $"Edit {ObjectNameSingular} - {x.GrantModificationName}"), userHasEditPermissions), 30, DhtmlxGridColumnFilterType.None); } if (userHasCreatePermissions && grantToAssociate != null) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDuplicateIconAndLinkBootstrap(x.GetDuplicateUrl(), 950, $"Duplicate {Models.FieldDefinition.GrantModification.GetFieldDefinitionLabel()} \"{x.GrantModificationName}\" to New {Models.FieldDefinition.GrantModification.GetFieldDefinitionLabel()}"), 30, DhtmlxGridColumnFilterType.None); } Add(Models.FieldDefinition.GrantModificationName.ToGridHeaderString(), x => x.GetGrantModificationNameAsUrl(), 125, DhtmlxGridColumnFilterType.SelectFilterHtmlStrict); Add(Models.FieldDefinition.GrantModificationStartDate.ToGridHeaderString(), x => x.GrantModificationStartDate, 100, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.GrantModificationEndDate.ToGridHeaderString(), x => x.GrantModificationEndDate, 100, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.GrantModificationStatus.ToGridHeaderString(), x => x.GrantModificationStatus.GetDisplayName(), 100, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(Models.FieldDefinition.GrantModificationPurpose.ToGridHeaderString(), x => x.GrantModificationPurposeNamesAsCommaDelimitedString, 200, DhtmlxGridColumnFilterType.Text); Add(Models.FieldDefinition.GrantModificationAmount.ToGridHeaderString(), x => x.GrantModificationAmount, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantModificationDescription.ToGridHeaderString(), x => x.GrantModificationDescription, 125, DhtmlxGridColumnFilterType.Text); }
private void InteractionEventGridSpecConstructorImpl(Person currentPerson, Models.Project optionalProjectToAssociate, Person optionalPersonToAssociate) { // ReSharper disable twice ConditionIsAlwaysTrueOrFalse Check.Ensure((optionalProjectToAssociate == null && optionalPersonToAssociate == null) || (optionalProjectToAssociate == null && optionalPersonToAssociate != null) || (optionalProjectToAssociate != null && optionalPersonToAssociate == null)); ObjectNameSingular = $"{Models.FieldDefinition.InteractionEvent.GetFieldDefinitionLabel()}"; ObjectNamePlural = $"{Models.FieldDefinition.InteractionEvent.GetFieldDefinitionLabelPluralized()}"; SaveFiltersInCookie = true; var userHasManagePermissions = new InteractionEventManageFeature().HasPermissionByPerson(currentPerson); if (userHasManagePermissions) { var contentUrl = SitkaRoute <InteractionEventController> .BuildUrlFromExpression(t => t.New()); if (optionalPersonToAssociate != null) { contentUrl = SitkaRoute <InteractionEventController> .BuildUrlFromExpression(t => t.NewForAPerson(optionalPersonToAssociate)); } else if (optionalProjectToAssociate != null) { contentUrl = SitkaRoute <InteractionEventController> .BuildUrlFromExpression(t => t.NewForAProject(optionalProjectToAssociate)); } CreateEntityModalDialogForm = new ModalDialogForm(contentUrl, 950, $"Create a new {ObjectNameSingular}"); } if (userHasManagePermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), userHasManagePermissions, true), 30, DhtmlxGridColumnFilterType.None); } if (userHasManagePermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap( new ModalDialogForm(x.GetEditUrl(), $"Edit {ObjectNameSingular} - {x.InteractionEventTitle}"), userHasManagePermissions), 30, DhtmlxGridColumnFilterType.None); } Add("Title", x => UrlTemplate.MakeHrefString(x.GetDetailUrl(), x.InteractionEventTitle), 150, DhtmlxGridColumnFilterType.Html); Add("Description", x => x.InteractionEventDescription, 200, DhtmlxGridColumnFilterType.Text); Add("Date", x => x.InteractionEventDate, 80, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.InteractionEventType.ToGridHeaderString(), x => x.InteractionEventType?.InteractionEventTypeDisplayName, 180, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(Models.FieldDefinition.DNRStaffPerson.ToGridHeaderString(), x => x.StaffPerson?.FullNameFirstLast, 180, DhtmlxGridColumnFilterType.SelectFilterStrict); }
public ProjectCustomAttributeGroupGridSpec() { var tenantAttribute = MultiTenantHelpers.GetTenantAttributeFromCache(); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true), 30, DhtmlxGridColumnFilterType.None); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditUrl(), ModalDialogFormHelper.DefaultDialogWidth, $"Edit {FieldDefinitionEnum.ProjectCustomAttributeGroup.ToType().GetFieldDefinitionLabel()}")), 30, DhtmlxGridColumnFilterType.None); Add("Name", a => a.ProjectCustomAttributeGroupName, 300, DhtmlxGridColumnFilterType.Text); if (tenantAttribute.EnableProjectCategories) { Add(FieldDefinitionEnum.ProjectCategory.ToType().GetFieldDefinitionLabel(), a => a.GetProjectCategoryDisplayNamesAsCommaDelimitedList(), 150, DhtmlxGridColumnFilterType.SelectFilterStrict); } Add("Sort Order", a => a.SortOrder, 60, DhtmlxGridColumnFormatType.Integer); }
public ExternalMapLayerGridSpec(bool userCanManage) { if (userCanManage) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true), 30, DhtmlxGridColumnFilterType.None); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(x.GetEditUrl(), "Edit External Map Layer"), 30, DhtmlxGridColumnFilterType.None); } Add(FieldDefinitionEnum.ExternalMapLayerDisplayName.ToType().ToGridHeaderString(), x => x.DisplayName, 150); Add(FieldDefinitionEnum.ExternalMapLayerUrl.ToType().ToGridHeaderString(), x => x.LayerUrl, 250); Add(FieldDefinitionEnum.ExternalMapLayerDescription.ToType().ToGridHeaderString(), x => x.LayerDescription, 300); Add(FieldDefinitionEnum.ExternalMapLayerFeatureNameField.ToType().ToGridHeaderString(), x => x.FeatureNameField, 150); // Add("Display on all " + FieldDefinitionEnum.Project.ToType().FieldDefinitionDisplayName + " maps?", x => x.DisplayOnAllProjectMaps ? "Yes" : "No", 75); Add(FieldDefinitionEnum.ExternalMapLayerDisplayOnAllMaps.ToType().ToGridHeaderString(), x => x.DisplayOnAllProjectMaps ? "Yes" : "No", 75); Add(FieldDefinitionEnum.GeospatialAreaTypeOnByDefaultOnProjectMap.ToType().ToGridHeaderString(), x => x.LayerIsOnByDefault ? "Yes" : "No", 75); Add(FieldDefinitionEnum.ExternalMapLayerIsActive.ToType().ToGridHeaderString(), x => x.IsActive ? "Yes" : "No", 75); Add(FieldDefinitionEnum.ExternalMapLayerIsATiledMapService.ToType().ToGridHeaderString(), x => x.IsTiledMapService ? "Yes" : "No", 75); }
public IndexGridSpec(bool hasDeletePermissions) { if (hasDeletePermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true, true), 30, DhtmlxGridColumnFilterType.None); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(x.GetEditUrl(), $"Edit Document Library {x.DocumentLibraryName}", true), 30, DhtmlxGridColumnFilterType.None); } Add(FieldDefinitionEnum.DocumentLibraryName.ToType().ToGridHeaderString(), x => x.GetDisplayNameAsUrl(), 250); Add("Document Category", x => x.GetDocumentCategoryDisplayNamesAsCommaDelimitedString(), 300); Add("Page Names", x => x.GetCustomPageDisplayNamesAsCommaDelimitedString(), 300); Add("# of Documents", x => x.DocumentLibraryDocuments.Count, 100); }
public TechnicalAssistanceReportGridSpec(FirmaSession currentFirmaSession, List <TechnicalAssistanceParameter> technicalAssistanceParameters) { var isAdmin = new FirmaAdminFeature().HasPermissionByFirmaSession(currentFirmaSession); if (isAdmin) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditUrl(), 1000, "Edit Technical Assistance Requests for this Project")), 30, DhtmlxGridColumnFilterType.None); } Add("Fiscal Year", x => x.FiscalYear.ToString(), 45, DhtmlxGridColumnFilterType.SelectFilterStrict); Add("Project Name", x => UrlTemplate.MakeHrefString(x.Project.GetDetailUrl(), x.Project.ProjectName), 300, DhtmlxGridColumnFilterType.Text); Add("Lead Implementer", x => x.Project.GetPrimaryContactOrganization().GetDisplayName(), 240, DhtmlxGridColumnFilterType.Text); Add("Assistance Type", x => x.TechnicalAssistanceType.TechnicalAssistanceTypeDisplayName, 110, DhtmlxGridColumnFilterType.SelectFilterStrict); Add("Person Requested", x => x.Person?.GetFullNameFirstLast(), 110, DhtmlxGridColumnFilterType.SelectFilterStrict); Add("Hours Requested", x => x.HoursRequested.ToString(), 75, DhtmlxGridColumnFilterType.Text); Add("Hours Allocated", x => x.HoursAllocated.ToString(), 75, DhtmlxGridColumnFilterType.Text); Add("Hours Provided", x => x.HoursProvided.ToString(), 75, DhtmlxGridColumnFilterType.Text); Add("Value of Technical Assistance Provided", x => x.GetValueProvided(technicalAssistanceParameters).ToStringCurrency(), 95, DhtmlxGridColumnFilterType.Text); Add("Notes", x => x.Notes, 300, DhtmlxGridColumnFilterType.Text); Add("Project Last Updated Date", x => x.Project.LastUpdatedDate, 140); }
public DocumentLibraryDocumentGridSpec(bool hasDeletePermissions) { if (hasDeletePermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true, true), 30, DhtmlxGridColumnFilterType.None); Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(x.GetEditUrl(), $"Edit Document {x.DocumentTitle}", true), 30, DhtmlxGridColumnFilterType.None); } Add("Document Title", x => x.DocumentTitle, 150); Add("File Type", x => x.FileResourceInfo.OriginalFileExtension, 65, DhtmlxGridColumnFilterType.SelectFilterStrict); Add("Description", x => x.DocumentDescription, 600); Add("Document Category", x => x.DocumentCategory.DocumentCategoryDisplayName, 130); Add(FieldDefinitionEnum.DocumentLibrary.ToType().ToGridHeaderString(), x => x.DocumentLibrary.GetDisplayNameAsUrl(), 130); Add(FieldDefinitionEnum.DocumentLibraryDocumentViewableBy.ToType().ToGridHeaderString(), a => a.GetViewableRoles(), 200, DhtmlxGridColumnFilterType.Html); Add("Last Updated Date", x => x.LastUpdateDate, 120); Add("Last Updated By", x => x.LastUpdatePerson.GetFullNameFirstLast(), 130); }
public PersonnelAndBenefitsLineItemGridSpec(Person currentPerson, Models.GrantAllocationAward grantAllocationAward) { ShowFilterBar = true; ObjectNameSingular = Models.FieldDefinition.GrantAllocationAwardPersonnelAndBenefitsLineItem.GetFieldDefinitionLabel(); ObjectNamePlural = Models.FieldDefinition.GrantAllocationAwardPersonnelAndBenefitsLineItem.GetFieldDefinitionLabelPluralized(); bool hasDeletePermission = new GrantAllocationAwardPersonnelAndBenefitsLineItemDeleteFeature().HasPermissionByPerson(currentPerson); bool hasEditPermission = new GrantAllocationAwardPersonnelAndBenefitsLineItemEditAsAdminFeature().HasPermissionByPerson(currentPerson); bool hasCreatePermission = new GrantAllocationAwardPersonnelAndBenefitsLineItemCreateFeature().HasPermissionByPerson(currentPerson); if (hasCreatePermission) { var newSuppliesLineItemUrl = SitkaRoute <GrantAllocationAwardController> .BuildUrlFromExpression(t => t.NewPersonnelAndBenefitsLineItemFromGrantAllocationAward(grantAllocationAward.PrimaryKey)); CreateEntityModalDialogForm = new ModalDialogForm(newSuppliesLineItemUrl, $"Create a new {Models.FieldDefinition.GrantAllocationAwardPersonnelAndBenefits.GetFieldDefinitionLabel()} Line Item"); } //delete column if (hasDeletePermission) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeletePersonnelAndBenefitsLineItemUrl(), true, true), 30, DhtmlxGridColumnFilterType.None); } //edit column if (hasEditPermission) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditPersonnelAndBenefitsLineItemUrl(), $"Edit this {Models.FieldDefinition.GrantAllocationAwardPersonnelAndBenefits.GetFieldDefinitionLabel()} Line Item")), 30, DhtmlxGridColumnFilterType.None); } Add(Models.FieldDefinition.GrantAllocationAwardPersonnelAndBenefitsName.ToGridHeaderString(), s => s.Person != null ? s.Person.GetFullNameFirstLastAndOrgShortNameAsUrl() : new HtmlString(string.Empty), 200, DhtmlxGridColumnFilterType.Html); Add(Models.FieldDefinition.GrantAllocationAwardPersonnelAndBenefitsTarOrMonth.ToGridHeaderString(), s => s.GrantAllocationAwardPersonnelAndBenefitsLineItemTarOrMonth, 125, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(Models.FieldDefinition.GrantAllocationAwardPersonnelAndBenefitsDate.ToGridHeaderString(), s => s.GrantAllocationAwardPersonnelAndBenefitsLineItemDate, 125, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.GrantAllocationAwardPersonnelAndBenefitsTarHours.ToGridHeaderString(), s => s.GrantAllocationAwardPersonnelAndBenefitsLineItemTarHours, 125, DhtmlxGridColumnFormatType.Integer, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardPersonnelAndBenefitsHourlyRate.ToGridHeaderString(), s => s.GrantAllocationAwardPersonnelAndBenefitsLineItemHourlyRate, 125, DhtmlxGridColumnFormatType.CurrencyWithCents); Add("Hourly Total", s => s.GrantAllocationAwardPersonnelAndBenefitsLineItemHourlyTotal, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardPersonnelAndBenefitsFringeRate.ToGridHeaderString(), s => s.GrantAllocationAwardPersonnelAndBenefitsLineItemFringeRate, 125, DhtmlxGridColumnFormatType.CurrencyWithCents); Add("Fringe Total", s => s.GrantAllocationAwardPersonnelAndBenefitsLineItemFringeTotal, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add("TAR Total", s => s.GrantAllocationAwardPersonnelAndBenefitsLineItemTarTotal, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardPersonnelAndBenefitsNotes.ToGridHeaderString(), s => s.GrantAllocationAwardPersonnelAndBenefitsLineItemNotes, 250, DhtmlxGridColumnFilterType.Text); }
public AgreementPersonGridSpec(Models.Person currentPerson) { ObjectNameSingular = $"{Models.FieldDefinition.Agreement.GetFieldDefinitionLabel()}"; ObjectNamePlural = $"{Models.FieldDefinition.Agreement.GetFieldDefinitionLabelPluralized()}"; var userHasEditPermissions = new AgreementEditAsAdminFeature().HasPermissionByPerson(currentPerson); if (userHasEditPermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditUrl(), "Edit this Agreement Contact")), 30, DhtmlxGridColumnFilterType.None); } var userHasDeletePermissions = new AgreementDeleteFeature().HasPermissionByPerson(currentPerson); if (userHasDeletePermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true, true), 30, DhtmlxGridColumnFilterType.None); } Add("First Name", x => x.Person.GetFirstNameAsUrl(), 125, DhtmlxGridColumnFilterType.Text); Add("Last Name", x => x.Person.GetLastNameAsUrl(), 125, DhtmlxGridColumnFilterType.Text); Add("Agreement Role", x => x.AgreementPersonRole.AgreementPersonRoleDisplayName, 125, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(Models.FieldDefinition.Organization.ToGridHeaderString(), x => x.Person.Organization.GetDisplayNameWithoutAbbreviationAsUrl(), 250, DhtmlxGridColumnFilterType.Html); }
public InvoiceLineItemGridSpec(Models.Person currentPerson) { ObjectNameSingular = $"{Models.FieldDefinition.Agreement.GetFieldDefinitionLabel()}"; ObjectNamePlural = $"{Models.FieldDefinition.Agreement.GetFieldDefinitionLabelPluralized()}"; var userHasEditPermissions = new InvoiceLineItemEditFeature().HasPermissionByPerson(currentPerson); if (userHasEditPermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditUrl(), "Edit this Invoice Line Item")), 30, DhtmlxGridColumnFilterType.None); } var userHasDeletePermissions = new InvoiceLineItemDeleteFeature().HasPermissionByPerson(currentPerson); if (userHasDeletePermissions) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteUrl(), true, true), 30, DhtmlxGridColumnFilterType.None); } Add("Cost Type", x => x.CostType.CostTypeDisplayName, 125, DhtmlxGridColumnFilterType.Text); Add("Grant Allocation", x => x.GrantAllocation.GrantAllocationName, 125, DhtmlxGridColumnFilterType.Text); Add("Amount", x => x.InvoiceLineItemAmount, 70, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add("Note", x => x.InvoiceLineItemNote, 250, DhtmlxGridColumnFilterType.Text); }
public TreatmentGridSpec(Person currentPerson) { bool userHasEditPermissions = new GrantAllocationAwardLandownerCostShareLineItemEditAsAdminFeature().HasPermissionByPerson(currentPerson); int buttonGridWidth = 30; Add(string.Empty, x => x.GrantAllocationAwardLandownerCostShareLineItemID.HasValue ? DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GrantAllocationAwardLandownerCostShareLineItem?.GetEditLandownerCostShareLineItemUrl(), $"Edit {Models.FieldDefinition.GrantAllocationAwardLandownerCostShareLineItem.GetFieldDefinitionLabel()}"), userHasEditPermissions) : new HtmlString(string.Empty), buttonGridWidth, DhtmlxGridColumnFilterType.None); Add("Treatment ID", a => a.TreatmentID.ToString(), 75, DhtmlxGridColumnFilterType.Text); Add(Models.FieldDefinition.TreatmentType.GetFieldDefinitionLabel(), a => a.TreatmentType.TreatmentTypeDisplayName, 120, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(Models.FieldDefinition.TreatmentDetailedActivityType.GetFieldDefinitionLabel(), a => a.TreatmentDetailedActivityType.TreatmentDetailedActivityTypeDisplayName, 120, DhtmlxGridColumnFilterType.SelectFilterStrict); //Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareFootprintAcres.GetFieldDefinitionLabel(), a => a.TreatmentFootprintAcres, 75, DhtmlxGridColumnFormatType.Decimal); Add(Models.FieldDefinition.TreatedAcres.GetFieldDefinitionLabel(), a => a.TreatmentTreatedAcres ?? 0, 75, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareStartDate.GetFieldDefinitionLabel(), a => a.TreatmentStartDate, 125, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.GrantAllocationAwardLandownerCostShareEndDate.GetFieldDefinitionLabel(), a => a.TreatmentEndDate, 125, DhtmlxGridColumnFormatType.Date); }
public ContractorInvoiceItemGridSpec(Person currentPerson, Models.GrantAllocationAward grantAllocationAward) { ShowFilterBar = true; ObjectNameSingular = Models.FieldDefinition.GrantAllocationAwardContractorInvoiceLineItem.GetFieldDefinitionLabel(); ObjectNamePlural = Models.FieldDefinition.GrantAllocationAwardContractorInvoiceLineItem.GetFieldDefinitionLabelPluralized(); bool hasDeletePermission = new GrantAllocationAwardContractorInvoiceItemDeleteFeature().HasPermissionByPerson(currentPerson); bool hasEditPermission = new GrantAllocationAwardContractorInvoiceItemEditAsAdminFeature().HasPermissionByPerson(currentPerson); bool hasCreatePermission = new GrantAllocationAwardContractorInvoiceItemCreateFeature().HasPermissionByPerson(currentPerson); if (hasCreatePermission) { var newContractorInvoiceUrl = SitkaRoute <GrantAllocationAwardController> .BuildUrlFromExpression(t => t.NewContractorInvoiceItemFromGrantAllocationAward(grantAllocationAward.PrimaryKey)); CreateEntityModalDialogForm = new ModalDialogForm(newContractorInvoiceUrl, $"Create a new {Models.FieldDefinition.GrantAllocationAwardContractorInvoice.GetFieldDefinitionLabel()} Line Item"); } //delete column if (hasDeletePermission) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(x.GetDeleteContractorInvoiceUrl(), true, true), 30, DhtmlxGridColumnFilterType.None); } //edit column if (hasEditPermission) { Add(string.Empty, x => DhtmlxGridHtmlHelpers.MakeEditIconAsModalDialogLinkBootstrap(new ModalDialogForm(x.GetEditContractorInvoiceUrl(), $"Edit this {Models.FieldDefinition.GrantAllocationAwardContractorInvoice.GetFieldDefinitionLabel()} Line Item")), 30, DhtmlxGridColumnFilterType.None); } //need column for file download Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceDescription.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceDescription, 200, DhtmlxGridColumnFilterType.Text); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceNumber.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceNumber, 125, DhtmlxGridColumnFilterType.SelectFilterStrict); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceDate.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceDate, 125, DhtmlxGridColumnFormatType.Date); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceForemanHours.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceForemanHours, 125, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceForemanRate.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceForemanRate, 125, DhtmlxGridColumnFormatType.CurrencyWithCents); Add("Foreman Amount", s => s.GrantAllocationAwardContractorInvoiceForemanAmount, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceLaborHours.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceLaborHours, 125, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceLaborRate.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceLaborRate, 125, DhtmlxGridColumnFormatType.CurrencyWithCents); Add("Labor Amount", s => s.GrantAllocationAwardContractorInvoiceLaborAmount, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceGrappleHours.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceGrappleHours, 125, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceGrappleRate.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceGrappleRate, 125, DhtmlxGridColumnFormatType.CurrencyWithCents); Add("Grapple Amount", s => s.GrantAllocationAwardContractorInvoiceGrappleAmount, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceMasticationHours.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceMasticationHours, 125, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceMasticationRate.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceMasticationRate, 125, DhtmlxGridColumnFormatType.CurrencyWithCents); Add("Mastication Amount", s => s.GrantAllocationAwardContractorInvoiceMasticationAmount, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add("Invoice w/o Tax", s => s.GrantAllocationAwardContractorInvoiceTotalWithoutTax, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceTaxRate.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceTaxRate, 125, DhtmlxGridColumnFormatType.Percent); Add("Tax Amount", s => s.GrantAllocationAwardContractorInvoiceTaxAmount, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add("Invoice Total", s => s.GrantAllocationAwardContractorInvoiceTotalWithTax, 125, DhtmlxGridColumnFormatType.CurrencyWithCents, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceAcresReported.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceAcresReported, 125, DhtmlxGridColumnFormatType.Decimal, DhtmlxGridColumnAggregationType.Total); Add(Models.FieldDefinition.GrantAllocationAwardContractorInvoiceNotes.ToGridHeaderString(), s => s.GrantAllocationAwardContractorInvoiceNotes, 250, DhtmlxGridColumnFilterType.Text); }