コード例 #1
0
        public void SetCancellationReason(int orderNodeId, int cancellationReasonId, string eventId, bool doReindex = true, bool doSignal = true)
        {
            var content = _contentService.GetById(orderNodeId);
            int currentCancellationReason = _umbraco.GetPropertyValueAsInteger(content.GetValue("cancellationReason"));

            if (_umbraco.GetPropertyValueAsInteger(content.GetValue("cancellationReason")) != cancellationReasonId)
            {
                SetContentValue(content, "cancellationReason", cancellationReasonId);
                AddLogItem(orderNodeId, "ANNULLERINGSORSAK", "Annulleringsorsak ändrad till " + umbraco.library.GetPreValueAsString(cancellationReasonId), eventId, false, false);
            }
            SaveWithoutEventsAndWithSynchronousReindexing(content, doReindex, doSignal);
        }