/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromBarcodeidresults(ref DataRow row, Barcodeidresults entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("vendor_id", entity.vendorId); row.SetField("barcode_id", entity.barcodeId); row.SetField("barcodemstrowid", entity.barcodemstrowid.ToByteArray()); row.SetField("barcodeidresultsuserfield", entity.barcodeidresultsuserfield); row.SetField("userfield", entity.userfield); }
public static Barcodeidresults BuildBarcodeidresultsFromRow(DataRow row) { Barcodeidresults entity = new Barcodeidresults(); 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.vendorId = row.IsNull("vendor_id") ? string.Empty : row.Field <string>("vendor_id"); entity.barcodeId = row.IsNull("barcode_id") ? string.Empty : row.Field <string>("barcode_id"); entity.barcodemstrowid = row.Field <byte[]>("barcodemstrowid").ToStringEncoded(); entity.barcodeidresultsuserfield = row.IsNull("barcodeidresultsuserfield") ? string.Empty : row.Field <string>("barcodeidresultsuserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }