/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromCcbuildresults(ref DataRow row, Ccbuildresults entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("wave", entity.wave); row.SetField("count", entity.count); row.SetField("userfield", entity.userfield); }
public static Ccbuildresults BuildCcbuildresultsFromRow(DataRow row) { Ccbuildresults entity = new Ccbuildresults(); entity.coNum = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num"); entity.whNum = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num"); entity.wave = row.IsNull("wave") ? 0 : row.Field <int>("wave"); entity.count = row.IsNull("count") ? 0 : row.Field <int>("count"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }