Пример #1
0
 private void SetDataRow(VistaDBDataRow dataRow)
 {
     if (this.cacheIndex >= 0)
     {
         this.dataRowCache[this.cacheIndex] = dataRow;
     }
 }
Пример #2
0
        /// <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);
        }
Пример #3
0
		/// <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;
		}
Пример #4
0
        /// <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;
        }
Пример #5
0
		/// <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;
		}
Пример #6
0
		private void SetDataRow(VistaDBDataRow dataRow)
		{
			if(this.cacheIndex >= 0)
				this.dataRowCache[this.cacheIndex] = dataRow;
		}
Пример #7
0
		private void SetDataRow(int index, VistaDBDataRow dataRow)
		{
			this.dataRowCache[index] = dataRow;
		}
Пример #8
0
 private void SetDataRow(int index, VistaDBDataRow dataRow)
 {
     this.dataRowCache[index] = dataRow;
 }