public async void SetLocalEdutime(EduTimeModel eduTime) { eduTime.CreateTime = DateTime.Now; DAL.LocalSetting _localSetting = new DAL.LocalSetting(); await _localSetting.SetLocalInfo(typeof(Model.EduTimeModel).Name, EduTime); }
public async void GetEduTimeInfo() { var loaclEdutime = await GetLocalEdutime(); EduTime = loaclEdutime; var re = await GetNetEduTime(); if (re != null) { EduTime = re; SetLocalEdutime(EduTime); } }
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); }