diff --git a/BO/Controllers/HomeController.cs b/BO/Controllers/HomeController.cs index 38196a5..57c8cb0 100644 --- a/BO/Controllers/HomeController.cs +++ b/BO/Controllers/HomeController.cs @@ -21,6 +21,17 @@ namespace NP.BO.Controllers { return RedirectToAction(nameof(userController.users), "user"); } + else if (SUserInfo.IsSubAdmin) + { + foreach (var m in GetMENUS.Where(w => w.usertype == base.SUserInfo.UserType && w.menuurl != "/" && w.menulevel == 1 && w.ishid < 1).ToList()) + { + var ms = GetMENUS.Where(w => w.usertype == base.SUserInfo.UserType && w.pmenuno == m.menuno && w.ishid < 1).FirstOrDefault(); + if (ms != null) + { + return Redirect(ms.menuurl); + } + } + } vm.Data = Dao.Get("common.home", SUserInfo.UserNo).First(); vm.CMs = Dao.Get("cm.cms", new System.Collections.Hashtable() { { "ismaster", 0 },{ "isuse", 1 },{"cname",vm.stringval },{ "iscurrent",1 },{ "orderby", "a.setime desc,t.tyear desc,t.tseq desc,a.cname,a.classno" } }); return View(vm); diff --git a/BO/Views/Shared/_Layout.cshtml b/BO/Views/Shared/_Layout.cshtml index 272f1a5..9b8147c 100644 --- a/BO/Views/Shared/_Layout.cshtml +++ b/BO/Views/Shared/_Layout.cshtml @@ -100,7 +100,7 @@