/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOemultilinecreateprodlist(ref DataRow row, Oemultilinecreateprodlist entity) { row.SetField("seqno", entity.seqno); row.SetField("prod", entity.prod); row.SetField("qtyord", entity.qtyord); row.SetField("unit", entity.unit); row.SetField("price", entity.price); row.SetField("priceoverfl", entity.priceoverfl); row.SetField("discamt", entity.discamt); row.SetField("disctype", entity.disctype); row.SetField("discoverfl", entity.discoverfl); }
public static Oemultilinecreateprodlist BuildOemultilinecreateprodlistFromRow(DataRow row) { Oemultilinecreateprodlist entity = new Oemultilinecreateprodlist(); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.price = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price"); entity.priceoverfl = row.Field <bool>("priceoverfl"); entity.discamt = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt"); entity.disctype = row.Field <bool>("disctype"); entity.discoverfl = row.Field <bool>("discoverfl"); return(entity); }