Ejemplo n.º 1
0
 public void FillPersistentData()
 {
     for (int i = 0; i < rowCount; i++)
     {
         object[] rowData = GetRowData(i);
         DataRow2 row     = persistentTable.NewRow();
         for (int j = 0; j < persistentColInds.Count; j++)
         {
             row[j] = rowData[persistentColInds[j]];
         }
         persistentTable.AddRow(row);
     }
 }
Ejemplo n.º 2
0
        private int GetIntValue(DataRow2 row, int colInd)
        {
            bool   isInt = columnTypes[colInd] == ColumnType.Integer;
            object o     = row[colInd];

            if (isInt)
            {
                if (o == null || o is DBNull || o.ToString().Length == 0)
                {
                    return(0);
                }
                return((int)o);
            }
            return(0);
        }
Ejemplo n.º 3
0
        private double GetDoubleValue(DataRow2 row, int colInd)
        {
            bool   isInt    = columnTypes[colInd] == ColumnType.Integer;
            bool   isDouble = IsNumeric(colInd);
            object o        = row[colInd];

            if (isInt || isDouble)
            {
                if (o == null || o is DBNull || o.ToString().Length == 0)
                {
                    return(double.NaN);
                }
                if (isInt)
                {
                    return((int)o);
                }
                return((double)o);
            }
            return(double.NaN);
        }
Ejemplo n.º 4
0
 public void RemoveRow(DataRow2 row)
 {
     Rows.Remove(row);
 }
Ejemplo n.º 5
0
 public void InsertRow(int index, DataRow2 row)
 {
     Rows.Insert(index, row);
 }
Ejemplo n.º 6
0
 public void AddRow(DataRow2 row)
 {
     Rows.Add(row);
 }
Ejemplo n.º 7
0
 public void AddRow(DataRow2 row)
 {
     Rows.Add(row);
 }
Ejemplo n.º 8
0
 private int GetIntValue(DataRow2 row, int colInd)
 {
     bool isInt = columnTypes[colInd] == ColumnType.Integer;
     object o = row[colInd];
     if (isInt){
         if (o == null || o is DBNull || o.ToString().Length == 0){
             return 0;
         }
         return (int) o;
     }
     return 0;
 }
Ejemplo n.º 9
0
 private double GetDoubleValue(DataRow2 row, int colInd)
 {
     bool isInt = columnTypes[colInd] == ColumnType.Integer;
     bool isDouble = IsNumeric(colInd);
     object o = row[colInd];
     if (isInt || isDouble){
         if (o == null || o is DBNull || o.ToString().Length == 0){
             return double.NaN;
         }
         if (isInt){
             return (int) o;
         }
         return (double) o;
     }
     return double.NaN;
 }
Ejemplo n.º 10
0
 public void RemoveRow(DataRow2 row)
 {
     Rows.Remove(row);
 }
Ejemplo n.º 11
0
 public void InsertRow(int index, DataRow2 row)
 {
     Rows.Insert(index, row);
 }