コード例 #1
0
        public JsonResult Delete(Guid id)
        {
            var item = _evaluacionService.GetPosicion(id);

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

            var itemName     = item.Nombre + "|";
            var confirmation = _evaluacionService.DeletePosicion(item.Id);

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

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