public bool SaveAsAuthor(ref string title, ref string message) { if (AuthorObject.Add(null, MainId, EmployeeId, Name, AuthorAffilitionEnum.INL, "Idaho National Laboratory", OrcidId, false, null, null)) { title = "Author Added"; message = "Contact was successfully added to the Authors list."; return(true); } message = "Contact is already an Author. Can not add the Contact more than once."; return(false); }
public AuthorData(AuthorObject ao) { AuthorId = ao.AuthorId; FirstName = ao.Name.FirstName(); MiddleName = ao.Name.MiddelName(); LastName = ao.Name.LastName(); Affiliation = ao.Affiliation; Email = ao.Email; OrcidId = ao.OrcidId; IsPrimary = ao.IsPrimary; EmployeeId = ao.EmployeeId; AffiliationType = ao.AffiliationType; WorkOrg = ao.WorkOrg; CountryCode = MemoryCache.GetCountry(ao.CountryId ?? 0)?.CountryCode; StateCode = MemoryCache.GetState(ao.StateId ?? 0)?.ShortName; }