Exemple #1
0
        public JsonResult DeleteTipo(Guid id)
        {
            var item = _localService.GetTipo(id);

            if (item == null)
            {
                return(Json(false));
            }

            var itemName     = item.Detalle + "|";
            var confirmation = _localService.DeleteTipo(item.Id);

            if (confirmation.WasSuccessful)
            {
                LogSaveObjectAction(savedObject: $"{itemName} deleted");
            }
            else
            {
                LogErrorObjectAction(confirmation.Message, $"{itemName}");
            }

            return(Json(new { status = confirmation.WasSuccessful, message = confirmation.Message }));
        }