Error-Handling verbessert. Alle C#-Exceptions werden geloggt mit Message und Stacktrace.
Altes Logo gelöscht mit beyondSoft.
This commit is contained in:
@@ -7,6 +7,21 @@ namespace BeWoPlanerMobil
|
|||||||
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
|
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
|
||||||
{
|
{
|
||||||
filters.Add(new HandleErrorAttribute());
|
filters.Add(new HandleErrorAttribute());
|
||||||
|
filters.Add(new BeWoExceptionFilter());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class BeWoExceptionFilter : IExceptionFilter
|
||||||
|
{
|
||||||
|
protected static readonly log4net.ILog Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
public void OnException(ExceptionContext filterContext)
|
||||||
|
{
|
||||||
|
var exception = filterContext.Exception;
|
||||||
|
|
||||||
|
Log.Error($"{exception.Message}: {exception.StackTrace}");
|
||||||
|
filterContext.Result = new ViewResult { ViewName = "Error" };
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -409,7 +409,6 @@
|
|||||||
<Content Include="Content\images\bars-black.svg" />
|
<Content Include="Content\images\bars-black.svg" />
|
||||||
<Content Include="Content\images\BeWoPlaner.ico" />
|
<Content Include="Content\images\BeWoPlaner.ico" />
|
||||||
<Content Include="Content\images\bewoplaner_by_ownsoft_logo_mok.png" />
|
<Content Include="Content\images\bewoplaner_by_ownsoft_logo_mok.png" />
|
||||||
<Content Include="Content\images\bewoplaner_logo_big.png" />
|
|
||||||
<Content Include="Content\images\calendar-bs-orange.svg" />
|
<Content Include="Content\images\calendar-bs-orange.svg" />
|
||||||
<Content Include="Content\images\interval-finder-icon-v2.svg" />
|
<Content Include="Content\images\interval-finder-icon-v2.svg" />
|
||||||
<Content Include="Content\images\interval-finder-icon.svg" />
|
<Content Include="Content\images\interval-finder-icon.svg" />
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.7 KiB |
@@ -8,7 +8,6 @@ using BeWo.Service.DCEntityMapper;
|
|||||||
using BeWo.Service.ServiceContracts;
|
using BeWo.Service.ServiceContracts;
|
||||||
using BeWoPlanerMobil.Models;
|
using BeWoPlanerMobil.Models;
|
||||||
using BeWoPlanerMobil.Service;
|
using BeWoPlanerMobil.Service;
|
||||||
using BeWoPlanerMobil.Util;
|
|
||||||
using BS.Shared;
|
using BS.Shared;
|
||||||
using BS.Shared.Core;
|
using BS.Shared.Core;
|
||||||
using BS.Shared.DataContracts;
|
using BS.Shared.DataContracts;
|
||||||
@@ -154,5 +153,14 @@ namespace BeWoPlanerMobil.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
public abstract string SaveCollapsibleStatus(bool isOpen, string identifier);
|
public abstract string SaveCollapsibleStatus(bool isOpen, string identifier);
|
||||||
|
|
||||||
|
public ActionResult Error()
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
ViewBag.ErrorMessage = "[HIER KOMMT DIE FEHLERMELDUNG HIN]";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return View("Error");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace BeWoPlanerMobil.Controllers
|
|||||||
[Authorize]
|
[Authorize]
|
||||||
public ActionResult DevExpressScheduler()
|
public ActionResult DevExpressScheduler()
|
||||||
{
|
{
|
||||||
if(!MobileSessionFacade.IsUserLoggedIn() || Model == null)
|
if(!MobileSessionFacade.IsUserLoggedIn() || Model is null)
|
||||||
{
|
{
|
||||||
return RedirectToActionPermanent("Index", "Login");
|
return RedirectToActionPermanent("Index", "Login");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2935,7 +2935,7 @@ namespace BeWoPlanerMobil.Controllers
|
|||||||
newResult.KannTrotzdemGespeichertWerden = false;
|
newResult.KannTrotzdemGespeichertWerden = false;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case Error:
|
case ServiceRecordValidationResult.Error:
|
||||||
newResult.Message += "Beim Speichern ist ein Fehler aufgetreten.<br /><br />";
|
newResult.Message += "Beim Speichern ist ein Fehler aufgetreten.<br /><br />";
|
||||||
exitLoop = true;
|
exitLoop = true;
|
||||||
newResult.KannTrotzdemGespeichertWerden = false;
|
newResult.KannTrotzdemGespeichertWerden = false;
|
||||||
|
|||||||
@@ -658,7 +658,7 @@ namespace BeWoPlanerMobil.Controllers
|
|||||||
Model.SelectedValues.Remove(parameterOid.Value);
|
Model.SelectedValues.Remove(parameterOid.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case QueryParameterType.DateRange:
|
case QueryParameterType.DateRange:
|
||||||
if(textValue != null && textValue.Length == 21 &&textValue.Contains("_"))
|
if(textValue != null && textValue.Length == 21 &&textValue.Contains("_"))
|
||||||
{
|
{
|
||||||
@@ -673,7 +673,7 @@ namespace BeWoPlanerMobil.Controllers
|
|||||||
{
|
{
|
||||||
Model.SelectedValues.Remove(parameterOid.Value);
|
Model.SelectedValues.Remove(parameterOid.Value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QueryParameterType.Month:
|
case QueryParameterType.Month:
|
||||||
if(!textValue.Contains("_"))
|
if(!textValue.Contains("_"))
|
||||||
{
|
{
|
||||||
@@ -689,7 +689,7 @@ namespace BeWoPlanerMobil.Controllers
|
|||||||
Model.SelectedValues.AddOrUpdate(parameterOid.Value, new SelectedValue(queryParameterType, new DateTime(year, month, 1)));
|
Model.SelectedValues.AddOrUpdate(parameterOid.Value, new SelectedValue(queryParameterType, new DateTime(year, month, 1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case QueryParameterType.ServiceCategory:
|
case QueryParameterType.ServiceCategory:
|
||||||
if(objectOid is null || objectOid.Value.Equals(0))
|
if(objectOid is null || objectOid.Value.Equals(0))
|
||||||
{
|
{
|
||||||
@@ -703,7 +703,7 @@ namespace BeWoPlanerMobil.Controllers
|
|||||||
{
|
{
|
||||||
Model.SelectedValues.AddOrUpdate(parameterOid.Value, new SelectedValue(queryParameterType, selectedServiceCategory));
|
Model.SelectedValues.AddOrUpdate(parameterOid.Value, new SelectedValue(queryParameterType, selectedServiceCategory));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QueryParameterType.SupportConcept:
|
case QueryParameterType.SupportConcept:
|
||||||
var costBearer2SupportConceptRelListObj = Model.CostBearer2SupportConceptRelListObjects.FirstOrDefault(costBearer2SupportConceptRelListObject => costBearer2SupportConceptRelListObject.CostBearer2SupportConceptOid.Equals(objectOid.ToString()));
|
var costBearer2SupportConceptRelListObj = Model.CostBearer2SupportConceptRelListObjects.FirstOrDefault(costBearer2SupportConceptRelListObject => costBearer2SupportConceptRelListObject.CostBearer2SupportConceptOid.Equals(objectOid.ToString()));
|
||||||
|
|
||||||
@@ -719,7 +719,7 @@ namespace BeWoPlanerMobil.Controllers
|
|||||||
{
|
{
|
||||||
Model.SelectedValues.AddOrUpdate(parameterOid.Value, new SelectedValue(queryParameterType, costBearer2SupportConceptRelListObj));
|
Model.SelectedValues.AddOrUpdate(parameterOid.Value, new SelectedValue(queryParameterType, costBearer2SupportConceptRelListObj));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QueryParameterType.Team:
|
case QueryParameterType.Team:
|
||||||
if(objectOid is null || objectOid.Value.Equals(0))
|
if(objectOid is null || objectOid.Value.Equals(0))
|
||||||
{
|
{
|
||||||
@@ -733,7 +733,7 @@ namespace BeWoPlanerMobil.Controllers
|
|||||||
{
|
{
|
||||||
Model.SelectedValues.AddOrUpdate(parameterOid.Value, new SelectedValue(queryParameterType, selectedTeam));
|
Model.SelectedValues.AddOrUpdate(parameterOid.Value, new SelectedValue(queryParameterType, selectedTeam));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QueryParameterType.ValueListEntryType:
|
case QueryParameterType.ValueListEntryType:
|
||||||
if(objectOid is null || objectOid.Value.Equals(0))
|
if(objectOid is null || objectOid.Value.Equals(0))
|
||||||
{
|
{
|
||||||
@@ -747,7 +747,7 @@ namespace BeWoPlanerMobil.Controllers
|
|||||||
{
|
{
|
||||||
Model.SelectedValues.AddOrUpdate(parameterOid.Value, new SelectedValue(queryParameterType, selectedValueListEntry));
|
Model.SelectedValues.AddOrUpdate(parameterOid.Value, new SelectedValue(queryParameterType, selectedValueListEntry));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QueryParameterType.Year:
|
case QueryParameterType.Year:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
@using BeWoPlanerMobil.Views.DevExpressScheduler
|
@using BeWoPlanerMobil.Views.DevExpressScheduler
|
||||||
|
@using BS.Shared.DataContracts
|
||||||
@using DevExpress.XtraScheduler
|
@using DevExpress.XtraScheduler
|
||||||
@model BeWoPlanerMobil.Models.DevExpressSchedulerModel
|
@model BeWoPlanerMobil.Models.DevExpressSchedulerModel
|
||||||
|
|
||||||
@@ -50,8 +51,19 @@
|
|||||||
settings.Storage.Resources.Assign(SchedulerHelper.DefaultResourceStorage);
|
settings.Storage.Resources.Assign(SchedulerHelper.DefaultResourceStorage);
|
||||||
settings.Storage.Appointments.Assign(SchedulerHelper.DefaultAppointmentStorage);
|
settings.Storage.Appointments.Assign(SchedulerHelper.DefaultAppointmentStorage);
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
settings.Storage.Appointments.Assign(SchedulerHelper.DefaultAppointmentStorage);
|
settings.Storage.Appointments.Assign(SchedulerHelper.DefaultAppointmentStorage);
|
||||||
settings.Storage.Resources.Assign(SchedulerHelper.DefaultResourceStorage);
|
settings.Storage.Resources.Assign(SchedulerHelper.DefaultResourceStorage);
|
||||||
|
settings.Storage.Appointments.Mappings.Start = nameof(SchedulerAppointmentDC.StartDate);
|
||||||
|
settings.Storage.Appointments.Mappings.End = nameof(SchedulerAppointmentDC.EndDate);
|
||||||
|
settings.Storage.Appointments.Mappings.Subject = nameof(SchedulerAppointmentDC.Subject);
|
||||||
|
settings.Storage.Appointments.Mappings.AllDay = nameof(SchedulerAppointmentDC.AllDay);
|
||||||
|
settings.Storage.Appointments.Mappings.Description = nameof(SchedulerAppointmentDC.Description);
|
||||||
|
settings.Storage.Appointments.Mappings.Status = nameof(SchedulerAppointmentDC.Status);
|
||||||
|
settings.Storage.Appointments.Mappings.Label = nameof(SchedulerAppointmentDC.LabelKey);
|
||||||
|
|
||||||
settings.Views.DayView.Styles.ScrollAreaHeight = new Unit(500);
|
settings.Views.DayView.Styles.ScrollAreaHeight = new Unit(500);
|
||||||
|
|
||||||
|
|||||||
@@ -627,7 +627,7 @@
|
|||||||
<span class="input-group-text rounded-0 border-left-0 border-right-0">
|
<span class="input-group-text rounded-0 border-left-0 border-right-0">
|
||||||
Bis
|
Bis
|
||||||
</span>
|
</span>
|
||||||
<input class="form-control" type="date" name="bis" onfocusout="loadServiceRecords()" value="@defaultEndDate"/>
|
<input class="form-control" type="date" name="bis" id="time-frame-end-date" onfocusout="loadServiceRecords()" value="@defaultEndDate"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,19 +1,46 @@
|
|||||||
@{
|
<!DOCTYPE html>
|
||||||
Layout = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
<title>Fehler</title>
|
<title>Fehler</title>
|
||||||
|
<script type="text/javascript" src="@Scripts.Url("~/Scripts/jquery/jquery-3.7.1.min.js")"></script>
|
||||||
|
<script type="text/javascript" src="@Scripts.Url("~/Scripts/devexpress-dependencies/jquery/jquery.validate.min.js")"></script>
|
||||||
|
<script type="text/javascript" src="@Scripts.Url("~/Scripts/devexpress-dependencies/jquery/jquery.unobtrusive-ajax.min.js")"></script>
|
||||||
|
<script type="text/javascript" src="@Scripts.Url("~/Scripts/knockout-3.5.1.js")"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="@Scripts.Url("~/Scripts/bootstrap/bootstrap.bundle.min.js")"></script>
|
||||||
<link rel="stylesheet" href="@Url.Content("~/Content/style.css")" />
|
<link rel="stylesheet" href="@Url.Content("~/Content/style.css")" />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function copyTextToClipboard() {
|
||||||
|
const element = document.querySelector("#error-textarea");
|
||||||
|
element.select();
|
||||||
|
element.setSelectionRange(0, 99999);
|
||||||
|
|
||||||
|
document.execCommand("copy");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<hgroup>
|
<div class="navbar navbar-expand-lg sticky-top justify-content-end">
|
||||||
<h1>Fehler.</h1>
|
<div class="container-fluid">
|
||||||
<h2>Es ist ein Fehler aufgetreten. Bitte wenden Sie sich an Ihren Administrator.</h2>
|
<a href="#" class="navbar-brand m-0 p-0">
|
||||||
<h4>@ViewData["BeWoError"]</h4>
|
<img height="30px" src="@Url.Content("~/Content/images/bewoplaner_by_ownsoft_logo_mok.png")" alt="bewoplaner by ownSoft" />
|
||||||
</hgroup>
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container lg-max-width mt-5">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h1 class="card-title">Fehler</h1>
|
||||||
|
<p>Es ist ein Fehler aufgetreten. Bitte wenden Sie sich an Ihren Administrator.</p>
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-primary" onclick="copyTextToClipboard()">Fehlerdetails Kopieren<span class="ml-3 fas fa-copy"></span></button>
|
||||||
|
|
||||||
|
<textarea id="error-textarea" class="form-control mt-2">@ViewBag.ErrorMessage</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -21,10 +21,10 @@
|
|||||||
Note that because there is only one customErrors section under the
|
Note that because there is only one customErrors section under the
|
||||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
||||||
|
|
||||||
<customErrors defaultRedirect="GenericError.htm"
|
|
||||||
mode="RemoteOnly" xdt:Transform="Replace">
|
|
||||||
<error statusCode="500" redirect="InternalError.htm"/>
|
|
||||||
</customErrors>
|
|
||||||
-->
|
-->
|
||||||
|
<customErrors defaultRedirect="Error" mode="On" xdt:Transform="Replace">
|
||||||
|
<!--<error statusCode="500" redirect="InternalError.htm"/>-->
|
||||||
|
</customErrors>
|
||||||
</system.web>
|
</system.web>
|
||||||
</configuration>
|
</configuration>
|
||||||
Reference in New Issue
Block a user