升级工程:Bootstrap.Admin工程升级到.net core 2.1

This commit is contained in:
Argo Zhang 2018-06-15 16:14:49 +08:00 committed by Argo-MacBookPro
parent 56019a0bb8
commit 0c23271a87
19 changed files with 31 additions and 30 deletions

View File

@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Bootstrap.Security.Mvc" Version="1.0.0" />
<PackageReference Include="Longbow.Web" Version="1.0.1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.8" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.0" />
</ItemGroup>
<ItemGroup>

View File

@ -17,7 +17,6 @@ using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Specialized;
using System.IO;
namespace Bootstrap.Admin

View File

@ -16,6 +16,6 @@
}
<div class="container">
<form id="login" method="post">
@Html.Partial("SignIn")
@await Html.PartialAsync("SignIn")
</form>
</div>

View File

@ -16,7 +16,7 @@
}
<div class="container">
<form id="login" class="form-signin" method="post">
@Html.Partial("SignIn")
@await Html.PartialAsync("SignIn")
</form>
</div>

View File

@ -14,5 +14,5 @@
</style>
}
<section class="container-fluid">
@Html.Partial("_Mobile")
@await Html.PartialAsync("_Mobile")
</section>

View File

@ -43,7 +43,7 @@
<div class="toolbar btn-group dropdown">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<div class="dropdown-menu">
@Html.Partial("_ButtonBarGroup")
@await Html.PartialAsync("_ButtonBarGroup")
</div>
</div>
}

View File

@ -9,4 +9,4 @@
@section javascript {
<script src="~/js/icon.js"></script>
}
@Html.Partial("IconView")
@await Html.PartialAsync("IconView")

View File

@ -33,7 +33,7 @@
<div class="toolbar btn-group dropdown">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<div class="dropdown-menu">
@Html.Partial("_ButtonBarGroup")
@await Html.PartialAsync("_ButtonBarGroup")
<a id="tb_assignRole" href="#" title="指派角色"><i class="fa fa-sitemap"></i></a>
<a id="tb_assignUser" href="#" title="指派用户"><i class="fa fa-user"></i></a>
</div>
@ -61,6 +61,6 @@
</div>
}
@section customModal {
@Html.Partial("RoleConfig")
@Html.Partial("UserConfig")
@await Html.PartialAsync("RoleConfig")
@await Html.PartialAsync("UserConfig")
}

View File

@ -65,7 +65,7 @@
<div class="toolbar btn-group dropdown">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<div class="dropdown-menu">
@Html.Partial("_ButtonBarGroup")
@await Html.PartialAsync("_ButtonBarGroup")
<a id="tb_assignRole" href="#" title="指派角色"><i class="fa fa-sitemap"></i></a>
</div>
</div>
@ -185,7 +185,7 @@
</div>
}
@section customModal {
@Html.Partial("RoleConfig")
@await Html.PartialAsync("RoleConfig")
<div id="dialogIcon" class="modal-content icon-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
@ -200,5 +200,5 @@
<button type="button" class="btn btn-primary" id="btnSubmitIcon">保存</button>
</div>
</div>
@Html.Partial("NavigatorConfig")
@await Html.PartialAsync("NavigatorConfig")
}

View File

@ -15,4 +15,4 @@ NavigatorBarModel
}
</style>
}
@Html.Partial("_Mobile")
@await Html.PartialAsync("_Mobile")

View File

@ -42,7 +42,7 @@
<div class="toolbar btn-group dropdown">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<div class="dropdown-menu">
@Html.Partial("_ButtonBarGroup")
@await Html.PartialAsync("_ButtonBarGroup")
<a id="tb_assignUser" href="#" title="指派用户"><i class="fa fa-user"></i></a>
<a id="tb_assignGroup" href="#" title="指派部门"><i class="fa fa-bank"></i></a>
<a id="tb_assignMenu" href="#" title="指派菜单"><i class="fa fa-dashboard"></i></a>
@ -71,7 +71,7 @@
</div>
}
@section customModal{
@Html.Partial("UserConfig")
@Html.Partial("GroupConfig")
@Html.Partial("NavigatorConfig")
@await Html.PartialAsync("UserConfig")
@await Html.PartialAsync("GroupConfig")
@await Html.PartialAsync("NavigatorConfig")
}

