/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVaspheadercompload(ref DataRow row, Vaspheadercompload entity) { row.SetField("shipprod", entity.shipprod); row.SetField("whse", entity.whse); row.SetField("qtyord", entity.qtyord); row.SetField("unit", entity.unit); row.SetField("version", entity.version); row.SetField("userfield", entity.userfield); }
public static Vaspheadercompload BuildVaspheadercomploadFromRow(DataRow row) { Vaspheadercompload entity = new Vaspheadercompload(); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.version = row.IsNull("version") ? 0 : row.Field <int>("version"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }