From 6a0633e5a83dff50a0c99cdbda37462fb77a68cf Mon Sep 17 00:00:00 2001 From: Jake Visser Date: Wed, 5 Jul 2017 17:20:07 -0700 Subject: [PATCH] add refresh=1 option --- qcbadge/Controllers/HomeController.cs | 3 ++- qcbadge/Views/Shared/_Layout.cshtml | 14 +++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/qcbadge/Controllers/HomeController.cs b/qcbadge/Controllers/HomeController.cs index 481f86d..097ad38 100644 --- a/qcbadge/Controllers/HomeController.cs +++ b/qcbadge/Controllers/HomeController.cs @@ -8,9 +8,10 @@ namespace qcbadge.Controllers { public class HomeController : Controller { - public IActionResult Index(string s, string id) + public IActionResult Index(string s, string id, int refresh) { Helpers.Sql sql = new Helpers.Sql(); + ViewData["refresh"] = refresh; if ((String.Compare(Startup.scode, s, true) == 0)) { diff --git a/qcbadge/Views/Shared/_Layout.cshtml b/qcbadge/Views/Shared/_Layout.cshtml index f3a820e..677283c 100644 --- a/qcbadge/Views/Shared/_Layout.cshtml +++ b/qcbadge/Views/Shared/_Layout.cshtml @@ -1,10 +1,22 @@ - +@{ + + bool refresh = Convert.ToBoolean(ViewData["refresh"]); + +} + QC Badge - @ViewData["Title"] + @if (refresh) + { + + + + } +