예제 #1
0
        public string ClearCache(string password)
        {
            string pwd = Sp.GetCurrentPassword();

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

            if (password != pwd)
            {
                return("密码错误");
            }
            else
            {
                var aqiManager = EngineContext.Current.Resolve <IAqiManager>();
                aqiManager.Update();
                return("ok");
            }
        }
예제 #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);
            }
        }