|
|
@@ -1,9 +1,11 @@
|
|
|
using DevExpress.Web.Mvc;
|
|
|
using GreenTree.Nachtragsmanagement.Core;
|
|
|
+using GreenTree.Nachtragsmanagement.Core.Authentication;
|
|
|
using GreenTree.Nachtragsmanagement.Core.Domain.Appendix;
|
|
|
using GreenTree.Nachtragsmanagement.Core.Domain.Deviation;
|
|
|
using GreenTree.Nachtragsmanagement.Services.Appendix;
|
|
|
using GreenTree.Nachtragsmanagement.Services.Deviation;
|
|
|
+using GreenTree.Nachtragsmanagement.Services.Logging;
|
|
|
using GreenTree.Nachtragsmanagement.Services.Site;
|
|
|
using GreenTree.Nachtragsmanagement.Web.Framework.Authorization;
|
|
|
using GreenTree.Nachtragsmanagement.Web.Models.Deviation;
|
|
|
@@ -22,15 +24,21 @@ namespace GreenTree.Nachtragsmanagement.Web.Controllers
|
|
|
private readonly IDeviationService _deviationService;
|
|
|
private readonly IAppendixService _appendixService;
|
|
|
private readonly ISiteService _siteService;
|
|
|
+ private readonly IUserHelper _userHelper;
|
|
|
+ private readonly ILogger _logger;
|
|
|
|
|
|
public DeviationController(
|
|
|
IDeviationService deviationService,
|
|
|
IAppendixService appendixService,
|
|
|
- ISiteService siteService)
|
|
|
+ ISiteService siteService,
|
|
|
+ IUserHelper userHelper,
|
|
|
+ ILogger logger)
|
|
|
{
|
|
|
_deviationService = deviationService;
|
|
|
_appendixService = appendixService;
|
|
|
_siteService = siteService;
|
|
|
+ _userHelper = userHelper;
|
|
|
+ _logger = logger;
|
|
|
|
|
|
ViewData["AllDisturbances"] = _deviationService.GetAllDisturbances();
|
|
|
ViewData["AllStatuses"] = _deviationService.GetAllStatuses();
|
|
|
@@ -236,54 +244,67 @@ namespace GreenTree.Nachtragsmanagement.Web.Controllers
|
|
|
[HttpPost, ValidateInput(false)]
|
|
|
public ActionResult EditDeviation(DeviationDataModel deviationModel)
|
|
|
{
|
|
|
- deviationModel.DisturbanceValueEntities =
|
|
|
- deviationModel.DisturbanceEntities
|
|
|
- .Select(r => JsonConvert.DeserializeObject<DisturbanceValueDataModel>(r))
|
|
|
- .ToList();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ deviationModel.DisturbanceValueEntities =
|
|
|
+ deviationModel.DisturbanceEntities
|
|
|
+ .Select(r => JsonConvert.DeserializeObject<DisturbanceValueDataModel>(r))
|
|
|
+ .ToList();
|
|
|
|
|
|
- for (int i = 0; i < deviationModel.DisturbanceValueEntities.Count; i++)
|
|
|
- deviationModel.DisturbanceValueEntities.ElementAt(i).Json = deviationModel.DisturbanceEntities.ElementAt(i);
|
|
|
+ for (int i = 0; i < deviationModel.DisturbanceValueEntities.Count; i++)
|
|
|
+ deviationModel.DisturbanceValueEntities.ElementAt(i).Json = deviationModel.DisturbanceEntities.ElementAt(i);
|
|
|
|
|
|
- deviationModel.PercentageValue = deviationModel.Value * deviationModel.Percentage;
|
|
|
+ deviationModel.PercentageValue = deviationModel.Value * deviationModel.Percentage;
|
|
|
|
|
|
- if (!ModelState.IsValid)
|
|
|
- return PartialView("~/Views/Deviations/_DeviationEditPartial.cshtml", deviationModel);
|
|
|
+ if (!ModelState.IsValid)
|
|
|
+ return PartialView("~/Views/Deviations/_DeviationEditPartial.cshtml", deviationModel);
|
|
|
|
|
|
- var disturbanceValues = deviationModel.DisturbanceValueEntities
|
|
|
- .Select(r => r.ToDisturbanceValue())
|
|
|
- .ToList();
|
|
|
+ var disturbanceValues = deviationModel.DisturbanceValueEntities
|
|
|
+ .Select(r => r.ToDisturbanceValue())
|
|
|
+ .ToList();
|
|
|
|
|
|
- if (deviationModel.Id == -1)
|
|
|
- {
|
|
|
- var deviation = deviationModel.ToDeviation();
|
|
|
+ if (deviationModel.Id == -1)
|
|
|
+ {
|
|
|
+ var deviation = deviationModel.ToDeviation();
|
|
|
|
|
|
- deviation.SetDisturbanceValues(disturbanceValues);
|
|
|
+ deviation.SetDisturbanceValues(disturbanceValues);
|
|
|
|
|
|
- _deviationService.InsertDeviation(deviation);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- var deviation = _deviationService.GetDeviationById(deviationModel.Id);
|
|
|
+ _deviationService.InsertDeviation(deviation);
|
|
|
|
|
|
- deviation.CustomNumber = deviationModel.CustomNumber;
|
|
|
- deviation.Description = deviationModel.Description;
|
|
|
- deviation.ReceiptDate = deviationModel.ReceiptDate;
|
|
|
- deviation.AppendixDate = deviationModel.AppendixDate;
|
|
|
- deviation.Value = deviationModel.Value;
|
|
|
- deviation.AppendixId = deviationModel.AppendixId;
|
|
|
- deviation.StatusId = deviationModel.StatusId;
|
|
|
- deviation.KindId = deviationModel.KindId;
|
|
|
- deviation.Comment = deviationModel.Comment;
|
|
|
+ _logger.Entity(deviation, Core.Domain.Logging.LogEntityActivity.Insert, _userHelper.FromCookies());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var deviation = _deviationService.GetDeviationById(deviationModel.Id);
|
|
|
|
|
|
- deviation.SetDisturbanceValues(disturbanceValues);
|
|
|
+ deviation.CustomNumber = deviationModel.CustomNumber;
|
|
|
+ deviation.Description = deviationModel.Description;
|
|
|
+ deviation.ReceiptDate = deviationModel.ReceiptDate;
|
|
|
+ deviation.AppendixDate = deviationModel.AppendixDate;
|
|
|
+ deviation.Value = deviationModel.Value;
|
|
|
+ deviation.AppendixId = deviationModel.AppendixId;
|
|
|
+ deviation.StatusId = deviationModel.StatusId;
|
|
|
+ deviation.KindId = deviationModel.KindId;
|
|
|
+ deviation.Comment = deviationModel.Comment;
|
|
|
|
|
|
- _deviationService.UpdateDeviation(deviation);
|
|
|
- }
|
|
|
+ deviation.SetDisturbanceValues(disturbanceValues);
|
|
|
|
|
|
- return new JsonResult
|
|
|
+ _deviationService.UpdateDeviation(deviation);
|
|
|
+
|
|
|
+ _logger.Entity(deviation, Core.Domain.Logging.LogEntityActivity.Update, _userHelper.FromCookies());
|
|
|
+ }
|
|
|
+
|
|
|
+ return new JsonResult
|
|
|
+ {
|
|
|
+ Data = "success"
|
|
|
+ };
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
{
|
|
|
- Data = "success"
|
|
|
- };
|
|
|
+ _logger.Error("Fehler bei Speicherung einer Vertragsabweichung.", ex, _userHelper.FromCookies());
|
|
|
+
|
|
|
+ return PartialView("~/Views/Shared/_PopupError.cshtml", ex);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -293,15 +314,26 @@ namespace GreenTree.Nachtragsmanagement.Web.Controllers
|
|
|
[HttpPost]
|
|
|
public ActionResult DeleteDeviation(int id)
|
|
|
{
|
|
|
- var deviation = _deviationService.GetDeviationById(id);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var deviation = _deviationService.GetDeviationById(id);
|
|
|
|
|
|
- if (deviation != null)
|
|
|
- _deviationService.DeleteDeviation(deviation);
|
|
|
+ if (deviation != null)
|
|
|
+ _deviationService.DeleteDeviation(deviation);
|
|
|
|
|
|
- return new JsonResult
|
|
|
+ _logger.Entity(deviation, Core.Domain.Logging.LogEntityActivity.Delete, _userHelper.FromCookies());
|
|
|
+
|
|
|
+ return new JsonResult
|
|
|
+ {
|
|
|
+ Data = "success"
|
|
|
+ };
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
{
|
|
|
- Data = "success"
|
|
|
- };
|
|
|
+ _logger.Error("Fehler bei Löschung einer Vertragsabweichung.", ex, _userHelper.FromCookies());
|
|
|
+
|
|
|
+ return PartialView("~/Views/Shared/_PopupError.cshtml", ex);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
@@ -415,41 +447,54 @@ namespace GreenTree.Nachtragsmanagement.Web.Controllers
|
|
|
[HttpPost, ValidateInput(false)]
|
|
|
public ActionResult EditStatus(StatusDataModel statusModel)
|
|
|
{
|
|
|
- if (!ModelState.IsValid)
|
|
|
- return PartialView("~/Views/Deviations/_StatusEditPartial.cshtml", statusModel);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if (!ModelState.IsValid)
|
|
|
+ return PartialView("~/Views/Deviations/_StatusEditPartial.cshtml", statusModel);
|
|
|
|
|
|
- var allStatuses = _deviationService.GetAllStatuses();
|
|
|
+ var allStatuses = _deviationService.GetAllStatuses();
|
|
|
|
|
|
- if (statusModel.IsDefault)
|
|
|
- {
|
|
|
- foreach (var status in allStatuses)
|
|
|
+ if (statusModel.IsDefault)
|
|
|
{
|
|
|
- status.IsDefault = false;
|
|
|
+ foreach (var status in allStatuses)
|
|
|
+ {
|
|
|
+ status.IsDefault = false;
|
|
|
|
|
|
- _deviationService.UpdateStatus(status);
|
|
|
+ _deviationService.UpdateStatus(status);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (statusModel.Id == -1)
|
|
|
- {
|
|
|
- var claim = statusModel.ToStatus();
|
|
|
+ if (statusModel.Id == -1)
|
|
|
+ {
|
|
|
+ var claim = statusModel.ToStatus();
|
|
|
|
|
|
- _deviationService.InsertStatus(claim);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- var claim = _deviationService.GetStatusById(statusModel.Id);
|
|
|
+ _deviationService.InsertStatus(claim);
|
|
|
+
|
|
|
+ _logger.Entity(claim, Core.Domain.Logging.LogEntityActivity.Insert, _userHelper.FromCookies());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var claim = _deviationService.GetStatusById(statusModel.Id);
|
|
|
|
|
|
- claim.Description = statusModel.Description;
|
|
|
- claim.IsDefault = statusModel.IsDefault;
|
|
|
+ claim.Description = statusModel.Description;
|
|
|
+ claim.IsDefault = statusModel.IsDefault;
|
|
|
|
|
|
- _deviationService.UpdateStatus(claim);
|
|
|
- }
|
|
|
+ _deviationService.UpdateStatus(claim);
|
|
|
|
|
|
- return new JsonResult
|
|
|
+ _logger.Entity(claim, Core.Domain.Logging.LogEntityActivity.Update, _userHelper.FromCookies());
|
|
|
+ }
|
|
|
+
|
|
|
+ return new JsonResult
|
|
|
+ {
|
|
|
+ Data = "success"
|
|
|
+ };
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
{
|
|
|
- Data = "success"
|
|
|
- };
|
|
|
+ _logger.Error("Fehler bei Speicherung eines VA-Status.", ex, _userHelper.FromCookies());
|
|
|
+
|
|
|
+ return PartialView("~/Views/Shared/_PopupError.cshtml", ex);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -459,28 +504,41 @@ namespace GreenTree.Nachtragsmanagement.Web.Controllers
|
|
|
[HttpPost, ValidateInput(false)]
|
|
|
public ActionResult EditDisturbance(DisturbanceDataModel disturbanceModel)
|
|
|
{
|
|
|
- if (!ModelState.IsValid)
|
|
|
- return PartialView("~/Views/Deviations/_DisturbanceEditPartial.cshtml", disturbanceModel);
|
|
|
-
|
|
|
- if (disturbanceModel.Id == -1)
|
|
|
+ try
|
|
|
{
|
|
|
- var claim = disturbanceModel.ToDisturbance();
|
|
|
+ if (!ModelState.IsValid)
|
|
|
+ return PartialView("~/Views/Deviations/_DisturbanceEditPartial.cshtml", disturbanceModel);
|
|
|
|
|
|
- _deviationService.InsertDisturbance(claim);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- var disturbance = _deviationService.GetDisturbanceById(disturbanceModel.Id);
|
|
|
+ if (disturbanceModel.Id == -1)
|
|
|
+ {
|
|
|
+ var claim = disturbanceModel.ToDisturbance();
|
|
|
|
|
|
- disturbance.Description = disturbanceModel.Description;
|
|
|
+ _deviationService.InsertDisturbance(claim);
|
|
|
|
|
|
- _deviationService.UpdateDisturbance(disturbance);
|
|
|
- }
|
|
|
+ _logger.Entity(claim, Core.Domain.Logging.LogEntityActivity.Insert, _userHelper.FromCookies());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var disturbance = _deviationService.GetDisturbanceById(disturbanceModel.Id);
|
|
|
|
|
|
- return new JsonResult
|
|
|
+ disturbance.Description = disturbanceModel.Description;
|
|
|
+
|
|
|
+ _deviationService.UpdateDisturbance(disturbance);
|
|
|
+
|
|
|
+ _logger.Entity(disturbance, Core.Domain.Logging.LogEntityActivity.Update, _userHelper.FromCookies());
|
|
|
+ }
|
|
|
+
|
|
|
+ return new JsonResult
|
|
|
+ {
|
|
|
+ Data = "success"
|
|
|
+ };
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
{
|
|
|
- Data = "success"
|
|
|
- };
|
|
|
+ _logger.Error("Fehler bei Speicherung einer VA-Kategorie.", ex, _userHelper.FromCookies());
|
|
|
+
|
|
|
+ return PartialView("~/Views/Shared/_PopupError.cshtml", ex);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -490,41 +548,54 @@ namespace GreenTree.Nachtragsmanagement.Web.Controllers
|
|
|
[HttpPost, ValidateInput(false)]
|
|
|
public ActionResult EditKind(KindDataModel kindModel)
|
|
|
{
|
|
|
- if (!ModelState.IsValid)
|
|
|
- return PartialView("~/Views/Deviations/_KindEditPartial.cshtml", kindModel);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if (!ModelState.IsValid)
|
|
|
+ return PartialView("~/Views/Deviations/_KindEditPartial.cshtml", kindModel);
|
|
|
|
|
|
- var allKinds = _deviationService.GetAllKinds();
|
|
|
+ var allKinds = _deviationService.GetAllKinds();
|
|
|
|
|
|
- if (kindModel.IsDefault)
|
|
|
- {
|
|
|
- foreach (var kind in allKinds)
|
|
|
+ if (kindModel.IsDefault)
|
|
|
{
|
|
|
- kind.IsDefault = false;
|
|
|
+ foreach (var kind in allKinds)
|
|
|
+ {
|
|
|
+ kind.IsDefault = false;
|
|
|
|
|
|
- _deviationService.UpdateKind(kind);
|
|
|
+ _deviationService.UpdateKind(kind);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (kindModel.Id == -1)
|
|
|
- {
|
|
|
- var claim = kindModel.ToKind();
|
|
|
+ if (kindModel.Id == -1)
|
|
|
+ {
|
|
|
+ var claim = kindModel.ToKind();
|
|
|
|
|
|
- _deviationService.InsertKind(claim);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- var kind = _deviationService.GetKindById(kindModel.Id);
|
|
|
+ _deviationService.InsertKind(claim);
|
|
|
|
|
|
- kind.Description = kindModel.Description;
|
|
|
- kind.IsDefault = kindModel.IsDefault;
|
|
|
+ _logger.Entity(claim, Core.Domain.Logging.LogEntityActivity.Insert, _userHelper.FromCookies());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var kind = _deviationService.GetKindById(kindModel.Id);
|
|
|
|
|
|
- _deviationService.UpdateKind(kind);
|
|
|
- }
|
|
|
+ kind.Description = kindModel.Description;
|
|
|
+ kind.IsDefault = kindModel.IsDefault;
|
|
|
|
|
|
- return new JsonResult
|
|
|
+ _deviationService.UpdateKind(kind);
|
|
|
+
|
|
|
+ _logger.Entity(kind, Core.Domain.Logging.LogEntityActivity.Update, _userHelper.FromCookies());
|
|
|
+ }
|
|
|
+
|
|
|
+ return new JsonResult
|
|
|
+ {
|
|
|
+ Data = "success"
|
|
|
+ };
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
{
|
|
|
- Data = "success"
|
|
|
- };
|
|
|
+ _logger.Error("Fehler bei Speicherung einer Art.", ex, _userHelper.FromCookies());
|
|
|
+
|
|
|
+ return PartialView("~/Views/Shared/_PopupError.cshtml", ex);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -539,61 +610,94 @@ namespace GreenTree.Nachtragsmanagement.Web.Controllers
|
|
|
switch (claimType.ToLower())
|
|
|
{
|
|
|
case "status":
|
|
|
- var status = _deviationService.GetStatusById(id);
|
|
|
- var replaceStatus = _deviationService.GetStatusById(replaceId);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var status = _deviationService.GetStatusById(id);
|
|
|
+ var replaceStatus = _deviationService.GetStatusById(replaceId);
|
|
|
|
|
|
- var statusDeviations = _deviationService.GetDeviationsByStatus(id);
|
|
|
+ var statusDeviations = _deviationService.GetDeviationsByStatus(id);
|
|
|
|
|
|
- foreach (var deviation in statusDeviations)
|
|
|
- {
|
|
|
- deviation.StatusId = replaceId;
|
|
|
- deviation.Status = replaceStatus;
|
|
|
+ foreach (var deviation in statusDeviations)
|
|
|
+ {
|
|
|
+ deviation.StatusId = replaceId;
|
|
|
+ deviation.Status = replaceStatus;
|
|
|
+
|
|
|
+ _deviationService.UpdateDeviation(deviation);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (status != null)
|
|
|
+ _deviationService.DeleteStatus(status);
|
|
|
|
|
|
- _deviationService.UpdateDeviation(deviation);
|
|
|
+ _logger.Entity(status, Core.Domain.Logging.LogEntityActivity.Delete, _userHelper.FromCookies());
|
|
|
}
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ _logger.Error("Fehler bei Löschung eines VA-Status.", ex, _userHelper.FromCookies());
|
|
|
|
|
|
- if (status != null)
|
|
|
- _deviationService.DeleteStatus(status);
|
|
|
+ return PartialView("~/Views/Shared/_PopupError.cshtml", ex);
|
|
|
+ }
|
|
|
break;
|
|
|
case "kind":
|
|
|
- var kind = _deviationService.GetKindById(id);
|
|
|
- var replaceKind = _deviationService.GetKindById(replaceId);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var kind = _deviationService.GetKindById(id);
|
|
|
+ var replaceKind = _deviationService.GetKindById(replaceId);
|
|
|
|
|
|
- var kindDeviations = _deviationService.GetDeviationsByKind(id);
|
|
|
+ var kindDeviations = _deviationService.GetDeviationsByKind(id);
|
|
|
|
|
|
- foreach (var deviation in kindDeviations)
|
|
|
- {
|
|
|
- deviation.KindId = replaceId;
|
|
|
- deviation.Kind = replaceKind;
|
|
|
+ foreach (var deviation in kindDeviations)
|
|
|
+ {
|
|
|
+ deviation.KindId = replaceId;
|
|
|
+ deviation.Kind = replaceKind;
|
|
|
|
|
|
- _deviationService.UpdateDeviation(deviation);
|
|
|
+ _deviationService.UpdateDeviation(deviation);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (kind != null)
|
|
|
+ _deviationService.DeleteKind(kind);
|
|
|
+
|
|
|
+ _logger.Entity(kind, Core.Domain.Logging.LogEntityActivity.Delete, _userHelper.FromCookies());
|
|
|
}
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ _logger.Error("Fehler bei Löschung einer Art.", ex, _userHelper.FromCookies());
|
|
|
|
|
|
- if (kind != null)
|
|
|
- _deviationService.DeleteKind(kind);
|
|
|
+ return PartialView("~/Views/Shared/_PopupError.cshtml", ex);
|
|
|
+ }
|
|
|
break;
|
|
|
case "disturbance":
|
|
|
- var disturbance = _deviationService.GetDisturbanceById(id);
|
|
|
- var replaceDisturbance = _deviationService.GetDisturbanceById(replaceId);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var disturbance = _deviationService.GetDisturbanceById(id);
|
|
|
+ var replaceDisturbance = _deviationService.GetDisturbanceById(replaceId);
|
|
|
|
|
|
- var allDeviations = _deviationService.GetAllDeviations();
|
|
|
+ var allDeviations = _deviationService.GetAllDeviations();
|
|
|
|
|
|
- foreach (var deviation in allDeviations)
|
|
|
- {
|
|
|
- foreach (var disturbanceValue in deviation.DisturbanceValues)
|
|
|
+ foreach (var deviation in allDeviations)
|
|
|
{
|
|
|
- if (disturbanceValue.DisturbanceId == id)
|
|
|
+ foreach (var disturbanceValue in deviation.DisturbanceValues)
|
|
|
{
|
|
|
- disturbanceValue.Disturbance = replaceDisturbance;
|
|
|
- disturbanceValue.DisturbanceId = replaceDisturbance.Id;
|
|
|
+ if (disturbanceValue.DisturbanceId == id)
|
|
|
+ {
|
|
|
+ disturbanceValue.Disturbance = replaceDisturbance;
|
|
|
+ disturbanceValue.DisturbanceId = replaceDisturbance.Id;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ _deviationService.UpdateDeviation(deviation);
|
|
|
}
|
|
|
|
|
|
- _deviationService.UpdateDeviation(deviation);
|
|
|
+ if (disturbance != null)
|
|
|
+ _deviationService.DeleteDisturbance(disturbance);
|
|
|
+
|
|
|
+ _logger.Entity(disturbance, Core.Domain.Logging.LogEntityActivity.Delete, _userHelper.FromCookies());
|
|
|
}
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ _logger.Error("Fehler bei Löschung einer VA-Kategorie.", ex, _userHelper.FromCookies());
|
|
|
|
|
|
- if (disturbance != null)
|
|
|
- _deviationService.DeleteDisturbance(disturbance);
|
|
|
+ return PartialView("~/Views/Shared/_PopupError.cshtml", ex);
|
|
|
+ }
|
|
|
break;
|
|
|
default:
|
|
|
return new EmptyResult();
|