private EyouSoft.SSOComponent.Entity.UserInfo ConvertToUser(EyouSoft.SSOComponent.SSORemote.UserInfo RemoteUser) { UserInfo User = new UserInfo(); User.ID = RemoteUser.ID; User.AreaId = RemoteUser.AreaId; User.CityId = RemoteUser.CityId; User.CompanyID = RemoteUser.CompanyID; User.DepartId = RemoteUser.DepartId; User.DepartName = RemoteUser.DepartName; User.IsAdmin = RemoteUser.IsAdmin; User.IsEnable = RemoteUser.IsEnable; User.LoginTicket = RemoteUser.LoginTicket; User.OpUserId = RemoteUser.OpUserId; User.PermissionList = RemoteUser.PermissionList; User.ProvinceId = RemoteUser.ProvinceId; User.UserName = RemoteUser.UserName; foreach (EyouSoft.SSOComponent.SSORemote.CompanyType companyType in RemoteUser.CompanyRole.RoleItems) { User.CompanyRole.SetRole((EyouSoft.Model.CompanyStructure.CompanyType)Convert.ToInt32(companyType)); } User.ContactInfo.ContactName = RemoteUser.ContactInfo.ContactName; User.ContactInfo.ContactSex = (EyouSoft.Model.CompanyStructure.Sex)Convert.ToInt32(RemoteUser.ContactInfo.ContactSex); User.ContactInfo.Email = RemoteUser.ContactInfo.Email; User.ContactInfo.Fax = RemoteUser.ContactInfo.Fax; User.ContactInfo.Mobile = RemoteUser.ContactInfo.Mobile; User.ContactInfo.MQ = RemoteUser.ContactInfo.MQ; User.ContactInfo.MSN = RemoteUser.ContactInfo.MSN; User.ContactInfo.QQ = RemoteUser.ContactInfo.QQ; User.ContactInfo.Tel = RemoteUser.ContactInfo.Tel; return(User); }
private EyouSoft.SSOComponent.SSORemote.UserInfo ConvertToSSOUser(UserInfo User) { EyouSoft.SSOComponent.SSORemote.UserInfo RemoteUser = new EyouSoft.SSOComponent.SSORemote.UserInfo(); RemoteUser.ID = User.ID; RemoteUser.AreaId = User.AreaId; RemoteUser.CityId = User.CityId; RemoteUser.CompanyID = User.CompanyID; RemoteUser.DepartId = User.DepartId; RemoteUser.DepartName = User.DepartName; RemoteUser.IsAdmin = User.IsAdmin; RemoteUser.IsEnable = User.IsEnable; RemoteUser.LoginTicket = User.LoginTicket; RemoteUser.OpUserId = User.OpUserId; RemoteUser.PermissionList = User.PermissionList; RemoteUser.ProvinceId = User.ProvinceId; RemoteUser.UserName = User.UserName; foreach (EyouSoft.Model.CompanyStructure.CompanyType companyType in User.CompanyRole.RoleItems) { RemoteUser.CompanyRole.SetRole((EyouSoft.SSOComponent.SSORemote.CompanyType)Convert.ToInt32(companyType)); } RemoteUser.ContactInfo.ContactName = User.ContactInfo.ContactName; RemoteUser.ContactInfo.ContactSex = (EyouSoft.SSOComponent.SSORemote.Sex)Convert.ToInt32(User.ContactInfo.ContactSex); RemoteUser.ContactInfo.Email = User.ContactInfo.Email; RemoteUser.ContactInfo.Fax = User.ContactInfo.Fax; RemoteUser.ContactInfo.Mobile = User.ContactInfo.Mobile; RemoteUser.ContactInfo.MQ = User.ContactInfo.MQ; RemoteUser.ContactInfo.MSN = User.ContactInfo.MSN; RemoteUser.ContactInfo.QQ = User.ContactInfo.QQ; RemoteUser.ContactInfo.Tel = User.ContactInfo.Tel; return(RemoteUser); }
/// <summary> /// 获取用户信息 /// </summary> /// <param name="UID">用户编号</param> /// <returns>用户信息</returns> public UserInfo GetUserInfo(string UID) { //GetCache(); UserInfo User = LocalLogin.GetUserInfo(UID); if (User == null) { EyouSoft.SSOComponent.SSORemote.UserInfo RemoteUser = RemoteLogin.GetUserInfo(UID); User = ConvertToUser(RemoteUser); } return(User); }