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.Cultural);
            }
            return(Ok(result));
        }
Exemple #2
0
        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("Cultural", "Index", result.ErrorsList));
        }
Exemple #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.Cultural);

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