private void SetDataRow(VistaDBDataRow dataRow) { if (this.cacheIndex >= 0) { this.dataRowCache[this.cacheIndex] = dataRow; } }
/// <summary> /// Adds a new item to the list. /// </summary> /// <returns>The item added to the list.</returns> public object AddNew() { VistaDBDataRow dataRow; if (!this.AllowNew) { throw new InvalidOperationException("Adding a new row is not allowed"); } dataRow = this.Insert(); if (this.ListChanged != null) { this.ListChanged(this, new ListChangedEventArgs(ListChangedType.ItemAdded, (this.Count - 1))); } return(dataRow); }
/// <summary> /// Constructor /// </summary> public VistaDBDataSet() { this.table = null; this.sortProperty = null; this.sortDirection = ListSortDirection.Ascending; this.cacheMinRowIndex = -1; this.cacheMaxRowIndex = -1; this.rowIndex = -1; this.dataRowCache = new VistaDBDataRow[CacheSize]; this.cacheIndex = -1; this.firstRun = true; this.secondRun = false; this.count = 0; this.table = new VistaDBDataSetTable(this); this.dataRow = null; this.inserting = false; }
/// <summary> /// Adds a new item to the list. /// </summary> /// <returns>The item added to the list.</returns> public object AddNew() { VistaDBDataRow dataRow; if (!this.AllowNew) { throw new InvalidOperationException("Adding a new row is not allowed"); } dataRow = this.Insert(); if (this.ListChanged != null) { this.ListChanged(this, new ListChangedEventArgs(ListChangedType.ItemAdded, (this.Count - 1))); } return dataRow; }
private void SetDataRow(VistaDBDataRow dataRow) { if(this.cacheIndex >= 0) this.dataRowCache[this.cacheIndex] = dataRow; }
private void SetDataRow(int index, VistaDBDataRow dataRow) { this.dataRowCache[index] = dataRow; }