private void handleFacebookUser(string sessionKey, string userId) { log.Debug("Handling facebook user", userId); facebookApi = new FacebookAPI(); facebookApi.IsDesktopApplication = false; facebookApi.ApplicationKey = apikey; facebookApi.Secret = apisecret; facebookApi.SessionKey = sessionKey; facebookApi.UserId = userId; facebookApi.ConnectToFacebook(); FacebookId = facebookApi.GetLoggedInUser(); Collection <Facebook.Entity.User> fb_users = facebookApi.GetUserInfo(facebook_id); log.Debug("Got Facebook users fb_users", fb_users); fb_user = fb_users[0]; log.Debug("Facebook user fb_user", fb_user); IRecordList <DreamFolk> dreamFolk = DataProvider.LoadList <DreamFolk>(new FilterInfo("FacebookId", FacebookId)); log.Debug("Got dreamFolk folk with FacebookId", FacebookId, dreamFolk); DreamFolk dreamPerson = null; if (dreamFolk.Count > 0) { dreamPerson = dreamFolk[0]; } if (dreamPerson == null) { log.Warn("Creating new dreamPerson from Main.Current"); dreamPerson = new DreamFolk(Main.Current.FbUser); dreamPerson.Save(true); } /* * else if ( dreamPerson.Birthday != Main.Current.FbUser.Birthday ) * { * log.Warn("Updating birthday dreamPerson from Main.Current"); * dreamPerson.Birthday = (DateTime)Main.Current.FbUser.Birthday; * dreamPerson.Save(true); * } * else if ( !dreamPerson.Updated ) */ else { log.Warn("Updating dreamPerson"); dreamPerson.update(fb_user); dreamPerson.Updated = true; dreamPerson.Save(true); } CurrentDreamFriend = dreamPerson; Now.Friends = CurrentDreamFriend.Friends; }
private void LoadWorkInfoPanel(User user) { tlpWork.Controls.Clear(); if (user.WorkHistory != null && user.WorkHistory.Count > 0) { int row = 0; foreach(Work job in user.WorkHistory) { if (!String.IsNullOrEmpty(job.CompanyName)) { tlpWork.Controls.Add(CreatePromptLabel(Resources.lblEmployer), 0, row); tlpWork.Controls.Add(CreateValueLabel(job.CompanyName), 1, row); row++; } if (!String.IsNullOrEmpty(job.Position)) { tlpWork.Controls.Add(CreatePromptLabel(Resources.lblPosition), 0, row); tlpWork.Controls.Add(CreateValueLabel(job.Position), 1, row); row++; } if (job.StartDate > DateTime.MinValue) { StringBuilder timePeriod = new StringBuilder(); timePeriod.Append(job.StartDate.ToString("MM/yyyy", CultureInfo.InvariantCulture)); timePeriod.Append(" - "); if (job.EndDate == DateTime.MinValue) { timePeriod.Append("Present"); } else { timePeriod.Append(job.EndDate.ToString("MM/yyyy", CultureInfo.InvariantCulture)); } tlpWork.Controls.Add(CreatePromptLabel(Resources.lblTimePeriod), 0, row); tlpWork.Controls.Add(CreateValueLabel(timePeriod.ToString()), 1, row); row++; } if (job.Location != null) { tlpWork.Controls.Add(CreatePromptLabel(Resources.lblLocation), 0, row); tlpWork.Controls.Add(CreateValueLabel(job.Location.ToString()), 1, row); row++; } if (!String.IsNullOrEmpty(job.Description)) { tlpWork.Controls.Add(CreatePromptLabel(Resources.lblDescription), 0, row); tlpWork.Controls.Add(CreateValueLabel(job.Description), 1, row); row++; } tlpWork.Controls.Add(new Label(), 0, row); tlpWork.Controls.Add(new Label(), 1, row); row++; } foreach (RowStyle rowStyle in tlpWork.RowStyles) { rowStyle.SizeType = SizeType.AutoSize; } } }
private void LoadPicture(User user) { if (user.PictureUrl != null) { pbProfilePicture.ImageLocation = user.PictureUrl.ToString(); } else { pbProfilePicture.Image = user.Picture; } }
private void LoadPersonalInfoPanel(User user) { SetRowValue(tlpPersonal, lblActivities, user.Activities); SetRowValue(tlpPersonal, lblInterests, user.Interests); SetRowValue(tlpPersonal, lblFavoriteMusic, user.Music); SetRowValue(tlpPersonal, lblFavoriteTVShows, user.TVShows); SetRowValue(tlpPersonal, lblFavoriteMovies, user.Movies); SetRowValue(tlpPersonal, lblFavoriteBooks, user.Books); SetRowValue(tlpPersonal, lblFavoriteQuotes, user.Quotes); SetRowValue(tlpPersonal, lblAboutMe, user.AboutMe); }
public ProfileItemSelectedEventArgs(User user) { _user = user; }
public InviteeSelectedEventArgs(User invitee) { _invitee = invitee; }
/// <summary> /// Loads the Facebook User from ViewState. This is used to pull back data during a Postback operation. /// </summary> private void LoadFromViewState() { if (UseViewState) { object user = ViewState["user"]; if (!object.Equals(user,null)) { _user = (User) user; } } }
/// <summary> /// Determine if the two specified users are friends /// </summary> /// <param name="user1">User to check</param> /// <param name="user2">User to check</param> /// <returns>whether specified users are friends or not</returns> public bool AreFriends(User user1, User user2) { if (user1 == null) { throw new ArgumentNullException("user1"); } if (user2 == null) { throw new ArgumentNullException("user2"); } return AreFriends(user1.UserId, user2.UserId); }
public IAsyncResult BeginGetPhotos(User user, AsyncCallback callBack, Object state) { GetPhotosDelegate3 d = GetPhotos; IAsyncResult result = d.BeginInvoke(user, callBack, state); return result; }
public IAsyncResult BeginGetPhotos(string albumId, Collection<string> photoList, User user, AsyncCallback callBack, Object state) { GetPhotosDelegate5 d = GetPhotos; IAsyncResult result = d.BeginInvoke(albumId, photoList, user, callBack, state); return result; }
public IAsyncResult BeginAreFriends(User userId1, User userId2, AsyncCallback callBack, Object state) { AreFriendsDelegate2 d = AreFriends; IAsyncResult result = d.BeginInvoke(userId1, userId2, callBack, state); return result; }
private void LoadUser(User user) { if (user.PictureUrl != null) { pbProfilePicture.ImageLocation = user.PictureUrl.ToString(); } else { pbProfilePicture.Image = user.Picture; } lblName.Text = User.Name; lblNetworks.Text = DisplayNetworks(User.Affiliations); }
public ProfileListItem(User user) : this() { _user = user; LoadUser(user); }
private void LoadBasicInfoPanel(User user) { lblName.Text = user.Name; lblLocation.Text = user.CurrentLocation.ToString(); SetRowValue(tlpBasic, lblSex, EnumHelper.GetEnumDescription(user.Sex)); SetRowValue(tlpBasic, lblInterestedIn, EnumHelper.GetEnumCollectionDescription(user.InterestedInGenders)); SetRowValue(tlpBasic, lblRelationshipStatus, EnumHelper.GetEnumDescription(user.RelationshipStatus)); SetRowValue(tlpBasic, lblLookingFor, EnumHelper.GetEnumCollectionDescription(user.InterstedInRelationshipTypes)); if (user.Birthday != null) { SetRowValue(tlpBasic, lblBirthday, user.Birthday.Value.ToString("MMMM d, yyyy", CultureInfo.InvariantCulture)); } else { SetRowValue(tlpBasic, lblBirthday, string.Empty); } SetRowValue(tlpBasic, lblHometown, user.HometownLocation.ToString()); SetRowValue(tlpBasic, lblPoliticalViews, EnumHelper.GetEnumDescription(user.PoliticalView)); SetRowValue(tlpBasic, lblReligiousViews, user.Religion); }
/// <summary> /// Get the photos for a specified User /// </summary> /// <param name="user">The user</param> /// <returns>photos</returns> public Collection<Photo> GetPhotos(User user) { return GetPhotos(null, null, user); }
public override void PostInitialize() { //UnDataBindWidget(); //this.Record = Main.Current.CurrentDreamFriend; //this.DataBindWidget(); FacebookAPI api = Main.Current.FacebookApi; if (api == null) { return; } Collection <string> friends = api.GetFriendIds(); // IRecordList<RStuff.Model.Member> members = DataProvider.LoadList<RStuff.Model.Member>( // new FilterInfo( "FacebookId", friends, FilterOperation.In ) ); // Repeater<RStuff.Model.Member> friendList = Find<Repeater<RStuff.Model.Member>>("friendList"); // friendList.DataSource = members; // friendList.DataBind(); IRecordList <DreamFolk> dreamFolk = DataProvider.LoadList <DreamFolk>(new FilterInfo("FacebookId", Main.Current.FacebookId)); DreamFolk dreamPerson = null; if (dreamFolk.Count > 0) { dreamPerson = dreamFolk[0]; } if (dreamPerson == null) { log.Warn("Creating new dreamPerson"); dreamPerson = new DreamFolk(Main.Current.FbUser); dreamPerson.Save(true); } else if (dreamPerson.Birthday != Main.Current.FbUser.Birthday) { log.Warn("Updating dreamPerson's birthday"); dreamPerson.Birthday = (DateTime)Main.Current.FbUser.Birthday; dreamPerson.Save(true); } DreamFolk dreamFriend = null; Label label; Collection <Facebook.Entity.User> fb_users; Pane pane, detailPane; bool dreamPersonChanged = false; int count = 0; int added = 0; foreach (string friend in friends) { //if ( count++ > 2 ) break; dreamFriend = dreamPerson.GetFriend(friend); if (dreamFriend == null) { log.Warn("dreamFriend not found, going to create new one, friend is", friend); fb_users = Main.Current.FacebookApi.GetUserInfo(friend); Facebook.Entity.User fb_user = fb_users[0]; log.Debug(fb_user); dreamFriend = new DreamFolk(fb_user); dreamFriend.Save(true); log.Warn("Created new dreamFriend"); dreamPerson.Friends.Add(dreamFriend); //dreamPerson.Save(); dreamPersonChanged = true; added++; } else if (!dreamFriend.Updated) { log.Warn("Updating dreamFriend"); fb_users = Main.Current.FacebookApi.GetUserInfo(dreamFriend.FacebookId); Facebook.Entity.User fb_user = fb_users[0]; log.Debug(fb_user); //dreamFriend.Birthday = dreamFriend.Birthday; dreamFriend.update(fb_user); dreamFriend.Updated = true; dreamFriend.Save(true); count++; } //else // log.Warn("DreamFriend is current and up todate",dreamFriend.FirstName); /* * pane = this.RootContext.CreateWidget<Pane>(this); * pane.AppendClass("dream-person"); * * pane.OnClick += delegate( object sender, ClickEventArgs ea ) * { * DreamFolk dreamFolkFriend = (DreamFolk)ea.Source.Record; * this.RootContext.RawCmd("parent.location='http://www.facebook.com/profile.php?id=" + dreamFolkFriend.FacebookId + "';"); * }; * pane.Record = dreamFriend; * pane.DataBindWidget(); * * label = this.RootContext.CreateWidget<Label>(pane); * label.Text = dreamFriend.FirstName; * label.AppendClass("label-name"); * * if ( dreamFriend.PictureSmallUrl != null ) * { * label = this.RootContext.CreateWidget<Label>(pane); * label.Text = "<img src=\"" + dreamFriend.PictureSmallUrl + "\" class=person>"; * } * else if ( dreamFriend.PictureUrl != null ) * { * label = this.RootContext.CreateWidget<Label>(pane); * label.Text = "<img src=\"" + dreamFriend.PictureUrl + "\" class=person>"; * } * else if ( dreamFriend.PictureBigUrl != null ) * { * label = this.RootContext.CreateWidget<Label>(pane); * label.Text = "<img src=\"" + dreamFriend.PictureBigUrl + "\" class=person>"; * } * * DateTime bday = dreamFriend.Birthday; * //label.Text = date.ToString("d"); * if ( bday.Year == 1900 || bday.Year == DateTime.Now.Year ) * { * detailPane = this.RootContext.CreateWidget<Pane>(pane); * detailPane.AppendClass("dream-detail"); * * label = this.RootContext.CreateWidget<Label>(detailPane); * label.Text = "<img src=\"/Images/tone0.gif\" title=\"Unknown\" class=tone>"; * label.AppendClass("label-tone"); * * label = this.RootContext.CreateWidget<Label>(detailPane); * label.Text = "<img src=\"/Images/glyph0.gif\" title=\"Unknown\" class=seal>"; * label.AppendClass("label-glyph"); * * label = this.RootContext.CreateWidget<Label>(detailPane); * label.Text = "<a target=\"_parent\" href=\"http://apps.facebook.com/dreamspell/index.aspx?invite=1\" style=\"background-color:#3B5998;border-color:#D9DFEA #0E1F5B #0E1F5B #D9DFEA;border-style:solid;border-width:1px;color:white;margin-right:5px;padding:3px 15px;line-height:24px\">Invite!</a>"; * } * else * { * //DreamSpellUtil.Calc(bday); * * detailPane = this.RootContext.CreateWidget<Pane>(pane); * detailPane.AppendClass("dream-detail"); * * label = this.RootContext.CreateWidget<Label>(detailPane); * label.Text = "<img src=\"/Images/tone" + dreamFriend.Tone + ".gif\" title=\""+ dreamFriend.Tone.Name +"\" class=tone>"; * label.AppendClass("label-tone"); * * label = this.RootContext.CreateWidget<Label>(detailPane); * label.Text = "<img src=\"/Images/glyph" + dreamFriend.Seal + ".gif\" title=\""+ (dreamFriend.Seal == null ? "Unknown" : dreamFriend.Seal.Name) +"\" class=seal>"; * label.AppendClass("label-glyph"); * * label = this.RootContext.CreateWidget<Label>(detailPane); * //label.Text = bday.ToString("d"); * label.Text = dreamFriend.GetName(); * label.AppendClass("label-dreamspell-name"); * * //break; * * } */ } if (dreamPersonChanged) { log.Debug("dreamPersonChanged, saving"); dreamPerson.Save(true); } log.Debug("Added " + added + " new dream friends"); log.Debug("Updated " + count + " dream friends"); Repeater <DreamFolk> friendList = this.Find <Repeater <DreamFolk> >("Friends"); //if ( friendList != null && Main.Current.CurrentDreamFriend != null && Main.Current.CurrentDreamFriend.Friends.Count > 0) if (friendList != null && Main.Current.CurrentDreamFriend.Friends.Count > 1) { log.Warn("Going to unbind and rebind friendList, friend count " + dreamFolk.Count); log.Warn("Going to unbind and rebind friendList, CurrentDreamFriend.friend count " + Main.Current.CurrentDreamFriend.Friends.Count); friendList.UnDataBindWidget(); //friendList.DataSource = Main.Current.CurrentDreamFriend.Friends; friendList.DataSource = Main.Current.CurrentDreamFriend.Friends; friendList.DataBind(); //foreach (DreamFolk d in Main.Current.CurrentDreamFriend.Friends) // log.Debug(d.FirstName); } else { log.Error("Skipped unbind and rebind of frinedList"); } }
/// <summary> /// Get the photos for a specified album, photo list, and User /// </summary> /// <param name="albumId">The album</param> /// <param name="photoList">Collection of photo ids</param> /// <param name="user">The user</param> /// <returns>photos</returns> public Collection<Photo> GetPhotos(string albumId, Collection<string> photoList, User user) { if (!IsSessionActive() && IsDesktopApplication) { ConnectToFacebook(); } return _facebookAPI.GetPhotos(albumId, photoList, user); }
private void LoadUserBasedControls(User user) { profile1.User = user; photoAlbum1.Albums = facebookService1.GetPhotoAlbums(user.UserId); }
/// <summary> /// Get the photos for a specified album, list of photos, and User /// </summary> /// <param name="albumId">The album</param> /// <param name="photoList">Collection of photo ids</param> /// <param name="user">The user</param> /// <returns>photos</returns> public string GetPhotosXML(string albumId, Collection<string> photoList, User user) { if (!IsSessionActive() && IsDesktopApplication) { ConnectToFacebook(); } string results = string.Empty; try { results = _facebookAPI.GetPhotosXML(albumId, photoList, user); } catch (FacebookTimeoutException) { _facebookAPI.SessionKey = null; if (IsDesktopApplication) { ConnectToFacebook(); GetPhotosXML(albumId, photoList, user); } else { throw; } } return results; }
public FriendSelectedEventArgs(User user) { _user = user; }
private void LoadEducationInfoPanel(User user) { tpEducation.Controls.Clear(); if (user.SchoolHistory != null) { if (user.SchoolHistory.HigherEducation != null) { StringBuilder collegeText = new StringBuilder(); foreach (HigherEducation higherEducation in user.SchoolHistory.HigherEducation) { collegeText.Append(higherEducation.School); collegeText.Append(" '"); if (higherEducation.ClassYear > 0) collegeText.AppendLine(higherEducation.ClassYear.ToString(CultureInfo.InvariantCulture).Substring(2)); foreach (string concentration in higherEducation.Concentration) { collegeText.AppendLine(concentration); } } SetRowValue(tlpEducation, lblCollege, collegeText.ToString().Trim()); } if (user.SchoolHistory.HighSchool != null) { StringBuilder highSchoolText = new StringBuilder(); if (!String.IsNullOrEmpty(user.SchoolHistory.HighSchool.HighSchoolOneName)) { highSchoolText.Append(user.SchoolHistory.HighSchool.HighSchoolOneName); if (user.SchoolHistory.HighSchool.GraduationYear > 0) { highSchoolText.Append(" '"); if (user.SchoolHistory.HighSchool.GraduationYear > 0) { highSchoolText.AppendLine(user.SchoolHistory.HighSchool.GraduationYear.ToString(CultureInfo.InvariantCulture).Substring(2)); } } } if (!String.IsNullOrEmpty(user.SchoolHistory.HighSchool.HighSchoolTwoName)) { highSchoolText.AppendLine(user.SchoolHistory.HighSchool.HighSchoolTwoName); } SetRowValue(tlpEducation, lblHighSchool, highSchoolText.ToString().Trim()); } } }
private void handleFacebookUser(string sessionKey, string userId ) { log.Debug("Handling facebook user",userId); facebookApi = new FacebookAPI(); facebookApi.IsDesktopApplication = false; facebookApi.ApplicationKey = apikey; facebookApi.Secret = apisecret; facebookApi.SessionKey = sessionKey; facebookApi.UserId = userId; facebookApi.ConnectToFacebook(); FacebookId = facebookApi.GetLoggedInUser(); Collection<Facebook.Entity.User> fb_users = facebookApi.GetUserInfo(facebook_id); log.Debug("Got Facebook users fb_users",fb_users); fb_user = fb_users[0]; log.Debug("Facebook user fb_user",fb_user); IRecordList<DreamFolk> dreamFolk = DataProvider.LoadList<DreamFolk>(new FilterInfo("FacebookId",FacebookId)); log.Debug("Got dreamFolk folk with FacebookId",FacebookId,dreamFolk); DreamFolk dreamPerson = null; if ( dreamFolk.Count > 0 ) dreamPerson = dreamFolk[0]; if ( dreamPerson == null ) { log.Warn("Creating new dreamPerson from Main.Current"); dreamPerson = new DreamFolk(Main.Current.FbUser); dreamPerson.Save(true); } /* else if ( dreamPerson.Birthday != Main.Current.FbUser.Birthday ) { log.Warn("Updating birthday dreamPerson from Main.Current"); dreamPerson.Birthday = (DateTime)Main.Current.FbUser.Birthday; dreamPerson.Save(true); } else if ( !dreamPerson.Updated ) */ else { log.Warn("Updating dreamPerson"); dreamPerson.update(fb_user); dreamPerson.Updated = true; dreamPerson.Save(true); } CurrentDreamFriend = dreamPerson; Now.Friends = CurrentDreamFriend.Friends; }
/// <summary> /// Uses DOM parsing to constitute a PhotoTag data object given the xml returned from facebook /// </summary> internal static User ParseUser(XmlNode node) { User user = new User(); user.UserId = XmlHelper.GetNodeText(node, "uid"); user.FirstName = XmlHelper.GetNodeText(node, "first_name"); user.LastName = XmlHelper.GetNodeText(node, "last_name"); user.Name = XmlHelper.GetNodeText(node, "name"); if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(node, "pic"))) { user.PictureUrl = new Uri(XmlHelper.GetNodeText(node, "pic")); } if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(node, "pic_small"))) { user.PictureSmallUrl = new Uri(XmlHelper.GetNodeText(node, "pic_small")); } if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(node, "pic_big"))) { user.PictureBigUrl = new Uri(XmlHelper.GetNodeText(node, "pic_big")); } if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(node, "pic_square"))) { user.PictureSquareUrl = new Uri(XmlHelper.GetNodeText(node, "pic_square")); } user.Religion = XmlHelper.GetNodeText(node, "religion"); DateTime tempDate; if (DateTime.TryParse(XmlHelper.GetNodeText(node, "birthday"), out tempDate)) { user.Birthday = tempDate; } if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(node, "profile_update_time")) && double.Parse(XmlHelper.GetNodeText(node, "profile_update_time")) > 0) { user.ProfileUpdateDate = DateHelper.ConvertDoubleToDate(double.Parse(XmlHelper.GetNodeText(node, "profile_update_time"), CultureInfo.InvariantCulture)); } if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(node, "sex"))) { user.Sex = (Gender)Enum.Parse(typeof(Gender), XmlHelper.GetNodeText(node, "sex"), true); } if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(node, "relationship_status"))) { user.RelationshipStatus = (RelationshipStatus)Enum.Parse(typeof(RelationshipStatus), XmlHelper.GetNodeText(node, "relationship_status").Replace(" ", "").Replace("'", ""), true); } user.SignificantOtherId = XmlHelper.GetNodeText(node, "significant_other_id"); if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(node, "political"))) { //HACK try { user.PoliticalView = (PoliticalView)Enum.Parse(typeof(PoliticalView), XmlHelper.GetNodeText(node, "political").Replace(" ", ""), true); } catch { user.PoliticalView = PoliticalView.Unknown; } } user.Activities = XmlHelper.GetNodeText(node, "activities"); user.Interests = XmlHelper.GetNodeText(node, "interests"); user.Music = XmlHelper.GetNodeText(node, "music"); user.TVShows = XmlHelper.GetNodeText(node, "tv"); user.Movies = XmlHelper.GetNodeText(node, "movies"); user.Books = XmlHelper.GetNodeText(node, "books"); user.Quotes = XmlHelper.GetNodeText(node, "quotes"); user.AboutMe = XmlHelper.GetNodeText(node, "about_me"); int tempInt = 0; if (int.TryParse(XmlHelper.GetNodeText(node, "notes_count"), out tempInt)) { user.NotesCount = tempInt; } if (int.TryParse(XmlHelper.GetNodeText(node, "wall_count"), out tempInt)) { user.WallCount = tempInt; } XmlNodeList statusNodeList = ((XmlElement)node).GetElementsByTagName("status"); user.Status.Message = XmlHelper.GetNodeText(statusNodeList[statusNodeList.Count-1], "message"); if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(statusNodeList[statusNodeList.Count - 1], "time"))) { user.Status.Time = DateHelper.ConvertDoubleToDate(double.Parse(XmlHelper.GetNodeText(statusNodeList[statusNodeList.Count - 1], "time"), CultureInfo.InvariantCulture)); } XmlElement xmlElement = node as XmlElement; //affiliations NetworkParser.ParseNetworks(xmlElement.GetElementsByTagName("affiliations")[0], user.Affiliations); //meeting_sex user.InterestedInGenders = ParseInterestedInGenders(xmlElement.GetElementsByTagName("meeting_sex")[0]); //interested_in user.InterstedInRelationshipTypes = ParseRelationshipTypes(xmlElement.GetElementsByTagName("meeting_for")[0]); //hometown_location user.HometownLocation = LocationParser.ParseLocation(xmlElement.GetElementsByTagName("hometown_location")[0]); //curent_location user.CurrentLocation = LocationParser.ParseLocation(xmlElement.GetElementsByTagName("current_location")[0]); //school_history user.SchoolHistory = SchoolHistoryParser.ParseSchoolHistory(xmlElement.GetElementsByTagName("hs_info")[0], xmlElement.GetElementsByTagName("education_history")[0]); //work_history user.WorkHistory = WorkParser.ParseWorkHistory(xmlElement.GetElementsByTagName("work_history")[0]); return user; }