private static bool LogHistoryTrackingValue(Guid historyTrackingId, string fieldName, string oldValue, string newValue, string action)
        {
            var historyTrackingValue = new HistoryTrackingValueAudit
            {
                HistoryTrackingId = historyTrackingId,
                ColumnName        = fieldName,
                OldValue          = oldValue,
                NewValue          = newValue,
                Action            = action
            };

            _unitOfWork.HistoryTrackingValueAuditRepository.Add(historyTrackingValue);
            return(true);
        }
Example #2
0
        private bool LogHistoryTrackingValue(Guid historyTrackingId, string fieldName, string oldValue, string newValue, string action)
        {
            var userId = Guid.Parse("98e83503-936e-4ebb-9a61-4cb2b2adbc95");//guid system
            var historyTrackingValue = new HistoryTrackingValueAudit
            {
                Id = Guid.NewGuid(),
                HistoryTrackingId = historyTrackingId,
                ColumnName        = fieldName,
                OldValue          = oldValue,
                NewValue          = newValue,
                Action            = action,
                InsertedById      = userId,
                InsertedAt        = DateTime.Now,
                UpdatedById       = userId,
                UpdatedAt         = DateTime.Now,
            };

            _unitOfWork.HistoryTrackingValueAuditRepository.Add(historyTrackingValue);
            return(true);
        }