示例#1
0
        protected void btnSubmitToORCID_Click(object sender, EventArgs e)
        {
            String LoggedInInternalUsername = new Profiles.ORCID.Utilities.DataIO().GetInternalUserID();

            try
            {
                if (UploadInfoToORCID1.ResearchExpertiseAndProfessionalInterests.Length > 5000)
                {
                    UploadInfoToORCID1.ResearchExpertiseAndProfessionalInterestsErrors += "Error! Biography cannot be longer then 5000 characters";
                    return;
                }
                Profiles.ORCID.Utilities.ProfilesRNSDLL.BO.ORCID.Person         person           = UploadInfoToORCID1.GetPersonWithPageData();
                Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.PersonMessage personMessageBLL = new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.PersonMessage();
                personMessageBLL.CreateUploadMessages(person, LoggedInInternalUsername);
            }
            catch (Exception ex)
            {
                lblErrorsUpload.Text = ex.Message;
                Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.ErrorLog.LogError(ex, LoggedInInternalUsername);
            }
        }
        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> &gt; <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         = "&nbsp;<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'/>&nbsp;<a href='" + Root.Domain + "/ORCID/CreateMyORCID.aspx'>Create My ORCID</a>" + orcidHelpLink + "<br><img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/>&nbsp;<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'/>&nbsp;<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'/>&nbsp;<a href='" + Root.Domain + "/ORCID/CreateBatch.aspx'>Batch Upload</a><br><img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/>&nbsp;<a href='" + Root.Domain + "/ORCID/UpdateSecurityGroupDefaultDecisions.aspx'>ORCID Privacy Mapping</a></li>";
            }
        }
示例#3
0
 public ORCIDBaseModule(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
     : base(pagedata, moduleparams, pagenamespaces)
 {
     data = new Profiles.ORCID.Utilities.DataIO();
     this.PropertyListXML = (new Profiles.Profile.Utilities.DataIO()).GetPropertyList(this.BaseData, base.PresentationXML, "", true, true, false);
 }
示例#4
0
 public ORCIDBaseModule()
 {
     data = new Profiles.ORCID.Utilities.DataIO();
 }
        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> &gt; <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 = "&nbsp;<a style='border: none;' href='" + orcidInfoSite + "' target='_blank'><img style='border-style: none' src='" + Root.Domain + "/Framework/Images/info.png'  border='0'></a>";
            }
            //litCreateProvideORCID.Text = "<img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/>&nbsp;<a href='" + Root.Domain + "/ORCID/CreateMyORCID.aspx'>Create My ORCID</a>" + orcidHelpLink + "<br><img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/>&nbsp;<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'/>&nbsp;<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);

            lbCreateMyORCID.Text = "Create ORCID" + orcidHelpLink;
            lbProvideMyORCID.Text = "Provide My ORCID" + orcidHelpLink;

            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'/>&nbsp;<a href='" + Root.Domain + "/ORCID/CreateBatch.aspx'>Batch Upload</a><br><img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/>&nbsp;<a href='" + Root.Domain + "/ORCID/UpdateSecurityGroupDefaultDecisions.aspx'>ORCID Privacy Mapping</a></li>";
            }
        }
 protected void btnSubmitToORCID_Click(object sender, EventArgs e)
 {
     String LoggedInInternalUsername = new Profiles.ORCID.Utilities.DataIO().GetInternalUserID();
     try
     {
         if (UploadInfoToORCID1.ResearchExpertiseAndProfessionalInterests.Length > 5000)
         {
             UploadInfoToORCID1.ResearchExpertiseAndProfessionalInterestsErrors += "Error! Biography cannot be longer then 5000 characters";
             return;
         }
         Profiles.ORCID.Utilities.ProfilesRNSDLL.BO.ORCID.Person person = UploadInfoToORCID1.GetPersonWithPageData();
         Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.PersonMessage personMessageBLL = new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.PersonMessage();
         personMessageBLL.CreateUploadMessages(person, LoggedInInternalUsername);
     }
     catch (Exception ex)
     {
         lblErrorsUpload.Text = ex.Message;
         Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.ErrorLog.LogError(ex, LoggedInInternalUsername);
     }
 }
 public ORCIDBaseModule(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
     : base(pagedata, moduleparams, pagenamespaces)
 {
     data = new Profiles.ORCID.Utilities.DataIO();
     this.PropertyListXML = (new Profiles.Profile.Utilities.DataIO()).GetPropertyList(this.BaseData, base.PresentationXML, "", true, true, false);
 }
 public ORCIDBaseModule()
 {
     data = new Profiles.ORCID.Utilities.DataIO();
 }
 public ORCIDBaseModule(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
     : base(pagedata, moduleparams, pagenamespaces)
 {
     data = new Profiles.ORCID.Utilities.DataIO();
 }
示例#10
0
 public ORCIDBaseModule(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
     : base(pagedata, moduleparams, pagenamespaces)
 {
     data = new Profiles.ORCID.Utilities.DataIO();
 }