/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromInvserialscriteria(ref DataRow row, Invserialscriteria entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("abs_num", entity.absNum); row.SetField("bin_num", entity.binNum); row.SetField("pallet_id", entity.palletId); row.SetField("serialsuserfield", entity.serialsuserfield); row.SetField("userfield", entity.userfield); }
public static Invserialscriteria BuildInvserialscriteriaFromRow(DataRow row) { Invserialscriteria entity = new Invserialscriteria(); entity.coNum = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num"); entity.whNum = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num"); entity.absNum = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num"); entity.binNum = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num"); entity.palletId = row.IsNull("pallet_id") ? string.Empty : row.Field <string>("pallet_id"); entity.serialsuserfield = row.IsNull("serialsuserfield") ? string.Empty : row.Field <string>("serialsuserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }