public static BasicPersonInfo GetBasicPersonInfo(int?id) { var p = DbUtil.Db.LoadPersonById(id.Value); var pi = new BasicPersonInfo { Age = p.Age.ToString(), Birthday = p.DOB, CampusId = p.CampusId ?? 0, CellPhone = p.CellPhone.FmtFone(), DeceasedDate = p.DeceasedDate, DoNotCallFlag = p.DoNotCallFlag, DoNotMailFlag = p.DoNotMailFlag, DoNotVisitFlag = p.DoNotVisitFlag, DoNotPublishPhones = p.DoNotPublishPhones ?? false, EmailAddress = p.EmailAddress, SendEmailAddress1 = p.SendEmailAddress1 ?? true, EmailAddress2 = p.EmailAddress2, SendEmailAddress2 = p.SendEmailAddress2 ?? false, Employer = p.EmployerOther, First = p.FirstName, GenderId = p.GenderId, Created = p.CreatedDate, Grade = p.Grade.ToString(), HomePhone = p.Family.HomePhone.FmtFone(), JoinDate = p.JoinDate, Last = p.LastName, AltName = p.AltName, Maiden = p.MaidenName, MaritalStatusId = p.MaritalStatusId, MemberStatusId = p.MemberStatusId, Middle = p.MiddleName, NickName = p.NickName, Occupation = p.OccupationOther, PeopleId = p.PeopleId, School = p.SchoolOther, Spouse = p.SpouseName(DbUtil.Db), Suffix = p.SuffixCode, Title = p.TitleCode, WeddingDate = p.WeddingDate, WorkPhone = p.WorkPhone.FmtFone(), ReceiveSMS = p.ReceiveSMS, }; pi.person = p; return(pi); }
public static BasicPersonInfo GetBasicPersonInfo(int? id) { var p = DbUtil.Db.LoadPersonById(id.Value); var pi = new BasicPersonInfo { Age = p.Age.ToString(), Birthday = p.DOB, CampusId = p.CampusId ?? 0, CellPhone = p.CellPhone.FmtFone(), DeceasedDate = p.DeceasedDate, DoNotCallFlag = p.DoNotCallFlag, DoNotMailFlag = p.DoNotMailFlag, DoNotVisitFlag = p.DoNotVisitFlag, DoNotPublishPhones = p.DoNotPublishPhones ?? false, EmailAddress = p.EmailAddress, SendEmailAddress1 = p.SendEmailAddress1 ?? true, EmailAddress2 = p.EmailAddress2, SendEmailAddress2 = p.SendEmailAddress2 ?? false, Employer = p.EmployerOther, First = p.FirstName, GenderId = p.GenderId, Created = p.CreatedDate, Grade = p.Grade.ToString(), HomePhone = p.Family.HomePhone.FmtFone(), JoinDate = p.JoinDate, Last = p.LastName, AltName = p.AltName, Maiden = p.MaidenName, MaritalStatusId = p.MaritalStatusId, MemberStatusId = p.MemberStatusId, Middle = p.MiddleName, NickName = p.NickName, Occupation = p.OccupationOther, PeopleId = p.PeopleId, School = p.SchoolOther, Spouse = p.SpouseName(DbUtil.Db), Suffix = p.SuffixCode, Title = p.TitleCode, WeddingDate = p.WeddingDate, WorkPhone = p.WorkPhone.FmtFone(), ReceiveSMS = p.ReceiveSMS, }; pi.person = p; return pi; }