public List <RegionViewModel> GetSettingsSummaryModel()
        {
            var viewManager = new SpatialFilterViewManager(CoreData.UserManager.GetCurrentUser(), SessionHandler.MySettings);
            List <RegionViewModel> regions = viewManager.GetAllRegions();

            return(regions);
        }
Example #2
0
        /// <summary>
        /// Returns all Regions stored in MySettings.
        /// </summary>
        /// <returns></returns>
        public JsonNetResult GetAllRegions()
        {
            JsonModel jsonModel;

            try
            {
                var viewManager = new SpatialFilterViewManager(GetCurrentUser(), SessionHandler.MySettings);
                List <RegionViewModel> regions = viewManager.GetAllRegions();
                jsonModel = JsonModel.Create(regions);
            }
            catch (Exception ex)
            {
                jsonModel = JsonModel.CreateFailure(ex.Message);
            }

            return(new JsonNetResult(jsonModel));
        }