コード例 #1
0
        public GridJsonNetJObjectResult <DNRUplandRegion> IndexGridJsonData()
        {
            var gridSpec = new IndexGridSpec(CurrentPerson);
            var regions  = HttpRequestStorage.DatabaseEntities.DNRUplandRegions.OrderBy(x => x.DNRUplandRegionName).ToList();
            var gridJsonNetJObjectResult = new GridJsonNetJObjectResult <DNRUplandRegion>(regions, gridSpec);

            return(gridJsonNetJObjectResult);
        }
コード例 #2
0
 public IndexViewData(Person currentPerson, MapInitJson mapInitJson, Models.FirmaPage firmaPage) : base(currentPerson, firmaPage)
 {
     PageTitle   = Models.FieldDefinition.DNRUplandRegion.GetFieldDefinitionLabelPluralized();
     MapInitJson = mapInitJson;
     GridSpec    = new IndexGridSpec(currentPerson)
     {
         ObjectNameSingular = Models.FieldDefinition.DNRUplandRegion.FieldDefinitionDisplayName, ObjectNamePlural = Models.FieldDefinition.DNRUplandRegion.GetFieldDefinitionLabelPluralized(), SaveFiltersInCookie = true
     };
     GridName    = "regionsGrid";
     GridDataUrl = SitkaRoute <DNRUplandRegionController> .BuildUrlFromExpression(tc => tc.IndexGridJsonData());
 }