protected virtual void DoCaptureLog()
        {
            if (IsUpdate)
            {
                var  logRow     = Row as ILoggingRow;
                bool anyChanged = false;
                foreach (var field in this.Row.GetTableFields())
                {
                    if (logRow != null &&
                        (ReferenceEquals(logRow.InsertDateField, field) ||
                         ReferenceEquals(logRow.UpdateDateField, field) ||
                         ReferenceEquals(logRow.InsertUserIdField, field) ||
                         ReferenceEquals(logRow.UpdateUserIdField, field)))
                    {
                        continue;
                    }

                    if (field.IndexCompare(Old, Row) != 0)
                    {
                        anyChanged = true;
                        break;
                    }
                }

                if (anyChanged)
                {
                    captureLogHandler.Log(this.UnitOfWork, this.Row, Authorization.UserId.TryParseID().Value, isDelete: false);
                }
            }
            else if (IsCreate)
            {
                captureLogHandler.Log(this.UnitOfWork, this.Row, Authorization.UserId.TryParseID().Value, isDelete: false);
            }
        }
Пример #2
0
        protected virtual void DoCaptureLog()
        {
            if (IsUpdate)
            {
                var  logRow     = Row as ILoggingRow;
                bool anyChanged = false;
                foreach (var field in this.Row.GetTableFields())
                {
                    if (logRow != null &&
                        (logRow.InsertDateField == field ||
                         logRow.UpdateDateField == field ||
                         logRow.InsertUserIdField == field ||
                         logRow.UpdateUserIdField == field))
                    {
                        continue;
                    }

                    if (field.IndexCompare(Old, Row) != 0)
                    {
                        anyChanged = true;
                        break;
                    }
                }

                if (anyChanged)
                {
                    captureLogHandler.Log(this.UnitOfWork, this.Row, SecurityHelper.CurrentUserId, isDelete: false);
                }
            }
            else if (IsCreate)
            {
                captureLogHandler.Log(this.UnitOfWork, this.Row, SecurityHelper.CurrentUserId, isDelete: false);
            }
        }
Пример #3
0
        protected virtual void DoCaptureLog()
        {
            var newRow = Row.Clone();

            ((IIsActiveRow)newRow).IsActiveField[newRow] = 1;
            captureLogHandler.Log(this.UnitOfWork, this.Row, newRow, Authorization.UserId);
        }
Пример #4
0
 protected virtual void DoCaptureLog()
 {
     ((IIsActiveRow)Row).IsActiveField[Row] = 1;
     captureLogHandler.Log(this.UnitOfWork, this.Row, SecurityHelper.CurrentUserId, isDelete: false);
 }
Пример #5
0
 protected virtual void DoCaptureLog()
 {
     captureLogHandler.Log(this.UnitOfWork, this.Row, Authorization.UserId.TryParseID().Value, isDelete: true);
 }
Пример #6
0
 protected virtual void DoCaptureLog()
 {
     captureLogHandler.Log(this.UnitOfWork, this.Row, SecurityHelper.CurrentUserId, isDelete: true);
 }
 protected virtual void DoCaptureLog()
 {
     ((IIsActiveRow)Row).IsActiveField[Row] = 1;
     captureLogHandler.Log(this.UnitOfWork, this.Row, Authorization.UserId.TryParseID().Value, isDelete: false);
 }