Пример #1
0
        protected void btnNewORCID_Click(object sender, EventArgs e)
        {
            try
            {
                long subjectID = Convert.ToInt32(Request.QueryString["subject"]);
                int profilePersonID = new Profiles.Edit.Utilities.DataIO().GetPersonID(subjectID);
                Utilities.ProfilesRNSDLL.BLL.ORCID.Person personBLL = new Utilities.ProfilesRNSDLL.BLL.ORCID.Person();
                Utilities.ProfilesRNSDLL.BO.ORCID.Person bo = personBLL.GetByPersonID(profilePersonID);
                if (chkUploadInfoNow.Checked)
                {
                    bo = UploadInfoToORCID1.GetPersonWithPageData(bo);
                }

                GetPageControlValues(bo);

                if (Profiles.ORCID.Utilities.config.RequireAcknowledgement)
                {
                    bo.AgreementAcknowledged = true;
                }
                if (new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.Person().CreateNewORCID(bo, LoggedInInternalUsername, Profiles.ORCID.Utilities.ProfilesRNSDLL.BO.ORCID.REFPersonStatusType.REFPersonStatusTypes.User_Push_Failed))
                {
                    Edit.Utilities.DataIO data = new Edit.Utilities.DataIO();
                    data.AddLiteral(subjectID, data.GetStoreNode("http://vivoweb.org/ontology/core#orcidId"), data.GetStoreNode(bo.ORCID), this.PropertyListXML);

                    bool isProxy = Profiles.ORCID.Utilities.DataIO.getNodeIdFromInternalUserName(LoggedInInternalUsername) != subjectID;
                    Response.Redirect("~/ORCID/CreationConfirmation.aspx?UserORCID=" + bo.ORCID + "&Proxy="+isProxy, false);
                    return;
                }
                else
                {
                    this.lblErrorsCreate.Text = bo.Error + bo.AllErrors + "<br /><br />";
                    GetErrorsAndMessages(bo);
                }
            }
            catch (Exception ex)
            {
                lblErrorsCreate.Text = ex.Message;
                LogException(ex);
            }
        }
Пример #2
0
        protected void btnNewORCID_Click(object sender, EventArgs e)
        {
            try
            {
                long subjectID       = Convert.ToInt32(Request.QueryString["subject"]);
                int  profilePersonID = new Profiles.Edit.Utilities.DataIO().GetPersonID(subjectID);
                Utilities.ProfilesRNSDLL.BLL.ORCID.Person personBLL = new Utilities.ProfilesRNSDLL.BLL.ORCID.Person();
                Utilities.ProfilesRNSDLL.BO.ORCID.Person  bo        = personBLL.GetByPersonID(profilePersonID);
                if (chkUploadInfoNow.Checked)
                {
                    bo = UploadInfoToORCID1.GetPersonWithPageData(bo);
                }

                GetPageControlValues(bo);

                if (Profiles.ORCID.Utilities.config.RequireAcknowledgement)
                {
                    bo.AgreementAcknowledged = true;
                }
                if (new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.Person().CreateNewORCID(bo, LoggedInInternalUsername, Profiles.ORCID.Utilities.ProfilesRNSDLL.BO.ORCID.REFPersonStatusType.REFPersonStatusTypes.User_Push_Failed))
                {
                    Edit.Utilities.DataIO data = new Edit.Utilities.DataIO();
                    data.AddLiteral(subjectID, data.GetStoreNode("http://vivoweb.org/ontology/core#orcidId"), data.GetStoreNode(bo.ORCID), this.PropertyListXML);

                    bool isProxy = Profiles.ORCID.Utilities.DataIO.getNodeIdFromInternalUserName(LoggedInInternalUsername) != subjectID;
                    Response.Redirect("~/ORCID/CreationConfirmation.aspx?UserORCID=" + bo.ORCID + "&Proxy=" + isProxy, false);
                    return;
                }
                else
                {
                    this.lblErrorsCreate.Text = bo.Error + bo.AllErrors + "<br /><br />";
                    GetErrorsAndMessages(bo);
                }
            }
            catch (Exception ex)
            {
                lblErrorsCreate.Text = ex.Message;
                LogException(ex);
            }
        }
Пример #3
0
 public Utilities.ProfilesRNSDLL.BO.ORCID.Person GetPerson()
 {
     Utilities.ProfilesRNSDLL.BLL.ORCID.Person personBLL = new Utilities.ProfilesRNSDLL.BLL.ORCID.Person();
     Utilities.ProfilesRNSDLL.BO.ORCID.Person  person    = personBLL.GetByInternalUsername(LoggedInInternalUsername);
     return(person);
 }
Пример #4
0
 public Utilities.ProfilesRNSDLL.BO.ORCID.Person GetPerson()
 {
     Utilities.ProfilesRNSDLL.BLL.ORCID.Person personBLL = new Utilities.ProfilesRNSDLL.BLL.ORCID.Person();
     Utilities.ProfilesRNSDLL.BO.ORCID.Person person = personBLL.GetByInternalUsername(LoggedInInternalUsername);
     return person;
 }