/// <summary> /// </summary> /// <returns></returns> public ClientResult GetStatus() { var result = new ClientResult(); if (UtcOffset != null) { int t = OrnamentContext.CorrectClientUtcTime(UtcOffset.Value); OrnamentModule.SetClientOffsetHour(t); } else if (OrnamentModule.GetOffSetHour() != null) { result.ClientServerOffset = OrnamentModule.GetOffSetHour(); } //refresh online. User user = OrnamentContext.MemberShip.CurrentUser(); if (user != null) { IMessageDaoFactory daoFactory = OrnamentContext.DaoFactory.MessageDaoFactory; int cout = daoFactory.SimpleMessageDao.CountNotifyMsg(user, ReadStatus.UnRead) + daoFactory.PersonalMessageDao.CountNewMessage(user); result.IsLogin = true; result.HasMessage = cout != 0; } else { result.IsLogin = false; } return result; }
/// <summary> /// </summary> /// <returns></returns> public ClientResult GetStatus() { var result = new ClientResult(); if (UtcOffset != null) { int t = OrnamentContext.CorrectClientUtcTime(UtcOffset.Value); OrnamentModule.SetClientOffsetHour(t); } else if (OrnamentModule.GetOffSetHour() != null) { result.ClientServerOffset = OrnamentModule.GetOffSetHour(); } //refresh online. User user = OrnamentContext.MemberShip.CurrentUser(); if (user != null) { IMessageDaoFactory daoFactory = OrnamentContext.DaoFactory.MessageDaoFactory; int cout = daoFactory.SimpleMessageDao.CountNotifyMsg(user, ReadStatus.UnRead) + daoFactory.PersonalMessageDao.CountNewMessage(user); result.IsLogin = true; result.HasMessage = cout != 0; } else { result.IsLogin = false; } return(result); }