public static OrganisationViewModel FromEnrichmentModel(UcasProviderEnrichmentGetModel ucasProviderEnrichmentGetModel, List <TrainingProviderViewModel> aboutAccreditingTrainingProviders, ProviderSummary providerSummary)
        {
            ucasProviderEnrichmentGetModel = ucasProviderEnrichmentGetModel ?? new UcasProviderEnrichmentGetModel {
                EnrichmentModel = new ProviderEnrichmentModel()
                {
                    AccreditingProviderEnrichments = new List <AccreditingProviderEnrichment>()
                }
            };

            var enrichmentModel = ucasProviderEnrichmentGetModel.EnrichmentModel;

            var result = new OrganisationViewModel
            {
                ProviderCode              = providerSummary.ProviderCode,
                ProviderName              = providerSummary.ProviderName,
                TrainWithUs               = enrichmentModel.TrainWithUs,
                TrainWithDisability       = enrichmentModel.TrainWithDisability,
                LastPublishedTimestampUtc = ucasProviderEnrichmentGetModel.LastPublishedTimestampUtc,
                Status = ucasProviderEnrichmentGetModel.Status,
                AboutTrainingProviders = aboutAccreditingTrainingProviders,

                Addr1        = enrichmentModel.Address1,
                Addr2        = enrichmentModel.Address2,
                Addr3        = enrichmentModel.Address3,
                Addr4        = enrichmentModel.Address4,
                Postcode     = enrichmentModel.Postcode,
                Url          = enrichmentModel.Website,
                Telephone    = enrichmentModel.Telephone,
                EmailAddress = enrichmentModel.Email
            };

            return(result);
        }
 public static OrganisationViewModelForAbout FromGeneralViewModel(OrganisationViewModel model)
 {
     return(new OrganisationViewModelForAbout
     {
         ProviderCode = model.ProviderCode,
         ProviderName = model.ProviderName,
         TrainWithUs = model.TrainWithUs,
         AboutTrainingProviders = model.AboutTrainingProviders,
         TrainWithDisability = model.TrainWithDisability,
         LastPublishedTimestampUtc = model.LastPublishedTimestampUtc,
         Status = model.Status,
     });
 }
 public static OrganisationViewModelForContact FromGeneralViewModel(OrganisationViewModel model)
 {
     return(new OrganisationViewModelForContact
     {
         ProviderCode = model.ProviderCode,
         ProviderName = model.ProviderName,
         EmailAddress = model.EmailAddress,
         Telephone = model.Telephone,
         Url = model.Url,
         Addr1 = model.Addr1,
         Addr2 = model.Addr2,
         Addr3 = model.Addr3,
         Addr4 = model.Addr4,
         Postcode = model.Postcode,
         LastPublishedTimestampUtc = model.LastPublishedTimestampUtc,
         Status = model.Status
     });
 }