From f55faaa7d3876ab8d46f0cf06fe9d73bcfdeaa43 Mon Sep 17 00:00:00 2001 From: "liuchun_0206@163.com" Date: Mon, 31 Oct 2016 16:57:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86init.sql=E5=92=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=86RolesController=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84using?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/RolesController.cs | 9 ++++----- DatabaseScripts/Init.sql | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 DatabaseScripts/Init.sql diff --git a/Bootstrap.Admin/Controllers/RolesController.cs b/Bootstrap.Admin/Controllers/RolesController.cs index 260e7aae..8440fe36 100644 --- a/Bootstrap.Admin/Controllers/RolesController.cs +++ b/Bootstrap.Admin/Controllers/RolesController.cs @@ -1,10 +1,9 @@ -锘縰sing Bootstrap.Admin.Models; +锘縰sing System.Collections.Generic; +using System.Linq; +using System.Web.Http; +using Bootstrap.Admin.Models; using Bootstrap.DataAccess; using Newtonsoft.Json.Linq; -using System.Collections.Generic; -using System.Web.Http; -using Newtonsoft.Json.Linq; -using System.Linq; namespace Bootstrap.Admin.Controllers diff --git a/DatabaseScripts/Init.sql b/DatabaseScripts/Init.sql new file mode 100644 index 00000000..984807c2 --- /dev/null +++ b/DatabaseScripts/Init.sql @@ -0,0 +1,20 @@ +USE [BootstrapAdmin] +GO +/* added by argo the default password is 123789 */ +insert into Users (UserName, Password, PassSalt, DisplayName) values ('Admin', 'Es7WVgNsJuELwWK8daCqufUBknCsSC0IYDphQZAiGOo=', 'W5vpBEOYRGHkQXatN0t+ECM/U8cHDuEgrq56+zZBk4J481xH', 'Administrator') +GO + +SET IDENTITY_INSERT [dbo].[Dicts] ON +INSERT [dbo].[Dicts] ([ID], [Category], [Name], [Code]) VALUES (1, N'菜单', N'系统菜单', '0') +INSERT [dbo].[Dicts] ([ID], [Category], [Name], [Code]) VALUES (2, N'菜单', N'外部菜单', '1') +SET IDENTITY_INSERT [dbo].[Dicts] OFF + +SET IDENTITY_INSERT [dbo].[Navigations] ON +INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (1, 0, N'菜单管理', 10, N'fa fa-dashboard', N'~/Admin/Menus', N'0') +INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (2, 0, N'用户管理', 20, N'fa fa-user', N'~/Admin/Users', N'0') +INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (3, 0, N'角色管理', 30, N'fa fa-sitemap', N'~/Admin/Roles', N'0') +INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (4, 0, N'部门管理', 40, N'fa fa-home', N'~/Admin/Groups', N'0') +INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (5, 0, N'字典表维护', 50, N'fa fa-book', N'~/Admin/Dicts', N'0') +INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (6, 0, N'个性化维护', 60, N'fa fa-pencil', N'~/Admin/Profiles', N'0') +INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (7, 0, N'系统日志', 70, N'fa fa-gears', N'~/Admin/Logs', N'0') +SET IDENTITY_INSERT [dbo].[Navigations] OFF