示例#1
0
 public ClientRegistrationDTO(ClientDemographicDTO clientDemographic, ClientContactAddressDTO clientContactAddress, ClientProfileDTO clientProfile, ClientEnrollmentDTO clientEnrollment)
 {
     ClientDemographic    = clientDemographic;
     ClientContactAddress = clientContactAddress;
     ClientProfile        = clientProfile;
     ClientEnrollment     = clientEnrollment;
 }
示例#2
0
        public static ClientProfileDTO CreateFromView(ClientProfileViewModel clientProfileViewModel)
        {
            var relTypeId = null != clientProfileViewModel.SelectedRelationshipType
                ? clientProfileViewModel.SelectedRelationshipType.Id
                : "";

            var profileDTO = new ClientProfileDTO(clientProfileViewModel.SelectedMaritalStatus.Id, clientProfileViewModel.SelectedKeyPop.Id, clientProfileViewModel.OtherKeyPop, relTypeId,
                                                  clientProfileViewModel.SelectedEducation?.ItemId, clientProfileViewModel.SelectedCompletion?.ItemId, clientProfileViewModel.SelectedOccupation?.ItemId);

            profileDTO.ClientId = clientProfileViewModel.ClientId;
            return(profileDTO);
        }
示例#3
0
        public static ClientRegistrationDTO Create(Client client)
        {
            var clientRegistrationDTO =
                new ClientRegistrationDTO
            {
                ClientDemographic    = ClientDemographicDTO.CreateFromClient(client),
                ClientContactAddress = ClientContactAddressDTO.CreateFromClient(client),
                ClientProfile        = ClientProfileDTO.CreateFromClient(client),
                ClientEnrollment     = ClientEnrollmentDTO.CreateFromClient(client)
            };

            return(clientRegistrationDTO);
        }
        public static ClientRegistrationDTO Create(Client client)
        {
            var clientRegistrationDto =
                new ClientRegistrationDTO
            {
                ClientDemographic    = ClientDemographicDTO.CreateFromClient(client, client.Downloaded),
                ClientContactAddress = ClientContactAddressDTO.CreateFromClient(client, client.Downloaded),
                ClientProfile        = ClientProfileDTO.CreateFromClient(client, client.Downloaded),
                ClientEnrollment     = ClientEnrollmentDTO.CreateFromClient(client, client.Downloaded)
            };

            clientRegistrationDto.Downloaded = client.Downloaded;

            return(clientRegistrationDto);
        }
示例#5
0
        public static ClientProfileDTO CreateFromClient(Client client)
        {
            var profileDTO = new ClientProfileDTO();

            if (null != client)
            {
                profileDTO.MaritalStatus = client.MaritalStatus;
                profileDTO.KeyPop        = client.KeyPop;
                profileDTO.OtherKeyPop   = client.OtherKeyPop;
                profileDTO.ClientId      = client.Id.ToString();
                profileDTO.PreventEnroll = client.PreventEnroll;
                profileDTO.Education     = client.Education;
                profileDTO.Completion    = client.Completion;
                profileDTO.Occupation    = client.Occupation;
            }

            return(profileDTO);
        }