/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPhysinvseterror(ref DataRow row, Physinvseterror entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("bin_num", entity.binNum); row.SetField("abs_num", entity.absNum); row.SetField("order", entity.order); row.SetField("order_suffix", entity.orderSuffix); row.SetField("po_number", entity.poNumber); row.SetField("po_suffix", entity.poSuffix); row.SetField("date_time", entity.dateTime); row.SetField("emp_num", entity.empNum); row.SetField("userfield", entity.userfield); }
public static Physinvseterror BuildPhysinvseterrorFromRow(DataRow row) { Physinvseterror entity = new Physinvseterror(); 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.binNum = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num"); entity.absNum = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num"); entity.order = row.IsNull("order") ? string.Empty : row.Field <string>("order"); entity.orderSuffix = row.IsNull("order_suffix") ? string.Empty : row.Field <string>("order_suffix"); entity.poNumber = row.IsNull("po_number") ? string.Empty : row.Field <string>("po_number"); entity.poSuffix = row.IsNull("po_suffix") ? string.Empty : row.Field <string>("po_suffix"); entity.dateTime = row.IsNull("date_time") ? string.Empty : row.Field <string>("date_time"); entity.empNum = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }