From 9234969e5c9f63fc9b374d395e1567e27338a691 Mon Sep 17 00:00:00 2001 From: lch Date: Mon, 3 May 2021 01:08:52 +0000 Subject: [PATCH] =?UTF-8?q?=EC=9E=85=EB=A0=A5=EB=90=9C=20=EC=86=8C?= =?UTF-8?q?=EC=86=8D=EC=A0=95=EB=B3=B4=EA=B0=80=20=EC=97=86=EC=9D=84=20?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=20=EB=A9=94=EB=89=B4=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=A0=9C=EC=99=B8=EC=B2=98=EB=A6=AC=20=EB=A7=88=EC=9D=B4?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=A0=95=EB=B3=B4=EC=88=98?= =?UTF-8?q?=EC=A0=95=EC=8B=9C=20=EC=86=8C=EC=86=8D=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=EC=8B=9C=20AuthCookie(true);=20=EA=B0=B1=EC=8B=A0=ED=98=B8?= =?UTF-8?q?=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Base/Controller/FCommonMy.cs | 12 +++++++++++- FO/Controllers/MyController.cs | 15 +++++++++++---- FO/Views/Shared/_LayoutMy.cshtml | 11 ++++++++++- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Base/Controller/FCommonMy.cs b/Base/Controller/FCommonMy.cs index 8e789ab..8d77df2 100644 --- a/Base/Controller/FCommonMy.cs +++ b/Base/Controller/FCommonMy.cs @@ -120,7 +120,17 @@ namespace NP.Base.Controllers } LogSet(new ActLog() { logtype = 30, logtarget = 21, logdata = u.username, userno = u.userno, uno = SUserInfo.UserNo, uip = GetUserIP() }); u.savefrontbuy = 1; - return JsonOK(Dao.Save("users.up", u)); + var result = Dao.Save("users.up", u); + if (result > 0) + { + var asno = u.asno ?? 0; + if (SUserInfo.ASNo != asno) + { + SUserInfo.ASNo = asno; + AuthCookie(true); + } + } + return JsonOK(result); } [HttpPost] public JsonResult UserExit(String exitreason) diff --git a/FO/Controllers/MyController.cs b/FO/Controllers/MyController.cs index f7c1104..e12c0a0 100644 --- a/FO/Controllers/MyController.cs +++ b/FO/Controllers/MyController.cs @@ -418,12 +418,19 @@ namespace NP.FO.Controllers public ActionResult MyAssInfo(NP.Model.VMMy vm) { vm.Assign = Dao.Get("users.users.assign", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault(); - vm.FileList = new List() { }; - if(vm.Assign.fgnobno != null) + if (vm.Assign != null) { - vm.FileList = GetFiles(vm.Assign.fgnobno.Value); + vm.FileList = new List() { }; + if (vm.Assign.fgnobno != null) + { + vm.FileList = GetFiles(vm.Assign.fgnobno.Value); + } + return View(vm); + } + else + { + return Redirect("/"); } - return View(vm); } public ActionResult Document(VMMy vm) diff --git a/FO/Views/Shared/_LayoutMy.cshtml b/FO/Views/Shared/_LayoutMy.cshtml index 6af59f0..7811d85 100644 --- a/FO/Views/Shared/_LayoutMy.cshtml +++ b/FO/Views/Shared/_LayoutMy.cshtml @@ -39,7 +39,16 @@ @*
  • 마이페이지
  • *@ @foreach (var m in mymenus.Where(w => w.refcode != "myassign")) { -
  • @m.pagename
  • + if (m.pageurl.Contains("/My/MyAssInfo")) + { + if (ViewBag.SSASNo != null && ViewBag.SSASNo > 0) { +
  • @m.pagename
  • + } + } + else + { +
  • @m.pagename
  • + } }