コード例 #1
0
        /// <summary>
        /// 首页
        /// </summary>
        public ActionResult Index()
        {
            temperature_data_point latest_temp = Utils.get_latest_temp();

            ViewBag.Message = "欢迎宿舍温度监测系统!--最新温度:" + latest_temp.value + "℃ 更新时间:" + latest_temp.timestamp;

            return(View(latest_temp));
        }
コード例 #2
0
        public ActionResult DormInfo()
        {
            ViewBag.Message = "查看宿舍信息";

            temperature_data_point latest_temp = Utils.get_latest_temp();

            ViewBag.timestamp = latest_temp.timestamp;
            ViewBag.value     = latest_temp.value;
            return(View());
        }
コード例 #3
0
        public ActionResult showTemperature()
        {
            ViewBag.Message = "查看温度变化";

            temperature_data_point latest_temp = Utils.get_latest_temp();

            ViewBag.timestamp = latest_temp.timestamp;
            ViewBag.value     = latest_temp.value;

            ViewBag.json = Utils.get_json("http://www.yeelink.net/user/chart_data_v2?sensor=390045&time=profile");

            return(View());
        }