|
|
|
@ -1,9 +1,5 @@
@@ -1,9 +1,5 @@
|
|
|
|
|
using System; |
|
|
|
|
using System.ComponentModel.DataAnnotations; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.Linq; |
|
|
|
|
using System.Threading.Tasks; |
|
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages; |
|
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
|
using Newtonsoft.Json; |
|
|
|
@ -38,9 +34,16 @@ namespace StateJobsNYSubmit.Pages
@@ -38,9 +34,16 @@ namespace StateJobsNYSubmit.Pages
|
|
|
|
|
Response.Cookies.Append("PrivateData", p.EncryptString(JsonConvert.SerializeObject(userData))); |
|
|
|
|
Console.WriteLine($"Value of counter: {userData.visitCounter}"); |
|
|
|
|
} |
|
|
|
|
public void OnGet() |
|
|
|
|
public void OnGet(string vacancyID) |
|
|
|
|
{ |
|
|
|
|
GetUserData(); |
|
|
|
|
if (vacancyID != null && !vacancyID.Trim().Equals("")) { |
|
|
|
|
posting = new Posting(vacancyID); |
|
|
|
|
this.Posting_ID = vacancyID; |
|
|
|
|
} else { |
|
|
|
|
Console.WriteLine($"Unable to get Posting ID from Get Request URL."); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
public void OnPost() |
|
|
|
@ -48,7 +51,6 @@ namespace StateJobsNYSubmit.Pages
@@ -48,7 +51,6 @@ namespace StateJobsNYSubmit.Pages
|
|
|
|
|
GetUserData(); |
|
|
|
|
string vacancyID = Request.Form["posting_id"]; |
|
|
|
|
if (vacancyID != null && !vacancyID.Trim().Equals("")) { |
|
|
|
|
Console.WriteLine($"Value of not null or empty vacancy ID: {vacancyID}"); |
|
|
|
|
posting = new Posting(vacancyID); |
|
|
|
|
} else { |
|
|
|
|
Console.WriteLine($"Unable to get Posting ID from form."); |
|
|
|
|