Beispiel #1
0
        public async Task <IActionResult> Delete([Required] string id)
        {
            var result = await _services.DeleteAsync(id);

            if (result.IsValid)
            {
                await _systemAuditService.AuditAsync(User.GetEmail(), _accessor.GetIp(), Operations.Delete, Tables.Event);
            }
            return(Ok(result));
        }
        public async Task <IActionResult> DeleteConfirmed(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            var result = await _services.DeleteAsync(id);

            return(result.IsValid
                ? RedirectToAction("Index")
                : _oops.OutPutError("Wellness", "Index", result.ErrorsList));
        }
Beispiel #3
0
        public async Task <IActionResult> DeleteConfirmed([Required] string id)
        {
            var result = await _services.DeleteAsync(id);

            if (result.IsValid)
            {
                await _systemAuditService.AuditAsync(User.GetEmail(), _accessor.GetIp(), Operations.Delete, Tables.Event);

                return(RedirectToAction("Index"));
            }
            TempData["ErrorsList"] = result.ErrorsList;
            return(View());
        }