Example #1
0
        public List <HouseDashboard> GetDashboards()
        {
            var configs    = FindAll();
            var dashboards = new List <HouseDashboard>();

            foreach (var config in configs)
            {
                var configJson = JToken.Parse(config.ConfigurationValue);
                var dash       = new HouseDashboard()
                {
                    Source   = config.ConfigurationName,
                    CityName = configJson["cityname"] != null
                    ? configJson["cityname"].ToString()
                    : configJson["cityName"].ToString(),
                    HouseSum          = 9999,
                    LastRecordPubTime = DateTime.Now
                };
                dashboards.Add(dash);
            }
            return(dashboards);
        }
Example #2
0
 // GET: /<controller>/
 public IActionResult Index()
 {
     HouseDashboard.RefreshDashboard();
     return(View(HouseDashboard.LoadDashboard()));
 }
 // GET: /<controller>/
 public IActionResult Index()
 {
     return(View(HouseDashboard.LoadCityDashboards()));
 }
 public void Run()
 {
     HouseDashboard.RefreshDashboard();
 }