protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { if (PubMedResults.Tables.Count > 0) { grdPubMedSearchResults.DataSource = PubMedResults; grdPubMedSearchResults.DataBind(); } } else { Session["phAddPub.Visible"] = null; Session["pnlAddPubMed.Visible"] = null; Session["pnlAddCustomPubMed.Visible"] = null; Session["pnlDeletePubMed.Visible"] = null; } if (_personId == 0) { if (Session["CurrentPersonEditing"] != null) { _personId = System.Convert.ToInt32(Session["CurrentPersonEditing"]); } } else { Session["CurrentPersonEditing"] = _personId; } Profiles.Edit.Modules.CustomEditAuthorInAuthorship.DataIO data; data = new Profiles.Edit.Modules.CustomEditAuthorInAuthorship.DataIO(); string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false); litBackLink.Text = "<a href='" + Root.Domain + "/edit/default.aspx?subject=" + _subject + "'>Edit Menu</a>" + " > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; Boolean disambig = data.GetDisambiguationSettings(_personId); rblDisambiguationSettings.SelectedValue = disambig ? "enable" : "disable"; lblDisambigStatus.Text = disambig ? "Automatically adding publications to my profile." : "Not automatically adding publications to my profile."; }
protected void btnSaveDisambig_OnClick(object sender, EventArgs e) { Profiles.Edit.Modules.CustomEditAuthorInAuthorship.DataIO data = new Profiles.Edit.Modules.CustomEditAuthorInAuthorship.DataIO(); if (rblDisambiguationSettings.SelectedValue == "disable") { Session["disambig"] = "false"; data.UpdateDisambiguationSettings(_personId, false); } else { Session["disambig"] = null; data.UpdateDisambiguationSettings(_personId, true); } Boolean disambig = data.GetDisambiguationSettings(_personId); rblDisambiguationSettings.SelectedValue = disambig ? "enable" : "disable"; lblDisambigStatus.Text = disambig ? "Automatically adding publications to my profile." : "Not automatically adding publications to my profile."; upnlEditSection.Update(); Session["pnlDisableDisambig.Visible"] = null; pnlDisableDisambig.Visible = false; }