/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWavepickpicks(ref DataRow row, Wavepickpicks entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("emp_num", entity.empNum); row.SetField("batchid", entity.batchid); row.SetField("abs_num", entity.absNum); row.SetField("quantity", entity.quantity); row.SetField("order", entity.order); row.SetField("order_suffix", entity.orderSuffix); row.SetField("bin_num", entity.binNum); row.SetField("drop_date_time", entity.dropDateTime); row.SetField("userfield", entity.userfield); }
public static Wavepickpicks BuildWavepickpicksFromRow(DataRow row) { Wavepickpicks entity = new Wavepickpicks(); 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.empNum = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num"); entity.batchid = row.IsNull("batchid") ? 0 : row.Field <int>("batchid"); entity.absNum = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num"); entity.quantity = row.IsNull("quantity") ? decimal.Zero : row.Field <decimal>("quantity"); 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.binNum = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num"); entity.dropDateTime = row.IsNull("drop_date_time") ? string.Empty : row.Field <string>("drop_date_time"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }