public ItemRow NewRow()
        {
            ItemRow row = new ItemRow();

            row.Table = this;

            foreach (ItemColumn column in this.Columns)
            {
                row.PropertyBlob.Add(column.ColumnName);
                row.SetField(column.ColumnName, column.DefaultValue);
            }

            row.AcceptChanges();

            row.RowState = ItemRowState.Detached;

            return(row);
        }
        public void RejectChanges()
        {
            int i = 0;

            while (i < this.Rows.Count)
            {
                ItemRow row = this.Rows[i];
                if (row.RowState == ItemRowState.Added)
                {
                    this.Rows.Remove(row);
                }
                else
                {
                    row.RejectChanges();
                    i++;
                }
            }
        }
        public void AcceptChanges()
        {
            int i = 0;

            while (i < this.Rows.Count)
            {
                ItemRow row = this.Rows[i];
                if (row.RowState == ItemRowState.Deleted)
                {
                    this.Rows.Remove(row);
                }
                else
                {
                    row.AcceptChanges();
                    i++;
                }
            }
        }
Ejemplo n.º 4
0
 public ItemRowChanged(ItemRow myItemRow, ItemRowState myItemRowState)
 {
     this.ItemRow      = myItemRow;
     this.ItemRowState = myItemRowState;
 }