private void PopulateProviderDetails(API_Course_GetById_v2_Result entityCourse, Course course) { var provider = new Provider { ProviderId = entityCourse.ProviderId.ToString(), ProviderName = entityCourse.ProviderName, AddressLine1 = entityCourse.AddressLine1, AddressLine2 = entityCourse.AddressLine2, Town = entityCourse.Town, County = entityCourse.County, Postcode = entityCourse.Postcode, Phone = entityCourse.Telephone, Website = entityCourse.Website, Ukprn = entityCourse.Ukprn.ToString(), Fax = entityCourse.Fax, Email = entityCourse.Email, Upin = entityCourse.UPIN.HasValue ? entityCourse.UPIN.Value.ToString() : string.Empty, TFPlusLoans = entityCourse.Loans24Plus, DFE1619Funded = entityCourse.CourseDfEFunded ?? false, FEChoices_LearnerDestination = entityCourse.FEChoices_LearnerDestination, FEChoices_LearnerSatisfaction = entityCourse.FEChoices_LearnerSatisfaction, FEChoices_EmployerSatisfaction = entityCourse.FEChoices_EmployerSatisfaction }; course.Provider = provider; }
private void PopulateCourseDetails(Dictionary <string, string> categoryCodeList, API_Course_GetById_v2_Result entityCourse, Course course) { course.CourseId = entityCourse.CourseId; course.CourseTitle = entityCourse.CourseTitle; course.QualificationType = entityCourse.QualificationTypeRef; course.QualificationLevel = entityCourse.Qualification_Level; course.LdcsCode1 = entityCourse.LDCS1; course.LdcsCode2 = entityCourse.LDCS2; course.LdcsCode3 = entityCourse.LDCS3; course.LdcsCode4 = entityCourse.LDCS4; course.LdcsCode5 = entityCourse.LDCS5; course.LdcsDesc1 = GetLdscDescription(entityCourse.LDCS1, categoryCodeList); course.LdcsDesc2 = GetLdscDescription(entityCourse.LDCS2, categoryCodeList); course.LdcsDesc3 = GetLdscDescription(entityCourse.LDCS3, categoryCodeList); course.LdcsDesc4 = GetLdscDescription(entityCourse.LDCS4, categoryCodeList); course.LdcsDesc5 = GetLdscDescription(entityCourse.LDCS5, categoryCodeList); course.TariffRequired = entityCourse.UcasTariffPoints.HasValue ? entityCourse.UcasTariffPoints.Value.ToString() : ""; course.CourseSummary = entityCourse.CourseSummary; course.AwardingBody = entityCourse.AwardingOrganisationName; course.AssessmentMethod = entityCourse.AssessmentMethod; course.BookingUrl = entityCourse.BookingUrl; course.CreditValue = entityCourse.UcasTariffPoints.HasValue ? entityCourse.UcasTariffPoints.Value.ToString() : string.Empty; course.DataType = entityCourse.QualificationDataType; course.EntryRequirements = entityCourse.EntryRequirements; course.EquipmentRequired = entityCourse.EquipmentRequired; course.LadId = entityCourse.LearningAimRef; course.QualificationReferenceAuthority = entityCourse.QualificationRefAuthority; course.QualificationReference = entityCourse.QualificationRef; course.QualificationTitle = entityCourse.QualificationTitle; course.Url = entityCourse.Url; course.DataType = entityCourse.QualificationDataType; if (!string.IsNullOrEmpty(entityCourse.LearningAimRef)) { using (SFA_SearchAPIEntities db = new SFA_SearchAPIEntities()) { var larEntity = db.API_LearningAim_GetById(entityCourse.LearningAimRef).ToList().FirstOrDefault(); if (larEntity != null) { course.AccreditationEndDate = larEntity.AccreditationEndDate.HasValue ? larEntity.AccreditationEndDate.Value.ToString("dd/MM/yyyy") : string.Empty; course.ERAppStatus = larEntity.ErAppStatus; course.ERTtgStatus = larEntity.ErTtgStatus; course.IndependentLivingSkills = larEntity.IndepLivingSkills; course.Level2EntitlementDescription = larEntity.Level2EntitlementCatDesc; course.Level3EntitlementDescription = larEntity.Level3EntitlementCatDesc; course.OtherFundingNonFundedStatus = larEntity.OtherfundingNonFundedStatus; course.QcaGuidedLearningHours = larEntity.QcaGlh; course.SectorLeadBodyDescription = larEntity.SectorLeadBodyDesc; course.SkillsForLifeFlag = larEntity.SkillsForLife; course.SkillsForLifeTypeDescription = larEntity.SkillsForLife; course.TariffRequired = entityCourse.UcasTariffPoints.HasValue ? entityCourse.UcasTariffPoints.ToString() : ""; course.AdultLRStatus = larEntity.AdultlrStatus; } } } }