public GridJsonNetJObjectResult <PriorityLandscape> IndexGridJsonData()
        {
            var gridSpec                 = new IndexGridSpec(CurrentPerson);
            var priorityLandscapes       = HttpRequestStorage.DatabaseEntities.PriorityLandscapes.OrderBy(x => x.PriorityLandscapeName).ToList();
            var gridJsonNetJObjectResult = new GridJsonNetJObjectResult <PriorityLandscape>(priorityLandscapes, gridSpec);

            return(gridJsonNetJObjectResult);
        }
예제 #2
0
 public IndexViewData(Person currentPerson, MapInitJson mapInitJson, Models.FirmaPage firmaPage) : base(currentPerson, firmaPage)
 {
     PageTitle   = $"{Models.FieldDefinition.PriorityLandscape.GetFieldDefinitionLabelPluralized()}";
     MapInitJson = mapInitJson;
     GridSpec    = new IndexGridSpec(currentPerson)
     {
         ObjectNameSingular = $"{Models.FieldDefinition.PriorityLandscape.GetFieldDefinitionLabel()}", ObjectNamePlural = $"{Models.FieldDefinition.PriorityLandscape.GetFieldDefinitionLabelPluralized()}", SaveFiltersInCookie = true
     };
     GridName    = "priorityLandscapesGrid";
     GridDataUrl = SitkaRoute <PriorityLandscapeController> .BuildUrlFromExpression(tc => tc.IndexGridJsonData());
 }