/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcepeserlotinitsingle(ref DataRow row, Icepeserlotinitsingle entity) { row.SetField("whse", entity.whse); row.SetField("prod", entity.prod); row.SetField("proddesc", entity.proddesc); row.SetField("proof", entity.proof); row.SetField("unit", entity.unit); row.SetField("userfield", entity.userfield); }
public static Icepeserlotinitsingle BuildIcepeserlotinitsingleFromRow(DataRow row) { Icepeserlotinitsingle entity = new Icepeserlotinitsingle(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.proof = row.IsNull("proof") ? decimal.Zero : row.Field <decimal>("proof"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }