/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromInventorylistcriteria(ref DataRow row, Inventorylistcriteria entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("bin_num", entity.binNum); row.SetField("wh_zone", entity.whZone); row.SetField("abs_num", entity.absNum); row.SetField("pallet_id", entity.palletId); row.SetField("status_code", entity.statusCode); row.SetField("qty_compare_type", entity.qtyCompareType); row.SetField("qty_compare_value", entity.qtyCompareValue); row.SetField("cycle_cnt_type", entity.cycleCntType); row.SetField("cycle_id", entity.cycleId); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("invlistuserfield", entity.invlistuserfield); row.SetField("userfield", entity.userfield); }
public static Inventorylistcriteria BuildInventorylistcriteriaFromRow(DataRow row) { Inventorylistcriteria entity = new Inventorylistcriteria(); 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.whZone = row.IsNull("wh_zone") ? string.Empty : row.Field <string>("wh_zone"); entity.absNum = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num"); entity.palletId = row.IsNull("pallet_id") ? string.Empty : row.Field <string>("pallet_id"); entity.statusCode = row.IsNull("status_code") ? string.Empty : row.Field <string>("status_code"); entity.qtyCompareType = row.IsNull("qty_compare_type") ? 0 : row.Field <int>("qty_compare_type"); entity.qtyCompareValue = row.IsNull("qty_compare_value") ? decimal.Zero : row.Field <decimal>("qty_compare_value"); entity.cycleCntType = row.IsNull("cycle_cnt_type") ? 0 : row.Field <int>("cycle_cnt_type"); entity.cycleId = row.IsNull("cycle_id") ? 0 : row.Field <int>("cycle_id"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.invlistuserfield = row.IsNull("invlistuserfield") ? string.Empty : row.Field <string>("invlistuserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }