Пример #1
0
        private void OnCommit(DBItemEventArgs arg)
        {
            var item = arg.Item;

            if (!(item is DBLogItem) && item.Table.Type == DBTableType.Table && item.Table.IsLoging)
            {
                var type = (arg.State & DBUpdateState.Delete) == DBUpdateState.Delete ? DBLogType.Delete
                    : (arg.State & DBUpdateState.Insert) == DBUpdateState.Insert ? DBLogType.Insert
                    : DBLogType.Update;
                buffer.Enqueue(new NotifyMessageItem()
                {
                    Table  = item.Table,
                    ItemId = item.PrimaryId,
                    Type   = type,
                    UserId = arg.User?.Id ?? 0
                });
            }
        }
Пример #2
0
 internal static void OnReject(DBItemEventArgs e)
 {
     RowReject?.Invoke(e);
 }
Пример #3
0
 internal static void OnAccept(DBItemEventArgs e)
 {
     RowAccept?.Invoke(e);
 }
Пример #4
0
 internal static void OnUpdated(DBItemEventArgs e)
 {
     RowUpdated?.Invoke(e);
 }
Пример #5
0
 internal static void OnLogItem(DBItemEventArgs e)
 {
     RowLoging?.Invoke(e);
 }