Exemplo n.º 1
0
 private void SetDataRow(VistaDBDataRow dataRow)
 {
     if (this.cacheIndex >= 0)
     {
         this.dataRowCache[this.cacheIndex] = dataRow;
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 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;
		}
Exemplo n.º 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;
        }
Exemplo n.º 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;
		}
Exemplo n.º 6
0
		private void SetDataRow(VistaDBDataRow dataRow)
		{
			if(this.cacheIndex >= 0)
				this.dataRowCache[this.cacheIndex] = dataRow;
		}
Exemplo n.º 7
0
		private void SetDataRow(int index, VistaDBDataRow dataRow)
		{
			this.dataRowCache[index] = dataRow;
		}
Exemplo n.º 8
0
 private void SetDataRow(int index, VistaDBDataRow dataRow)
 {
     this.dataRowCache[index] = dataRow;
 }