예제 #1
0
 internal bool AddIfAny(BO.ORCID.Person person)
 {
     if (person.Works != null)
     {
         BLL.ORCID.PersonWorkIdentifier personWorkIdentifierBLL = new PersonWorkIdentifier();
         for (int i = 0; i < person.Works.Count; i++)
         {
             person.Works[i].PersonID = person.PersonID;
             if (this.Add(person.Works[i]))
             {
                 foreach (BO.ORCID.PersonWorkIdentifier personWorkIdentifier in person.Works[i].Identifiers)
                 {
                     personWorkIdentifier.PersonWorkID = person.Works[i].PersonWorkID;
                     if (!personWorkIdentifierBLL.Save(personWorkIdentifier))
                     {
                         throw new DevelopmentBase.BO.ExceptionSafeToDisplay("Unable to save the work identifier info while creating a work message to ORCID");
                     }
                 }
             }
             else
             {
                 return(false);
             }
         }
     }
     return(true);
 }
예제 #2
0
 internal bool AddIfAny(BO.ORCID.Person person)
 {
     if (person.Works != null)
     {
         BLL.ORCID.PersonWorkIdentifier personWorkIdentifierBLL = new PersonWorkIdentifier();
         for (int i = 0; i < person.Works.Count; i++)
         {
             person.Works[i].PersonID = person.PersonID;
             if (this.Add(person.Works[i]))
             {
                 foreach (BO.ORCID.PersonWorkIdentifier personWorkIdentifier in person.Works[i].Identifiers)
                 {
                     personWorkIdentifier.PersonWorkID = person.Works[i].PersonWorkID;
                     if (!personWorkIdentifierBLL.Save(personWorkIdentifier))
                     {
                         throw new DevelopmentBase.BO.ExceptionSafeToDisplay("Unable to save the work identifier info while creating a work message to ORCID");
                     }
                 }
             }
             else
             {
                 return false;
             }
         }
     }
     return true;
 }