From fe746999479b88f26c5275501cee2a17ae610bbe Mon Sep 17 00:00:00 2001 From: Ashley Wilson Date: Mon, 4 Nov 2024 15:29:29 -0500 Subject: [PATCH] Cleanup and remove unused code --- .../UDS.Net.Forms.Tests.csproj | 2 +- .../Pages/Visits/Create.cshtml.cs | 20 ------------------- src/UDS.Net.Forms/UDS.Net.Forms.csproj | 4 ++-- .../UDS.Net.Services.Test.csproj | 2 +- src/UDS.Net.Services/UDS.Net.Services.csproj | 4 ++-- .../UDS.Net.Web.MVC.Services.csproj | 4 ++-- src/UDS.Net.Web.MVC/UDS.Net.Web.MVC.csproj | 2 +- src/UDS.Net.sln | 2 +- 8 files changed, 10 insertions(+), 30 deletions(-) diff --git a/src/UDS.Net.Forms.Tests/UDS.Net.Forms.Tests.csproj b/src/UDS.Net.Forms.Tests/UDS.Net.Forms.Tests.csproj index 1d4d9412..48dab9e2 100644 --- a/src/UDS.Net.Forms.Tests/UDS.Net.Forms.Tests.csproj +++ b/src/UDS.Net.Forms.Tests/UDS.Net.Forms.Tests.csproj @@ -5,7 +5,7 @@ enable enable false - 4.1.3-preview.4 + 4.1.3-preview.5 diff --git a/src/UDS.Net.Forms/Pages/Visits/Create.cshtml.cs b/src/UDS.Net.Forms/Pages/Visits/Create.cshtml.cs index a3e1ebd5..1372045c 100644 --- a/src/UDS.Net.Forms/Pages/Visits/Create.cshtml.cs +++ b/src/UDS.Net.Forms/Pages/Visits/Create.cshtml.cs @@ -18,8 +18,6 @@ public class CreateModel : PageModel protected readonly IParticipationService _participationService; protected readonly IVisitService _visitService; - public SelectList ParticipationsSelectList { get; private set; } - [BindProperty] public VisitModel? Visit { get; set; } @@ -46,27 +44,11 @@ private void PopulateVisitKindOptions(int udsv4VisitCount) } } - private async Task PopulateParticipationsDropDownList(int? selectedParticipationId) - { - Participation selectedParticipation = null; - var participations = await _participationService.List(""); - - if (selectedParticipationId.HasValue) - selectedParticipation = participations.FirstOrDefault(p => p.Id == selectedParticipationId); - - ParticipationsSelectList = new SelectList(participations, - nameof(Participation.Id), - nameof(Participation.LegacyId), - selectedParticipation.Id); - } - public async Task OnGetAsync(int? participationId) { if (!participationId.HasValue) return NotFound(); - await PopulateParticipationsDropDownList(participationId); - Participation = await _participationService.GetById(User.Identity.Name, participationId.Value); var shortenedInitials = "UNK"; @@ -97,8 +79,6 @@ public async Task OnPostAsync(int participationId) { if (!ModelState.IsValid) { - await PopulateParticipationsDropDownList(participationId); - Participation = await _participationService.GetById(User.Identity.Name, participationId); PopulateVisitKindOptions(Visit.VISITNUM); diff --git a/src/UDS.Net.Forms/UDS.Net.Forms.csproj b/src/UDS.Net.Forms/UDS.Net.Forms.csproj index ef3255fa..9a4a8a94 100644 --- a/src/UDS.Net.Forms/UDS.Net.Forms.csproj +++ b/src/UDS.Net.Forms/UDS.Net.Forms.csproj @@ -6,13 +6,13 @@ enable true UDS.Net.Forms - 4.1.3-preview.4 + 4.1.3-preview.5 Sanders-Brown Center on Aging UDS Forms razor class library UK-SBCoA Razor class library for rendering UDS forms https://github.com/UK-SBCoA/uniform-data-set-dotnet-web - 4.1.3-preview.4 + 4.1.3-preview.5 diff --git a/src/UDS.Net.Services.Test/UDS.Net.Services.Test.csproj b/src/UDS.Net.Services.Test/UDS.Net.Services.Test.csproj index 098c02b5..b606031f 100644 --- a/src/UDS.Net.Services.Test/UDS.Net.Services.Test.csproj +++ b/src/UDS.Net.Services.Test/UDS.Net.Services.Test.csproj @@ -7,7 +7,7 @@ false true - 4.1.3-preview.4 + 4.1.3-preview.5 diff --git a/src/UDS.Net.Services/UDS.Net.Services.csproj b/src/UDS.Net.Services/UDS.Net.Services.csproj index ebc5a8f8..973be314 100644 --- a/src/UDS.Net.Services/UDS.Net.Services.csproj +++ b/src/UDS.Net.Services/UDS.Net.Services.csproj @@ -4,13 +4,13 @@ netstandard2.1 Library UDS.Net.Services - 4.1.3-preview.4 + 4.1.3-preview.5 Sanders-Brown Center on Aging Service contracts for implmenting your own back-end with MVC web app UK-SBCoA Service contracts required by MVC web app https://github.com/UK-SBCoA/uniform-data-set-dotnet-web - 4.1.3-preview.4 + 4.1.3-preview.5 diff --git a/src/UDS.Net.Web.MVC.Services/UDS.Net.Web.MVC.Services.csproj b/src/UDS.Net.Web.MVC.Services/UDS.Net.Web.MVC.Services.csproj index f1424785..26e7e97d 100644 --- a/src/UDS.Net.Web.MVC.Services/UDS.Net.Web.MVC.Services.csproj +++ b/src/UDS.Net.Web.MVC.Services/UDS.Net.Web.MVC.Services.csproj @@ -4,13 +4,13 @@ netstandard2.1 Library UDS.Net.MVC.Services - 4.1.3-preview.4 + 4.1.3-preview.5 Sanders-Brown Center on Aging Implemented service layer for using MVC front-end with API back-end UK-SBCoA Implemented service contract https://github.com/UK-SBCoA/uniform-data-set-dotnet-web - 4.1.3-preview.4 + 4.1.3-preview.5 diff --git a/src/UDS.Net.Web.MVC/UDS.Net.Web.MVC.csproj b/src/UDS.Net.Web.MVC/UDS.Net.Web.MVC.csproj index ee08ca3d..97599fde 100644 --- a/src/UDS.Net.Web.MVC/UDS.Net.Web.MVC.csproj +++ b/src/UDS.Net.Web.MVC/UDS.Net.Web.MVC.csproj @@ -6,7 +6,7 @@ enable aspnet-UDS.Net.Web.MVC-F92C0881-61B6-4292-8635-0004DE84CFE6 ../docker-compose.dcproj - 4.1.3-preview.4 + 4.1.3-preview.5 diff --git a/src/UDS.Net.sln b/src/UDS.Net.sln index 1e9bec08..5d02701f 100644 --- a/src/UDS.Net.sln +++ b/src/UDS.Net.sln @@ -59,6 +59,6 @@ Global SolutionGuid = {3268D734-1592-4E39-88A2-3A53468CC430} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution - version = 4.1.3-preview.4 + version = 4.1.3-preview.5 EndGlobalSection EndGlobal