From b9fe93d83bcd3dd39ac8715586d666e0391778d5 Mon Sep 17 00:00:00 2001 From: dathlin Date: Mon, 7 Aug 2017 21:20:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E8=B4=A6=E6=88=B7=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E8=AE=BE=E8=AE=A1=EF=BC=8C=E7=AD=89=E5=BE=85=E8=B0=83?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/AccountController.cs | 13 +++ .../Controllers/HomeController.cs | 10 --- .../Views/Account/RegisterAccount.cshtml | 86 +++++++++++++++++++ .../Views/Home/RegisterAccount.cshtml | 55 ------------ .../Views/Shared/_Layout.cshtml | 2 +- 软件系统浏览器模版/软件系统浏览器模版.csproj | 2 +- 6 files changed, 101 insertions(+), 67 deletions(-) create mode 100644 软件系统浏览器模版/Views/Account/RegisterAccount.cshtml delete mode 100644 软件系统浏览器模版/Views/Home/RegisterAccount.cshtml diff --git a/软件系统浏览器模版/Controllers/AccountController.cs b/软件系统浏览器模版/Controllers/AccountController.cs index 2c16fd8..97508ff 100644 --- a/软件系统浏览器模版/Controllers/AccountController.cs +++ b/软件系统浏览器模版/Controllers/AccountController.cs @@ -252,5 +252,18 @@ namespace 软件系统浏览器模版.Controllers } } + + + //GET + /// + /// 注册新的账户界面 + /// + [HttpGet] + [AuthorizeAdmin] + public ActionResult RegisterAccount() + { + return View(); + } + } } \ No newline at end of file diff --git a/软件系统浏览器模版/Controllers/HomeController.cs b/软件系统浏览器模版/Controllers/HomeController.cs index 35ac8e4..5df8f46 100644 --- a/软件系统浏览器模版/Controllers/HomeController.cs +++ b/软件系统浏览器模版/Controllers/HomeController.cs @@ -236,16 +236,6 @@ namespace 软件系统浏览器模版.Controllers - //GET - /// - /// 注册新的账户界面 - /// - [HttpGet] - [AuthorizeAdmin] - public ActionResult RegisterAccount() - { - return View(); - } } } \ No newline at end of file diff --git a/软件系统浏览器模版/Views/Account/RegisterAccount.cshtml b/软件系统浏览器模版/Views/Account/RegisterAccount.cshtml new file mode 100644 index 0000000..8119fc0 --- /dev/null +++ b/软件系统浏览器模版/Views/Account/RegisterAccount.cshtml @@ -0,0 +1,86 @@ + +@{ + ViewBag.Title = "注册新的账户"; + Layout = "~/Views/Shared/_Layout.cshtml"; +} + + + +@section scripts +{ + +} + +
+ +
+ @{ string updateId = Guid.NewGuid().ToString();} + @using (Ajax.BeginForm("RegisterAccount", null, new AjaxOptions { HttpMethod = "Post", UpdateTargetId = updateId, InsertionMode = InsertionMode.Replace }, + new { @class = "form-horizontal" })) + { +
+ @Html.AntiForgeryToken() + 注册新的账户如果账户名已存在,会注册失败 + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + +
+
+ +
+
+
+ } +
+
+ +
diff --git a/软件系统浏览器模版/Views/Home/RegisterAccount.cshtml b/软件系统浏览器模版/Views/Home/RegisterAccount.cshtml deleted file mode 100644 index 2a0c64f..0000000 --- a/软件系统浏览器模版/Views/Home/RegisterAccount.cshtml +++ /dev/null @@ -1,55 +0,0 @@ - -@{ - ViewBag.Title = "注册新的账户"; - Layout = "~/Views/Shared/_Layout.cshtml"; -} - - - -@section scripts -{ - -} - -
- -
- @{ string updateId = Guid.NewGuid().ToString();} - @using (Ajax.BeginForm("RegisterAccount", null, new AjaxOptions { HttpMethod = "Post", UpdateTargetId = updateId, InsertionMode = InsertionMode.Replace }, - new { @class = "form-horizontal" })) - { -
- @Html.AntiForgeryToken() - 注册新的账户如果账户名已存在,会注册失败 - -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
-
- -
-
-
- } -
-
- -
diff --git a/软件系统浏览器模版/Views/Shared/_Layout.cshtml b/软件系统浏览器模版/Views/Shared/_Layout.cshtml index cd42353..b6a267d 100644 --- a/软件系统浏览器模版/Views/Shared/_Layout.cshtml +++ b/软件系统浏览器模版/Views/Shared/_Layout.cshtml @@ -28,7 +28,7 @@