From 06acefbaecd218d68bbc0460a6308692f0cde292 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Mon, 2 Aug 2021 16:20:07 -0400 Subject: [PATCH] Add posting preview to right side of screen when posting!=null --- Pages/Index.cshtml | 22 ++++++++++++++++++++-- Pages/Index.cshtml.cs | 3 ++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Pages/Index.cshtml b/Pages/Index.cshtml index 7ac8b38..c0182be 100644 --- a/Pages/Index.cshtml +++ b/Pages/Index.cshtml @@ -5,7 +5,7 @@ }
-
+
Start Here
@@ -36,7 +36,7 @@
-
+
Preview
@@ -53,4 +53,22 @@
+ @if (Model.posting != null) + { +
+
+
+
Posting Info
+
+
+

Title: @Model.posting.Title

+

Grade @Model.posting.SalaryGrade

+

Agency: @Model.posting.Agency

+

Union: @Model.posting.BargainingUnit

+

Contact Name: @Model.posting.ContactName

+

Contact Email: @Model.posting.ContactEmailAddress

+
+
+
+ }
\ No newline at end of file diff --git a/Pages/Index.cshtml.cs b/Pages/Index.cshtml.cs index cb4ce7f..c756b07 100644 --- a/Pages/Index.cshtml.cs +++ b/Pages/Index.cshtml.cs @@ -16,6 +16,7 @@ namespace StateJobsNYSubmit.Pages private PrivateData p = new PrivateData(); public UserData userData; public string Posting_ID {get; set;} + public Posting posting = null; public IndexModel(ILogger logger) { _logger = logger; @@ -48,7 +49,7 @@ namespace StateJobsNYSubmit.Pages string vacancyID = Request.Form["posting_id"]; if (vacancyID != null && !vacancyID.Trim().Equals("")) { Console.WriteLine($"Value of not null or empty vacancy ID: {vacancyID}"); - Posting p = new Posting(vacancyID); + posting = new Posting(vacancyID); } else { Console.WriteLine($"Unable to get Posting ID from form."); }