Beispiel #1
0
        private void DeleteRecord(int recordIndex, bool fireEvent)
        {
            DataCommonEventSource.Log.Trace("<ds.Index.DeleteRecord|INFO> {0}, recordIndex={1}, fireEvent={2}", ObjectID, recordIndex, fireEvent);

            if (recordIndex >= 0)
            {
                _recordCount--;
                int record = _records.DeleteByIndex(recordIndex);

                MaintainDataView(ListChangedType.ItemDeleted, record, !fireEvent);

                if (fireEvent)
                {
                    OnListChanged(ListChangedType.ItemDeleted, recordIndex);
                }
            }
        }
Beispiel #2
0
        private void DeleteRecord(int recordIndex, bool fireEvent)
        {
            Bid.Trace("<ds.Index.DeleteRecord|INFO> %d#, recordIndex=%d, fireEvent=%d{bool}\n", ObjectID, recordIndex, fireEvent);

            if (recordIndex >= 0)
            {
                recordCount--;
                int record = records.DeleteByIndex(recordIndex);

                MaintainDataView(ListChangedType.ItemDeleted, record, !fireEvent);

                if (fireEvent)
                {
                    // 1) Webdata 104939 do not fix this, it would be breaking change
                    // 2) newRecord = -1, oldrecord = recordIndex;
                    OnListChanged(ListChangedType.ItemDeleted, recordIndex);
                }
            }
        }