From 42c1c0db294222625b3cbcb1ed43c81e1cf0e35c Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Thu, 6 Apr 2017 18:14:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=9F=E8=83=BD=EF=BC=9A?= =?UTF-8?q?=E6=96=B0=E7=94=A8=E6=88=B7=E6=B3=A8=E5=86=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=89=8D=E5=8F=B0=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Scripts/common-scripts.js | 4 ++++ Bootstrap.DataAccess/UserHelper.cs | 1 + 2 files changed, 5 insertions(+) diff --git a/Bootstrap.Admin/Scripts/common-scripts.js b/Bootstrap.Admin/Scripts/common-scripts.js index 0e7bfaa2..73dc4c1c 100644 --- a/Bootstrap.Admin/Scripts/common-scripts.js +++ b/Bootstrap.Admin/Scripts/common-scripts.js @@ -192,6 +192,10 @@ $(function () { toastr.error(data[1], "应用程序出现错误"); $.reloadWidget(); break; + case "Users": + toastr.info(data[1], "新用户注册"); + $.reloadWidget(); + break; } }; ws.onclose = function () { diff --git a/Bootstrap.DataAccess/UserHelper.cs b/Bootstrap.DataAccess/UserHelper.cs index faed5f4d..42a6fc19 100644 --- a/Bootstrap.DataAccess/UserHelper.cs +++ b/Bootstrap.DataAccess/UserHelper.cs @@ -145,6 +145,7 @@ namespace Bootstrap.DataAccess } CacheCleanUtility.ClearCache(userIds: p.Id == 0 ? string.Empty : p.Id.ToString()); ret = true; + if (p.UserStatus == 1) NotificationHelper.PushMessage(new MessageBody() { Category = "Users", Message = string.Format("{0}-{1}", p.UserName, p.Description) }); } catch (DbException ex) {