Exemple #1
0
        /// <summary>
        /// 获取MQ用户信息
        /// </summary>
        /// <param name="UID">MQID</param>
        /// <returns>用户信息</returns>
        public UserInfo GetMQUserInfo(int MQID)
        {
            //GetCache();
            UserInfo User = (UserInfo)EyouSoftSSOCache.GetCache(CacheTag.MQ.MQUser + MQID.ToString());

            return(User);
        }
Exemple #2
0
 /// <summary>
 /// 更新用户信息
 /// </summary>
 /// <param name="User">用户信息</param>
 public void UpdateUserInfo(UserInfo User)
 {
     //SetCache();
     EyouSoftSSOCache.Remove(CacheTag.Company.CompanyUser + User.UserName.ToLower());
     EyouSoftSSOCache.Add(CacheTag.Company.CompanyUser + User.UserName.ToLower(), User, DateTime.Now.AddHours(12));
     return;
 }
Exemple #3
0
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="UID">用户编号</param>
        /// <returns>用户信息</returns>
        public UserInfo GetUserInfo(string UID)
        {
            //GetCache();
            UserInfo User = (UserInfo)EyouSoftSSOCache.GetCache(CacheTag.Company.CompanyUser + UID.ToLower());

            return(User);
        }
Exemple #4
0
        /// <summary>
        /// 获取管理员信息
        /// </summary>
        /// <param name="UID">用户名</param>
        /// <returns>管理员信息</returns>
        public MasterUserInfo GetMasterInfo(string UID)
        {
            MasterUserInfo User = (MasterUserInfo)EyouSoftSSOCache.GetCache(CacheTag.System.SystemUser + UID);;

            //GetCache();
            return(User);
        }
Exemple #5
0
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="CompanyId">公司编号</param>
        /// <param name="UID">用户编号</param>
        /// <returns>用户信息</returns>
        public UserInfo GetUserInfo(int CompanyId, string UID)
        {
            //GetCache();
            string   cacheKey = string.Format(EyouSoft.Cache.Tag.Company.CompanyUser, CompanyId.ToString(), UID.ToLower());
            UserInfo User     = (UserInfo)EyouSoftSSOCache.GetCache(cacheKey);

            return(User);
        }
Exemple #6
0
        /// <summary>
        /// 用户退出
        /// </summary>
        /// <param name="CompanyId">公司编号</param>
        /// <param name="UID">用户编号</param>
        /// <returns>是否成功</returns>
        public bool UserLogout(int CompanyId, string UID)
        {
            //RemoveCache();
            string cacheKey = string.Format(EyouSoft.Cache.Tag.Company.CompanyUser, CompanyId.ToString(), UID.ToLower());

            EyouSoftSSOCache.Remove(cacheKey);
            return(true);
        }
Exemple #7
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="User">用户信息</param>
        public void UpdateUserInfo(UserInfo User)
        {
            //SetCache();
            string cacheKey = string.Format(EyouSoft.Cache.Tag.Company.CompanyUser, User.CompanyID.ToString(), User.UserName.ToLower());

            EyouSoftSSOCache.Remove(cacheKey);
            EyouSoftSSOCache.Add(cacheKey, User, DateTime.Now.AddHours(12));
            return;
        }
Exemple #8
0
 /// <summary>
 /// 管理员退出
 /// </summary>
 /// <param name="UID">用户名</param>
 /// <returns></returns>
 public void MasterLogout(string UID)
 {
     EyouSoftSSOCache.Remove(EyouSoft.Cache.Tag.System.SystemUser + UID);
     return;
 }
Exemple #9
0
 /// <summary>
 /// 更新管理员信息
 /// </summary>
 /// <param name="User">用户信息</param>
 public void UpdateMasterInfo(MasterUserInfo User)
 {
     EyouSoftSSOCache.Add(EyouSoft.Cache.Tag.System.SystemUser + User.Username, User, DateTime.Now.AddHours(12));
     return;
 }
Exemple #10
0
 /// <summary>
 /// 用户退出
 /// </summary>
 /// <param name="UID">用户编号</param>
 /// <returns>是否成功</returns>
 public bool UserLogout(string UID)
 {
     //RemoveCache();
     EyouSoftSSOCache.Remove(CacheTag.Company.CompanyUser + UID.ToLower());
     return(true);
 }
Exemple #11
0
 /// <summary>
 /// 更新管理员信息
 /// </summary>
 /// <param name="User">用户信息</param>
 public void UpdateMasterInfo(MasterUserInfo User)
 {
     //SetCache();
     EyouSoftSSOCache.Add(CacheTag.System.SystemUser + User.UserName, User, DateTime.Now.AddHours(12));
     return;
 }
Exemple #12
0
 /// <summary>
 /// 管理员退出
 /// </summary>
 /// <param name="UID">用户名</param>
 /// <returns></returns>
 public void MasterLogout(string UID)
 {
     //RemoveCache();
     EyouSoftSSOCache.Remove(CacheTag.System.SystemUser + UID);
     return;
 }