/// <summary> /// 判断登录名是否被占用 /// </summary> /// <param name="LoginName"></param> /// <returns></returns> public bool IsExists(string LoginName) { try { SSODataFactory factory = new SSODataFactory(); var user = factory.GetUserByLoginName(LoginName); return(user != null && user.USER_ID != null); } catch (Exception ex) { throw ex; } }
/// <summary> /// 根据用户登录帐号获取用户对象 /// </summary> /// <param name="LoginName"></param> /// <returns></returns> public UserInfo GetUserByLoginName(string LoginName) { try { SSODataFactory factory = new SSODataFactory(); var obj = factory.GetUserByLoginName(LoginName); var user = obj.SSOAdapter(); return(user.Adapter <UserInfo>(new UserInfo())); } catch (Exception ex) { throw ex; } }