diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index b45d1e1c..27b61476 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -9,7 +9,7 @@ - + @@ -21,7 +21,7 @@ - + diff --git a/src/ECER.Resources.Documents/Applications/ApplicationChildren/CharacterReferences.cs b/src/ECER.Resources.Documents/Applications/ApplicationChildren/CharacterReferences.cs index 26f73c2c..de9c6f1a 100644 --- a/src/ECER.Resources.Documents/Applications/ApplicationChildren/CharacterReferences.cs +++ b/src/ECER.Resources.Documents/Applications/ApplicationChildren/CharacterReferences.cs @@ -18,7 +18,7 @@ private async Task UpdateCharacterReferences(ecer_Application application, List< context.DeleteObject(reference); } } - + // Update Existing Character References foreach (var reference in updatedEntities.Where(d => d.ecer_CharacterReferenceId != null)) { @@ -28,7 +28,7 @@ private async Task UpdateCharacterReferences(ecer_Application application, List< context.Detach(oldReference); reference.StatusCode = oldReference.StatusCode; } - + reference.ecer_Origin = ecer_Origin.Portal; context.Attach(reference); context.UpdateObject(reference); } @@ -37,6 +37,7 @@ private async Task UpdateCharacterReferences(ecer_Application application, List< { reference.ecer_CharacterReferenceId = Guid.NewGuid(); reference.StatusCode = ecer_CharacterReference_StatusCode.Draft; + reference.ecer_Origin = ecer_Origin.Portal; context.AddObject(reference); context.AddLink(application, ecer_Application.Fields.ecer_characterreference_Applicationid, reference); } @@ -114,6 +115,7 @@ public async Task UpdateCharacterReferenceForSubmittedApplication(Charac ecerCharacterReference.ecer_CharacterReferenceId = Guid.NewGuid(); ecerCharacterReference.StatusCode = ecer_CharacterReference_StatusCode.ApplicationSubmitted; ecerCharacterReference.ecer_IsAdditional = true; + ecerCharacterReference.ecer_Origin = ecer_Origin.Portal; context.AddObject(ecerCharacterReference); context.AddLink(application, ecer_Application.Fields.ecer_characterreference_Applicationid, ecerCharacterReference); context.SaveChanges(); diff --git a/src/ECER.Resources.Documents/Applications/ApplicationChildren/WorkExperienceReferences.cs b/src/ECER.Resources.Documents/Applications/ApplicationChildren/WorkExperienceReferences.cs index 6ee2dd93..16593d07 100644 --- a/src/ECER.Resources.Documents/Applications/ApplicationChildren/WorkExperienceReferences.cs +++ b/src/ECER.Resources.Documents/Applications/ApplicationChildren/WorkExperienceReferences.cs @@ -27,6 +27,7 @@ private async Task UpdateWorkExperienceReferences(ecer_Application application, context.Detach(oldReference); reference.StatusCode = oldReference.StatusCode; } + reference.ecer_Origin = ecer_Origin.Portal; context.Attach(reference); context.UpdateObject(reference); } @@ -35,6 +36,7 @@ private async Task UpdateWorkExperienceReferences(ecer_Application application, { reference.ecer_WorkExperienceRefId = Guid.NewGuid(); reference.StatusCode = ecer_WorkExperienceRef_StatusCode.Draft; + reference.ecer_Origin = ecer_Origin.Portal; context.AddObject(reference); context.AddLink(application, ecer_Application.Fields.ecer_workexperienceref_Applicationid_ecer, reference); } @@ -140,6 +142,7 @@ public async Task UpdateWorkExReferenceForSubmittedApplication(WorkExper ecerWorkExperienceReference.ecer_Type = firstExistingWorkExp.ecer_Type; // setting ecer_type of new work experience reference to be same as existing ones } } + ecerWorkExperienceReference.ecer_Origin = ecer_Origin.Portal; context.AddObject(ecerWorkExperienceReference); context.AddLink(application, ecer_Application.Fields.ecer_workexperienceref_Applicationid_ecer, ecerWorkExperienceReference); context.SaveChanges();