Example #1
0
 public virtual void resetRefs()
 {
     foreach (DataTable tab in getDataSet().Tables)
     {
         foreach (DataRow row in tab.Rows)
         {
             ToolCell.set(row, TableDUMMY.ID, ToolCell.getCellTypeDefaulValue(tab.Columns[TableDUMMY.ID].DataType));
         }
     }
 }
Example #2
0
        protected virtual bool hasValidId(DataRow row, string col)
        {
            object defVal = ToolCell.getCellTypeDefaulValue(row.Table.Columns[col].DataType);
            object curId  = row[col];

            if (ToolCell.isNull(curId) || ToolType.isEqual(defVal, curId))
            {
                return(false);
            }
            return(true);
        }
Example #3
0
 public virtual void setAdded()
 {
     getDataSet().AcceptChanges();
     foreach (DataTable tab in getDataSet().Tables)
     {
         foreach (DataRow row in tab.Rows)
         {
             row.SetAdded();
             ToolCell.set(row, TableDUMMY.ID, ToolCell.getCellTypeDefaulValue(tab.Columns[TableDUMMY.ID].DataType));
         }
     }
 }
 public void set(DataRow pRow)
 {
     if (pRow != null)
     {
         foreach (DataColumn col in pRow.Table.Columns)
         {
             if (Array.IndexOf <string>(cols, col.ColumnName) < 0)
             {
                 ToolCell.set(pRow, col.ColumnName, ToolCell.getCellTypeDefaulValue(col.DataType));
             }
         }
     }
 }