public void Loaded() { var infouser = _dbService.GetAll <BJUTInfoCenterUserinfo>().FirstOrDefault(); if (infouser != null) { var user = new BJUTInfoCenterUserinfo(); user.InfoCenterAccountInfo = infouser.InfoCenterAccountInfo; user.Username = infouser.Username; user.Password = infouser.Password; InfoUser = user; } var eduuser = _dbService.GetAll <BJUTEduCenterUserinfo>().FirstOrDefault(); if (eduuser != null) { var user = new BJUTEduCenterUserinfo(); user.EduSystemType = eduuser.EduSystemType; user.Username = eduuser.Username; user.Password = eduuser.Password; EduUser = user; } var ibuser = _dbService.GetAll <BJUTLibCenterUserinfo>().FirstOrDefault(); if (ibuser != null) { var user = new BJUTLibCenterUserinfo(); user.Username = ibuser.Username; user.Password = ibuser.Password; LibUser = user; } if (null == Models.Settings.EduProxySetting) { Models.Settings.EduProxySetting = IsProxy = true; } else { IsProxy = Models.Settings.EduProxySetting.Value; } if (null == Models.Settings.EduExperimentalSetting) { Models.Settings.EduExperimentalSetting = IsExperimental = false; } else { IsExperimental = Models.Settings.EduExperimentalSetting.Value; } }
public void SaveUserinfo() { BJUTInfoCenterUserinfo BJUTInfoCenterUserinfo = new BJUTInfoCenterUserinfo(); BJUTInfoCenterUserinfo.Username = AccountModifyVM.Username; BJUTInfoCenterUserinfo.Password = AccountModifyVM.Password; //保存到数据库 Service.DbService.SaveInfoCenterUserinfo(BJUTInfoCenterUserinfo); //同时修改当前选定账号 WIFIHelperVM.InfoUser = BJUTInfoCenterUserinfo; GalaSoft.MvvmLight.Messaging.Messenger.Default.Send <string>("保存成功", messageToken); }
public void Loaded() { var infouser = _dbService.GetAll <BJUTInfoCenterUserinfo>().FirstOrDefault(); if (infouser != null) { var user = new BJUTInfoCenterUserinfo(); user.InfoCenterAccountInfo = infouser.InfoCenterAccountInfo; user.Username = infouser.Username; user.Password = infouser.Password; InfoUser = user; } var eduuser = _dbService.GetAll <BJUTEduCenterUserinfo>().FirstOrDefault(); if (eduuser != null) { var user = new BJUTEduCenterUserinfo(); user.EduSystemType = eduuser.EduSystemType; user.Username = eduuser.Username; user.Password = eduuser.Password; EduUser = user; } var ibuser = _dbService.GetAll <BJUTLibCenterUserinfo>().FirstOrDefault(); if (ibuser != null) { var user = new BJUTLibCenterUserinfo(); user.Username = ibuser.Username; user.Password = ibuser.Password; LibUser = user; } }
public WIFIHelperVM() { BJUTInfoCenterUserinfos = new ObservableCollection <Model.BJUTInfoCenterUserinfo>(); InfoUser = new BJUTInfoCenterUserinfo(); }