/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWmtransactionsprocessed(ref DataRow row, Wmtransactionsprocessed entity) { row.SetField("whse", entity.whse); row.SetField("binloc", entity.binloc); row.SetField("adjtype", entity.adjtype); row.SetField("prod", entity.prod); row.SetField("tobinloc", entity.tobinloc); row.SetField("quantity", entity.quantity); row.SetField("icspnotesfl", entity.icspnotesfl); row.SetField("icsplookupnm", entity.icsplookupnm); row.SetField("icspunitstock", entity.icspunitstock); row.SetField("msdsfl", entity.msdsfl); row.SetField("userfield", entity.userfield); }
public static Wmtransactionsprocessed BuildWmtransactionsprocessedFromRow(DataRow row) { Wmtransactionsprocessed entity = new Wmtransactionsprocessed(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.binloc = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc"); entity.adjtype = row.IsNull("adjtype") ? string.Empty : row.Field <string>("adjtype"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.tobinloc = row.IsNull("tobinloc") ? string.Empty : row.Field <string>("tobinloc"); entity.quantity = row.IsNull("quantity") ? decimal.Zero : row.Field <decimal>("quantity"); entity.icspnotesfl = row.IsNull("icspnotesfl") ? string.Empty : row.Field <string>("icspnotesfl"); entity.icsplookupnm = row.IsNull("icsplookupnm") ? string.Empty : row.Field <string>("icsplookupnm"); entity.icspunitstock = row.IsNull("icspunitstock") ? string.Empty : row.Field <string>("icspunitstock"); entity.msdsfl = row.Field <bool>("msdsfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }