Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdemcolumncalculator(ref DataRow row, Pdemcolumncalculator entity)
 {
     row.SetField("Formula", entity.formula);
     row.SetField("ColumnLabels", entity.columnLabels);
     row.SetField("ColumnTypes", entity.columnTypes);
     row.SetField("UpdateColumn", entity.updateColumn);
     row.SetField("formulavalidated", entity.formulavalidated);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Pdemcolumncalculator BuildPdemcolumncalculatorFromRow(DataRow row)
        {
            Pdemcolumncalculator entity = new Pdemcolumncalculator();

            entity.formula          = row.IsNull("Formula") ? string.Empty : row.Field <string>("Formula");
            entity.columnLabels     = row.IsNull("ColumnLabels") ? string.Empty : row.Field <string>("ColumnLabels");
            entity.columnTypes      = row.IsNull("ColumnTypes") ? string.Empty : row.Field <string>("ColumnTypes");
            entity.updateColumn     = row.IsNull("UpdateColumn") ? string.Empty : row.Field <string>("UpdateColumn");
            entity.formulavalidated = row.Field <bool>("formulavalidated");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }