public string ClearCache(string password)
        {
            string pwd = Sp.GetCurrentPassword();

            if (password != pwd)
            {
                return("密码错误");
            }
            else
            {
                var cacheManager = new MemoryCacheManager();
                cacheManager.Clear();
                return("ok");
            }
        }
        public string UpdateData(string password)
        {
            string pwd = Sp.GetCurrentPassword();

            if (password != pwd)
            {
                return("密码错误");
            }
            else
            {
                var aqiManager = EngineContext.Current.Resolve <IAqiManager>();
                aqiManager.Update();
                return("ok");
            }
        }
Esempio n. 3
0
        public void Execute()
        {
            ISettingService settingService = EngineContext.Current.Resolve <ISettingService>();
            var             systemSettings = settingService.LoadSetting <SystemSetting>();

            string appUrl = systemSettings.MobileApiAddress;

            string rs;

            using (var wc = new WebClient())
            {
                rs = wc.DownloadString(appUrl + "/Notification/ClearCache?password="******"ok")
            {
                throw new ApplicationException(rs);
            }
        }