View File

@ -33,7 +33,7 @@
<div class="toolbar btn-group dropdown">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<div class="dropdown-menu">
@Html.Partial("_ButtonBarGroup")
@await Html.PartialAsync("_ButtonBarGroup")
<a id="tb_assignRole" href="#" title="指派角色"><i class="fa fa-sitemap"></i></a>
<a id="tb_assignGroup" href="#" title="指派部门"><i class="fa fa-bank"></i></a>
</div>
@ -69,6 +69,6 @@
</div>
}
@section customModal {
@Html.Partial("RoleConfig")
@Html.Partial("GroupConfig")
@await Html.PartialAsync("RoleConfig")
@await Html.PartialAsync("GroupConfig")
}

View File

@ -1,5 +1,5 @@
<i id="fa-top" class="fa-target"></i>
@Html.Partial("AwesomeIcon")
@await Html.PartialAsync("AwesomeIcon")
<div class="fa-nav">
<h2>图标分类</h2>
<ul class="nav navbar">

View File

@ -5,7 +5,7 @@
<ul class="sidebar-menu" id="nav-accordion">
@foreach (var menu in Model.Navigations)
{
@Html.Partial("SubMenu", menu)
@await Html.PartialAsync("SubMenu", menu)
}
</ul>
<!-- sidebar menu end-->

View File

@ -3,6 +3,6 @@
<a href="@Url.Content(Model.Url)" class="@Model.Active" target="@Model.Target"><i class="@Model.Icon"></i>@Model.Name</a>
@if (Model.Menus.Count() > 0)
{
@Html.Partial("SubNavigation", Model.Menus)
@await Html.PartialAsync("SubNavigation", Model.Menus)
}
</li>

View File

@ -2,6 +2,6 @@
<ul class="sub" style="display: none;">
@foreach (var menu in Model)
{
@Html.Partial("SubMenu", menu)
@await Html.PartialAsync("SubMenu", menu)
}
</ul>

View File

@ -19,7 +19,7 @@
<script src="~/js/framework.js"></script>
@RenderSection("Javascript", false)
}
@Html.Partial("navigator")
@await Html.PartialAsync("navigator")
<section id="main-content" class="main-content">
@RenderBody()
</section>

View File

@ -16,7 +16,7 @@
<script src="~/js/Longbow.Common.js"></script>
@RenderSection("Javascript", false)
}
@Html.Partial("Header")
@await Html.PartialAsync("Header")
@RenderBody()
@Html.Partial("Footer")
@await Html.PartialAsync("Footer")
@RenderSection("modal", false)

View File

@ -2,11 +2,13 @@
using Longbow.Data;
using Longbow.Logging;
using Longbow.Web.WebSockets;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Data;
using System.Data.Common;
using System.Text;
namespace Bootstrap.DataAccess
{
@ -41,7 +43,7 @@ namespace Bootstrap.DataAccess
cmd.Parameters.Add(DBAccessManager.SqlDBAccess.CreateParameter("@StackTrace", DBAccessFactory.ToDBValue(ex.StackTrace)));
DBAccessManager.SqlDBAccess.ExecuteNonQuery(cmd);
CacheManager.Clear(RetrieveExceptionsDataKey);
WebSocketPushManager.SendAsync(new List<object> { new { Category = "Notification", ex.Message } });
WebSocketServerManager.SendAsync(new ArraySegment<byte>(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(new List<object> { new { Category = "Notification", ex.Message } }))));
}
}
catch (Exception e)