private DataLogDTO GetBeforeDeleteExceptionLog(EditQueryResultItem item)
        {
            var dataLog = GetBaseLog(item.QueryItem);

            dataLog.MajorException = true;
            dataLog.MajorFunctionExceptionMessage = item.BeforeSaveActionActivitiesMessage;
            return(dataLog);
        }
        private DataLogDTO GetUpdateDataExceptionLog(EditQueryResultItem item)
        {
            var dataLog = GetBaseLog(item.QueryItem);

            dataLog.MajorException = true;
            dataLog.MajorFunctionExceptionMessage            = item.DataUpdateMessage;
            dataLog.EditDataItemExceptionLog                 = new EditDataItemExceptionLogDTO();
            dataLog.EditDataItemExceptionLog.DataUpdateQuery = item.QueryItem.Query;

            return(dataLog);
        }
        private DataLogDTO ToUpdateSuccessfulLog(EditQueryResultItem item, Guid packageGUID)
        {
            var dataLog = GetBaseLog(item.QueryItem);

            dataLog.EditDataItemExceptionLog = new EditDataItemExceptionLogDTO();
            dataLog.EditDataItemExceptionLog.DataUpdateQuery = item.QueryItem.Query;
            if (item.AfterSaveActionActivitiesResult == Enum_DR_SimpleResultType.ExceptionThrown)
            {
                dataLog.MinorException = true;
                dataLog.EditDataItemExceptionLog.AfterSaveActionExceptionMessage = item.BeforeSaveActionActivitiesMessage;
            }
            foreach (var column in item.QueryItem.EditingProperties)
            {
                var logColumn = new EditDataItemColumnDetailsDTO();
                logColumn.ColumnID = column.ColumnID;
                logColumn.NewValue = column.Value;
                if (item.QueryItem.DataItem.OriginalProperties.Any(x => x.ColumnID == column.ColumnID))
                {
                    logColumn.OldValue = item.QueryItem.DataItem.OriginalProperties.First(x => x.ColumnID == column.ColumnID).Value;
                }
                if (column.FormulaID != 0)
                {
                    logColumn.FormulaID        = column.FormulaID;
                    logColumn.FormulaException = column.FormulaException;
                    foreach (var fparam in column.FormulaUsageParemeters)
                    {
                        logColumn.FormulaUsageParemeters.Add(new FormulaUsageParemetersDTO()
                        {
                            ParameterName            = fparam.ParameterName,
                            ParameterValue           = fparam.ParameterValue,
                            RelationshipPropertyTail = fparam.RelationshipPropertyTail,
                        });
                    }
                }
                dataLog.EditDataItemColumnDetails.Add(logColumn);
            }
            return(dataLog);
        }