/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOelineoptprod(ref DataRow row, Oelineoptprod entity) { row.SetField("transtype", entity.transtype); row.SetField("orderdisp", entity.orderdisp); row.SetField("maint", entity.maint); row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("shipprod", entity.shipprod); row.SetField("userfield", entity.userfield); }
public static Oelineoptprod BuildOelineoptprodFromRow(DataRow row) { Oelineoptprod entity = new Oelineoptprod(); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.orderdisp = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp"); entity.maint = row.Field <bool>("maint"); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }