Пример #1
0
        public async void SetLocalEdutime(EduTimeModel eduTime)
        {
            eduTime.CreateTime = DateTime.Now;

            DAL.LocalSetting _localSetting = new DAL.LocalSetting();
            await _localSetting.SetLocalInfo(typeof(Model.EduTimeModel).Name, EduTime);
        }
Пример #2
0
        public async void GetEduTimeInfo()
        {
            var loaclEdutime = await GetLocalEdutime();

            EduTime = loaclEdutime;

            var re = await GetNetEduTime();

            if (re != null)
            {
                EduTime = re;
                SetLocalEdutime(EduTime);
            }
        }
Пример #3
0
        public async Task <EduTimeModel> GetNetEduTime()
        {
            EduTimeModel eduTime = null;

            try
            {
                var re = await _coreService.GetEduTime(_httpService);//自己的服务器

                if (re == null)
                {
                    re = await _coreService.GetEduBasicInfo(_httpService);//学校的教务官网
                }
                eduTime = re;
            }
            catch
            {
            }
            return(eduTime);
        }