/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromBinlocationresults(ref DataRow row, Binlocationresults entity) { row.SetField("bin_num", entity.binNum); row.SetField("wh_zone", entity.whZone); row.SetField("prim_pick", entity.primPick); row.SetField("prim_pick_type", entity.primPickType); row.SetField("abs_num", entity.absNum); row.SetField("binmstrowid", entity.binmstrowid.ToByteArray()); row.SetField("binlocationresultsuserfield", entity.binlocationresultsuserfield); row.SetField("userfield", entity.userfield); }
public static Binlocationresults BuildBinlocationresultsFromRow(DataRow row) { Binlocationresults entity = new Binlocationresults(); entity.binNum = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num"); entity.whZone = row.IsNull("wh_zone") ? string.Empty : row.Field <string>("wh_zone"); entity.primPick = row.Field <bool>("prim_pick"); entity.primPickType = row.IsNull("prim_pick_type") ? string.Empty : row.Field <string>("prim_pick_type"); entity.absNum = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num"); entity.binmstrowid = row.Field <byte[]>("binmstrowid").ToStringEncoded(); entity.binlocationresultsuserfield = row.IsNull("binlocationresultsuserfield") ? string.Empty : row.Field <string>("binlocationresultsuserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }