Esempio n. 1
0
        private void OnAfterDataRowInserted(object sender, DataRowEventArgs e)
        {
            var dataRow = e.DataRow;

            if (_insertingDataRows.Peek() == dataRow)
            {
                Add(dataRow);
                Debug.Assert(_insertingDataRows.Peek() == dataRow);
                _insertingDataRows.Pop();
            }
        }
Esempio n. 2
0
        private void OnDataRowInserting(object sender, DataRowEventArgs e)
        {
            var dataRow = e.DataRow;

            if (IsRecursive && GetDepth(dataRow) == _maxDepth - 1)
            {
                var childDataSet = GetChildDataSet(dataRow.Model);
                WireDataChangedEvents(childDataSet.Model);
            }
            _insertingDataRows.Push(dataRow);
        }