Exemple #1
0
 public DmTable()
 {
     this.nextRowID     = 1;
     this.rows          = new DmRowCollection(this);
     this.columns       = new DmColumnCollection(this);
     this.Culture       = CultureInfo.CurrentCulture;
     this.CaseSensitive = true;
 }
Exemple #2
0
 public DmTable()
 {
     this.nextRowID     = 1;
     this.Rows          = new DmRowCollection(this);
     this.columns       = new DmColumnCollection(this);
     this.Culture       = CultureInfo.CurrentCulture;
     this.CaseSensitive = false;
     this.compareFlags  = CompareOptions.IgnoreCase | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth;
 }
Exemple #3
0
        //protected internal DmRow(DmTable table, DmRowState state)
        //{
        //    this.table = table;
        //    this.columns = table.Columns;
        //    var record = this.Table.Rows.GetNewVersionId();

        //    this.tempRecord = record;

        //    // si oldRecord == -1 && newRecord != -1 alors l'enregistrement est Added
        //    // si oldRecord != -1 && newRecord == -1 alors l'enregistrement est Deleted
        //    // si oldRecord != -1 && newRecord != -1 alors l'enregistrement est Modified
        //    // si oldRecord == -1 && newRecord == -1 alors l'enregisrement est Detached
        //    switch (state)
        //    {
        //        case DmRowState.Added:
        //            this.oldRecord = -1;
        //            this.newRecord = this.Table.Rows.GetNewVersionId();
        //            break;
        //        case DmRowState.Deleted:
        //            this.oldRecord = this.Table.Rows.GetNewVersionId();
        //            this.newRecord = -1;
        //            break;
        //        case DmRowState.Modified:
        //            this.newRecord = this.Table.Rows.GetNewVersionId();
        //            this.oldRecord = this.Table.Rows.GetNewVersionId();
        //            break;
        //        case DmRowState.Detached:
        //            this.oldRecord = -1;
        //            this.newRecord = -1;
        //            break;
        //    }

        //}

        protected internal DmRow(DmTable table, bool initColumns = true)
        {
            this.table   = table;
            this.columns = table.Columns;

            // Init each columns and create a tempRecord
            if (initColumns)
            {
                this.tempRecord = this.Table.Rows.GetNewVersionId();

                foreach (var c in columns)
                {
                    c.Init(this.tempRecord);
                }
            }
        }