Пример #1
0
        private void AddNewMember(MembershipViewModel newMember, MembershipViewModel parentRecord)
        {
            newMember.LocationId = parentRecord.LocationId;
            newMember.FamilyId   = parentRecord.FamilyId;

            var memberToAdd = new List <MembershipViewModel> {
                newMember
            };

            AddMembership(memberToAdd.ToArray());
        }
Пример #2
0
 public MEMBERSHIP CreateMembership(MembershipViewModel membership)
 {
     return(new MEMBERSHIP
     {
         FAMILY_ID = membership.FamilyId,
         MEMBER_ID = membership.MemberId,
         FIRST_NAME = membership.FirstName,
         MIDDLE_NAME = membership.MiddleName,
         LAST_NAME = membership.LastName,
         DOB = Convert.ToDateTime(membership.Dob),
         GENDER = membership.Gender,
         LOCATION_ID = membership.LocationId,
         MARITAL_STATUS_ID = membership.MaritalStatusId,
         GROUP_ID = membership.GroupId,
         PREFERRERD_CONTACT_METHOD = membership.PreferredContactMethod,
         EFFECTIVE_DATE = membership.EffectiveDateTime,
         EXIT_DATE = membership.ExitDateTime,
         MEMBERSHIP_STATUS_ID = membership.MembershipStatusId,
         LAST_MODIFIED_DATE = DateTime.Now,
         RELATIONSHIP_TYPE_ID = membership.RelationshipTypeId
     });
 }