private void ProcessPageLoad() { //Retrieve header menu links //litNavHtml.Text = _SystemBL.GetNavHtml(); // Set the login URL hypLogMeIn.NavigateUrl = strRedirectURL; if (Profile.UserId != 0) { // We are logged in pnlNotLoggedIn.Visible = false; pnlLoggedIn.Visible = true; //pnlDisplayName.Visible = true; UserBL _userBL = new UserBL(); //UserPreferences userPreference = new UserPreferences(); //userPreference = _userBL.GetUserPreferences(Profile.UserId); //if (userPreference.ProfileExists) if (Profile.HasProfile == true) { hypViewMyProfile.Visible = true; hypViewMyProfile.NavigateUrl = "~/ProfileDetails.aspx?Person=" + Profile.ProfileId; hypManageProxies.Visible = true; hypManageProxies.NavigateUrl = "~/Proxy.aspx"; hypEditMyProfile.Visible = true; hypEditMyProfile.NavigateUrl = "~/ProfileEdit.aspx?From=Self&Person=" + Profile.ProfileId; //lblDisplayName.Text = Profile.DisplayName; } else if (_UserBL.GetMyProxies(Profile.UserId).Length > 0) { hypManageProxies.Visible = true; hypManageProxies.NavigateUrl = "~/Proxy.aspx"; } } else { // We are not logged in pnlNotLoggedIn.Visible = true; pnlLoggedIn.Visible = false; //pnlDisplayName.Visible = false; // Hide the mini search //upnlMinisearch.Visible = false; // Hide the whole network panel pnlMyNetwork.Visible = false; // Set the Edit Profile link when not logged in hypNotLoggedIn.NavigateUrl = strRedirectURL + "?EditMyProfile=true"; } // Update the left panels upnlMinisearch.Update(); pnlMyNetwork.Update(); }
public string GetUserPhotoURL(int personId) { UserPreferences userPreference = new UserPreferences(); userPreference = new UserBL().GetUserPreferences(personId); string url = ConfigUtil.GetConfigItem("DefaultPersonImageURL"); if (userPreference.PhotoPref == 9) { url = string.Format("Thumbnail.ashx?id={0}&random={1}", personId, new Random().Next().ToString()); } else { DataSet photoDS = new PhotoDA().GetUserPhotoList(personId, 2); if (photoDS.Tables[0].Rows.Count > 0) { if (photoDS.Tables[0].Rows[userPreference.PhotoPref] != null) url = Convert.ToString(photoDS.Tables[0].Rows[userPreference.PhotoPref]["PhotoLink"]); } } return url; }