Add cancel

This commit is contained in:
2017-01-26 08:36:54 -05:00
parent 295b40bed8
commit 4338b4fee5
30 changed files with 333 additions and 62 deletions
+7 -6
View File
@@ -1,6 +1,7 @@
using System;
using System.Linq;
using System.Web.Mvc;
using System.Web.Routing;
using log4net;
using LeafWeb.Core.DAL;
using Umbraco.Web.Mvc;
@@ -21,9 +22,7 @@ namespace LeafWeb.WebCms.Controllers
{
if (filterContext?.Exception != null)
{
var controller = filterContext.RouteData.Values["controller"].ToString();
var action = filterContext.RouteData.Values["action"].ToString();
var loggerName = $"LeafWeb.WebCms.Controllers.{controller}Controller.{action}";
var loggerName = LoggerName(filterContext.RouteData);
LogManager.GetLogger(loggerName).Error(filterContext.Exception);
}
@@ -31,12 +30,14 @@ namespace LeafWeb.WebCms.Controllers
base.OnException(filterContext);
}
protected bool IsHttpParamActionMatch()
protected string LoggerName(RouteData routeData)
{
return ControllerContext.RouteData.Values["action"].ToString()
.Equals("Action", StringComparison.InvariantCultureIgnoreCase);
var controller = RouteData.Values["controller"].ToString();
var action = RouteData.Values["action"].ToString();
return $"LeafWeb.WebCms.Controllers.{controller}Controller.{action}";
}
// Status messages to pages
protected enum StatusType
{
Info,