protected void grdEditPublications_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.Header) { e.Row.Cells[0].Text = PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value; e.Row.Cells[0].ColumnSpan = 3; e.Row.Cells[1].Visible = false; e.Row.Cells[2].Visible = false; } if (e.Row.RowType == DataControlRowType.DataRow) { ++this.Counter; ImageButton lnkDelete = (ImageButton)e.Row.FindControl("lnkDelete"); lnkDelete.CommandArgument = grdEditPublications.DataKeys[e.Row.RowIndex].Value.ToString(); Label lblCounter = (Label)e.Row.FindControl("lblCounter"); lblCounter.Text = (this.Counter).ToString() + "."; if (!DataBinder.Eval(e.Row.DataItem, "mpid").Equals(System.DBNull.Value)) { string str = (string)DataBinder.Eval(e.Row.DataItem, "mpid"); if (str.Length > 0) { ImageButton lb = (ImageButton)e.Row.FindControl("lnkEdit"); lb.Visible = true; } } } }
public CustomEditWebsite(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); this.XMLData = pagedata; data = new Profiles.Edit.Modules.CustomEditWebsite.DataIO(); Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } Predicate = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, Predicate, false, true, false); this.PredicateID = data.GetStoreNode(Predicate); base.GetNetworkProfile(this.SubjectID, this.PredicateID); litBackLink.Text = "<a href='" + Root.Domain + "/edit/default.aspx?subject=" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; btnEditAwards.Text = "Add " + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "(s)"; lblNoAwards.Text = "No " + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "s have been added."; securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = Predicate; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); if (Request.QueryString["new"] != null && Session["new"] != null) { Session["pnlInsertAward.Visible"] = null; Session["new"] = null; if (Session["newclose"] != null) { Session["newclose"] = null; btnInsertCancel_OnClick(this, new EventArgs()); } else { btnEditAwards_OnClick(this, new EventArgs()); } } securityOptions.BubbleClick += SecurityDisplayed; }
protected void grdEditPublications_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.Header) { e.Row.Cells[0].Text = PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value; e.Row.Cells[0].Attributes.Add("style", "border-right:none;"); e.Row.Cells[1].Attributes.Add("style", "width:70px;"); } if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[0].Attributes.Add("style", "padding:2px;"); e.Row.Cells[1].Attributes.Add("style", "padding:2px;width:70px;vertical-align:top;"); btnImgDeletePub2.Visible = false; btnImgDeletePub.Visible = true; btnDeletePub.Enabled = true; ++this.Counter; ImageButton lnkDelete = (ImageButton)e.Row.FindControl("lnkDelete"); lnkDelete.CommandArgument = grdEditPublications.DataKeys[e.Row.RowIndex].Value.ToString(); Label lblCounter = (Label)e.Row.FindControl("lblCounter"); lblCounter.Text = (this.Counter).ToString() + "."; if (!DataBinder.Eval(e.Row.DataItem, "mpid").Equals(System.DBNull.Value)) { string str = (string)DataBinder.Eval(e.Row.DataItem, "mpid"); if (str.Length > 0) { ImageButton lb = (ImageButton)e.Row.FindControl("lnkEdit"); lb.Visible = true; lb.ImageUrl = Root.Domain + "/edit/images/icon_edit.gif"; lb.Enabled = true; } } } }
public EditObjectTypeProperty(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { Edit.Utilities.DataIO data; SessionManagement sm = new SessionManagement(); Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); data = new Profiles.Edit.Utilities.DataIO(); if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } this.PredicateURI = Request.QueryString["predicateuri"].Replace("!", "#"); GetSubjectProfile(); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, PredicateURI, false, true, false); this.PropertyLabel = PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value; litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + this.PropertyLabel + "</b>"; securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = PredicateURI; this.PredicateID = data.GetStoreNode(this.PredicateURI); securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDataDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); }
public CustomEditEagleI(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); base.BaseData = pagedata; Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); data = new Edit.Utilities.DataIO(); if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } 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/" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; //create a new network triple request. base.RDFTriple = new RDFTriple(this.SubjectID, data.GetStoreNode(predicateuri)); base.RDFTriple.Expand = true; base.RDFTriple.ShowDetails = true; base.GetDataByURI();//This will reset the data to a Network. securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = predicateuri; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDataDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); }
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."; }
public CustomEditORCID(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); this.XMLData = pagedata; data = new Edit.Utilities.DataIO(); Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false); this.PredicateID = data.GetStoreNode(predicateuri); base.GetNetworkProfile(this.SubjectID, this.PredicateID); litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = predicateuri; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDataDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); securityOptions.BubbleClick += SecurityDisplayed; string orcidHelpLink = string.Empty; string orcidInfoSite = Profiles.ORCID.Utilities.config.InfoSite; if (!string.IsNullOrEmpty(orcidInfoSite)) { orcidHelpLink = " <a style='border: none;' href='" + orcidInfoSite + "' target='_blank'>click here.</a>"; litOrcidInfolink.Text = "For more info about ORCID" + orcidHelpLink; } //litCreateProvideORCID.Text = "<img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/> <a href='" + Root.Domain + "/ORCID/CreateMyORCID.aspx'>Create My ORCID</a>" + orcidHelpLink + "<br><img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/> <a href='" + Root.Domain + "/ORCID/ProvideORCID.aspx'>Provide My ORCID</a>" + orcidHelpLink; //litUploatInfoToORCID.Text = "<img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/> <a href='" + Root.Domain + "/ORCID/UploadInfoToORCID.aspx'>Upload Info To ORCID</a>"; string loggedInInternalUsername = new Profiles.ORCID.Utilities.DataIO().GetInternalUserID(); //Profiles.ORCID.Utilities.ProfilesRNSDLL.BO.ORCID.Person person = new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.Person().GetByInternalUsername(loggedInInternalUsername); String orcid = null; try { orcid = base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:orcidId", base.Namespaces).InnerText; } catch (Exception ex) { } if (orcid == null) { pnlAddORCID.Visible = true; pnlEditORCID.Visible = false; orcidtable.Visible = false; pnlORCIDProxy.Visible = false; } else { litORCIDID.Text = "<a href='" + Profiles.ORCID.Utilities.config.ORCID_URL + "/" + orcid + "'>" + orcid + "</a>"; pnlAddORCID.Visible = false; pnlEditORCID.Visible = true; orcidtable.Visible = true; pnlORCIDProxy.Visible = false; } if (Profiles.ORCID.Utilities.DataIO.getNodeIdFromInternalUserName(loggedInInternalUsername) != this.SubjectID) { pnlORCIDProxy.Visible = true; imbProvideMyORCID.Visible = false; lbProvideMyORCID.Visible = false; imbUploadToORCID.Visible = false; lbUploadToORCID.Visible = false; } if (data.GetSessionSecurityGroup() == -50) { pnlORCIDAdmin.Visible = true; litORCIDAdmin.Text = "<img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/> <a href='" + Root.Domain + "/ORCID/CreateBatch.aspx'>Batch Upload</a><br><img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/> <a href='" + Root.Domain + "/ORCID/UpdateSecurityGroupDefaultDecisions.aspx'>ORCID Privacy Mapping</a></li>"; } }
public CustomEditFreetextKeyword(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); propdata = new Profiles.Profile.Utilities.DataIO(); data = new Profiles.Edit.Utilities.DataIO(); string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false); PropertyLabel = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value; if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; //btnEditProperty.Text = "Add " + PropertyLabel; imbAddArror.Visible = true; this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false); this.MaxCardinality = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@MaxCardinality").Value; this.MinCardinality = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@MinCardinality").Value; securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = predicateuri; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDataDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); txtLabel.Attributes.Add("data-autocomplete-url", Root.Domain + "/edit/Modules/CustomEditFreetextKeyword/keywordAutocomplete.aspx?keys="); }
public EditPersonalGadget(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); base.BaseData = pagedata; data = new Profiles.ORNG.Utilities.DataIO(); Profiles.Edit.Utilities.DataIO editdata = new Profiles.Edit.Utilities.DataIO(); Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } this.PredicateURI = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, this.PredicateURI, false, true, false); litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; //create a new network triple request. base.RDFTriple = new RDFTriple(this.SubjectID, editdata.GetStoreNode(this.PredicateURI)); base.RDFTriple.Expand = true; base.RDFTriple.ShowDetails = true; base.GetDataByURI();//This will reset the data to a Network. // Profiles OpenSocial Extension by UCSF uri = this.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/@rdf:about", base.Namespaces).Value; uri = uri.Substring(0, uri.IndexOf(Convert.ToString(this.SubjectID)) + Convert.ToString(this.SubjectID).Length); appId = Convert.ToInt32(base.GetModuleParamString("AppId")); om = OpenSocialManager.GetOpenSocialManager(uri, Page, true); gadget = om.AddGadget(appId, base.GetModuleParamString("View"), base.GetModuleParamString("OptParams")); securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = this.PredicateURI; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDataDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); hasGadget = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@NumberOfConnections").Value) > 0; }
public Twitter(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); securityOptions.Subject = base.SubjectID; securityOptions.PredicateURI = base.PredicateURI.Replace("!", "#"); securityOptions.PrivacyCode = Convert.ToInt32(base.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); securityOptions.BubbleClick += SecurityDisplayed; this.PlugInName = "Twitter"; string data = Profiles.Framework.Utilities.GenericRDFDataIO.GetSocialMediaPlugInData(this.SubjectID, this.PlugInName); litBackLink.Text = "<a href='" + Root.Domain + "/edit/default.aspx?subject=" + this.SubjectID + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; if (data.Length > 0) { dataexists = true; } txtUsername.Text = data; lblUsername.Text = data; }
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; } // a flag to inform the ucProfileBaseInfo that it is edit page Session["ProfileEdit"] = "true"; Session["ProfileUsername"] = _personId; if (_personId == 0) { if (Session["CurrentPersonEditing"] != null) { _personId = System.Convert.ToInt32(Session["CurrentPersonEditing"]); } } else { Session["CurrentPersonEditing"] = _personId; } Edit.Utilities.DataIO data; data = new Edit.Utilities.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/" + _subject + "'>Edit Menu</a>" + " > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; }