/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOefulfillmentcriteria(ref DataRow row, Oefulfillmentcriteria entity) { row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("lineno", entity.lineno); row.SetField("fulfillmentbillcd", entity.fulfillmentbillcd); row.SetField("fulfillmentstgcd", entity.fulfillmentstgcd); row.SetField("whse", entity.whse); row.SetField("shipprod", entity.shipprod); row.SetField("unit", entity.unit); row.SetField("submitenabled", entity.submitenabled); row.SetField("chgqtyenabled", entity.chgqtyenabled); row.SetField("totqtyord", entity.totqtyord); row.SetField("totqtyship", entity.totqtyship); row.SetField("overruleused", entity.overruleused); row.SetField("origruleused", entity.origruleused); row.SetField("shortstockfl", entity.shortstockfl); row.SetField("userfield", entity.userfield); }
public static Oefulfillmentcriteria BuildOefulfillmentcriteriaFromRow(DataRow row) { Oefulfillmentcriteria entity = new Oefulfillmentcriteria(); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.fulfillmentbillcd = row.IsNull("fulfillmentbillcd") ? string.Empty : row.Field <string>("fulfillmentbillcd"); entity.fulfillmentstgcd = row.IsNull("fulfillmentstgcd") ? string.Empty : row.Field <string>("fulfillmentstgcd"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.submitenabled = row.Field <bool>("submitenabled"); entity.chgqtyenabled = row.Field <bool>("chgqtyenabled"); entity.totqtyord = row.IsNull("totqtyord") ? decimal.Zero : row.Field <decimal>("totqtyord"); entity.totqtyship = row.IsNull("totqtyship") ? decimal.Zero : row.Field <decimal>("totqtyship"); entity.overruleused = row.IsNull("overruleused") ? string.Empty : row.Field <string>("overruleused"); entity.origruleused = row.IsNull("origruleused") ? string.Empty : row.Field <string>("origruleused"); entity.shortstockfl = row.Field <bool>("shortstockfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }