/// <summary> /// 取得人员信息的扩展属性 /// </summary> /// <param name="userCode"></param> /// <returns></returns> public IList <UserProfileExtPropertyInfo> GetUserExtProperty(string userCode) { Guid UserCode = Guid.Empty; try { UserCode = new Guid(userCode); } catch { return(null); } DataSet ds = dal.GetUserExtProperty(UserCode); List <UserProfileExtPropertyInfo> upepList = new List <UserProfileExtPropertyInfo>(); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { UserProfileExtPropertyInfo info = new UserProfileExtPropertyInfo(); info.UserExtPropID = new Guid(dr["UserExtPropID"].ToString()); info.UserExtProperty = dr["UserExtProperty"].ToString(); info.Description = dr["Description"].ToString(); info.Company = dr["Company"].ToString(); info.UserCode = new Guid(dr["UserCode"].ToString()); info.Value = dr["Value"].ToString(); upepList.Add(info); } } return(upepList); }
/// <summary> /// 取得所有扩展属性 /// </summary> /// <returns></returns> public IList <UserProfileExtPropertyInfo> GetAllExtProp() { DataSet ds = dal.GetAllExtProp(); List <UserProfileExtPropertyInfo> upepList = new List <UserProfileExtPropertyInfo>(); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { UserProfileExtPropertyInfo info = new UserProfileExtPropertyInfo(); info.UserExtPropID = new Guid(dr["UserExtPropID"].ToString()); info.UserExtProperty = dr["UserExtProperty"].ToString(); info.Description = dr["Description"].ToString(); info.Company = dr["Company"].ToString(); info.CreatedOn = DateTime.Parse(dr["CreatedOn"].ToString()); info.CreatedBy = dr["CreatedBy"].ToString(); upepList.Add(info); } } return(upepList); }