/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromItemdetail(ref DataRow row, Itemdetail entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("abs_num", entity.absNum); row.SetField("item_num", entity.itemNum); row.SetField("prod_grp", entity.prodGrp); row.SetField("prod_line", entity.prodLine); row.SetField("prod_subline", entity.prodSubline); row.SetField("rtn_category", entity.rtnCategory); row.SetField("upc_num", entity.upcNum); row.SetField("item_desc", entity.itemDesc); row.SetField("item_sec_desc", entity.itemSecDesc); row.SetField("item_long_desc", entity.itemLongDesc); row.SetField("uom", entity.uom); row.SetField("box_qty", entity.boxQty); row.SetField("max_lvl", entity.maxLvl); row.SetField("min_lvl", entity.minLvl); row.SetField("reo_qty", entity.reoQty); row.SetField("wh_zone", entity.whZone); row.SetField("aisle", entity.aisle); row.SetField("last_count", entity.lastCount); row.SetField("abc", entity.abc); row.SetField("item_type", entity.itemType); row.SetField("msds_flag", entity.msdsFlag); row.SetField("serial_flag", entity.serialFlag); row.SetField("serial_by_location", entity.serialByLocation); row.SetField("serial_outbound", entity.serialOutbound); row.SetField("serial_inbound", entity.serialInbound); row.SetField("lot_ctrl", entity.lotCtrl); row.SetField("kit_flag", entity.kitFlag); row.SetField("shelf_life_flag", entity.shelfLifeFlag); row.SetField("shelf_life", entity.shelfLife); row.SetField("length", entity.length); row.SetField("height", entity.height); row.SetField("width", entity.width); row.SetField("cube", entity.cube); row.SetField("weight", entity.weight); row.SetField("dim_weight", entity.dimWeight); row.SetField("acceptable_over", entity.acceptableOver); row.SetField("self_ship", entity.selfShip); row.SetField("qa_inspection", entity.qaInspection); row.SetField("qa_instructions", entity.qaInstructions); row.SetField("drop_ship", entity.dropShip); row.SetField("force_ship", entity.forceShip); row.SetField("expiration_from", entity.expirationFrom); row.SetField("rcv_threshold", entity.rcvThreshold); row.SetField("shp_threshold", entity.shpThreshold); row.SetField("unavailable_at", entity.unavailableAt); row.SetField("same_lot", entity.sameLot); row.SetField("counter_zone", entity.counterZone); row.SetField("kit_build_zone", entity.kitBuildZone); row.SetField("msds_sheet", entity.msdsSheet); row.SetField("msds_sheet_bin", entity.msdsSheetBin); row.SetField("msds_send_always", entity.msdsSendAlways); row.SetField("country_of_origin", entity.countryOfOrigin); row.SetField("xxde5", entity.xxde5); row.SetField("xxde4", entity.xxde4); row.SetField("cust_code", entity.custCode); row.SetField("stack_height", entity.stackHeight); row.SetField("row_status", entity.rowStatus); row.SetField("labor_auto_ship", entity.laborAutoShip); row.SetField("case_quantity", entity.caseQuantity); row.SetField("pallet_quantity", entity.palletQuantity); row.SetField("trans_user", entity.transUser); row.SetField("abc_pending", entity.abcPending); row.SetField("trans_date", entity.transDate); row.SetField("trans_proc", entity.transProc); row.SetField("putaway_group", entity.putawayGroup); row.SetField("qtyAvail", entity.qtyAvail); row.SetField("qtyUnavail", entity.qtyUnavail); row.SetField("qtyReserved", entity.qtyReserved); row.SetField("qtyInTransit", entity.qtyInTransit); row.SetField("qtyOnHand", entity.qtyOnHand); row.SetField("qtyDemand", entity.qtyDemand); row.SetField("qtyTotalInInv", entity.qtyTotalInInv); row.SetField("is_avail_enabled", entity.isAvailEnabled); row.SetField("is_unavail_enabled", entity.isUnavailEnabled); row.SetField("is_reserved_enabled", entity.isReservedEnabled); row.SetField("is_intransit_enabled", entity.isIntransitEnabled); row.SetField("is_outord_enabled", entity.isOutordEnabled); row.SetField("is_altwhse_enabled", entity.isAltwhseEnabled); row.SetField("is_transaction_enabled", entity.isTransactionEnabled); row.SetField("is_item_history_enabled", entity.isItemHistoryEnabled); row.SetField("whole_ship_flag", entity.wholeShipFlag); row.SetField("rowID", entity.rowID.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Itemdetail BuildItemdetailFromRow(DataRow row) { Itemdetail entity = new Itemdetail(); 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.itemNum = row.IsNull("item_num") ? string.Empty : row.Field <string>("item_num"); entity.prodGrp = row.IsNull("prod_grp") ? string.Empty : row.Field <string>("prod_grp"); entity.prodLine = row.IsNull("prod_line") ? string.Empty : row.Field <string>("prod_line"); entity.prodSubline = row.IsNull("prod_subline") ? string.Empty : row.Field <string>("prod_subline"); entity.rtnCategory = row.IsNull("rtn_category") ? string.Empty : row.Field <string>("rtn_category"); entity.upcNum = row.IsNull("upc_num") ? string.Empty : row.Field <string>("upc_num"); entity.itemDesc = row.IsNull("item_desc") ? string.Empty : row.Field <string>("item_desc"); entity.itemSecDesc = row.IsNull("item_sec_desc") ? string.Empty : row.Field <string>("item_sec_desc"); entity.itemLongDesc = row.IsNull("item_long_desc") ? string.Empty : row.Field <string>("item_long_desc"); entity.uom = row.IsNull("uom") ? string.Empty : row.Field <string>("uom"); entity.boxQty = row.IsNull("box_qty") ? 0 : row.Field <int>("box_qty"); entity.maxLvl = row.IsNull("max_lvl") ? decimal.Zero : row.Field <decimal>("max_lvl"); entity.minLvl = row.IsNull("min_lvl") ? decimal.Zero : row.Field <decimal>("min_lvl"); entity.reoQty = row.IsNull("reo_qty") ? decimal.Zero : row.Field <decimal>("reo_qty"); entity.whZone = row.IsNull("wh_zone") ? string.Empty : row.Field <string>("wh_zone"); entity.aisle = row.IsNull("aisle") ? 0 : row.Field <int>("aisle"); entity.lastCount = row.IsNull("last_count") ? string.Empty : row.Field <string>("last_count"); entity.abc = row.IsNull("abc") ? string.Empty : row.Field <string>("abc"); entity.itemType = row.IsNull("item_type") ? string.Empty : row.Field <string>("item_type"); entity.msdsFlag = row.Field <bool>("msds_flag"); entity.serialFlag = row.Field <bool>("serial_flag"); entity.serialByLocation = row.Field <bool>("serial_by_location"); entity.serialOutbound = row.Field <bool>("serial_outbound"); entity.serialInbound = row.Field <bool>("serial_inbound"); entity.lotCtrl = row.Field <bool>("lot_ctrl"); entity.kitFlag = row.Field <bool>("kit_flag"); entity.shelfLifeFlag = row.Field <bool>("shelf_life_flag"); entity.shelfLife = row.IsNull("shelf_life") ? 0 : row.Field <int>("shelf_life"); entity.length = row.IsNull("length") ? decimal.Zero : row.Field <decimal>("length"); entity.height = row.IsNull("height") ? decimal.Zero : row.Field <decimal>("height"); entity.width = row.IsNull("width") ? decimal.Zero : row.Field <decimal>("width"); entity.cube = row.IsNull("cube") ? decimal.Zero : row.Field <decimal>("cube"); entity.weight = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight"); entity.dimWeight = row.IsNull("dim_weight") ? decimal.Zero : row.Field <decimal>("dim_weight"); entity.acceptableOver = row.IsNull("acceptable_over") ? 0 : row.Field <int>("acceptable_over"); entity.selfShip = row.Field <bool>("self_ship"); entity.qaInspection = row.Field <bool>("qa_inspection"); entity.qaInstructions = row.IsNull("qa_instructions") ? string.Empty : row.Field <string>("qa_instructions"); entity.dropShip = row.Field <bool>("drop_ship"); entity.forceShip = row.Field <bool>("force_ship"); entity.expirationFrom = row.IsNull("expiration_from") ? string.Empty : row.Field <string>("expiration_from"); entity.rcvThreshold = row.IsNull("rcv_threshold") ? 0 : row.Field <int>("rcv_threshold"); entity.shpThreshold = row.IsNull("shp_threshold") ? 0 : row.Field <int>("shp_threshold"); entity.unavailableAt = row.IsNull("unavailable_at") ? string.Empty : row.Field <string>("unavailable_at"); entity.sameLot = row.Field <bool>("same_lot"); entity.counterZone = row.IsNull("counter_zone") ? string.Empty : row.Field <string>("counter_zone"); entity.kitBuildZone = row.IsNull("kit_build_zone") ? string.Empty : row.Field <string>("kit_build_zone"); entity.msdsSheet = row.IsNull("msds_sheet") ? string.Empty : row.Field <string>("msds_sheet"); entity.msdsSheetBin = row.IsNull("msds_sheet_bin") ? string.Empty : row.Field <string>("msds_sheet_bin"); entity.msdsSendAlways = row.Field <bool>("msds_send_always"); entity.countryOfOrigin = row.Field <bool>("country_of_origin"); entity.xxde5 = row.IsNull("xxde5") ? decimal.Zero : row.Field <decimal>("xxde5"); entity.xxde4 = row.IsNull("xxde4") ? decimal.Zero : row.Field <decimal>("xxde4"); entity.custCode = row.IsNull("cust_code") ? string.Empty : row.Field <string>("cust_code"); entity.stackHeight = row.IsNull("stack_height") ? 0 : row.Field <int>("stack_height"); entity.rowStatus = row.Field <bool>("row_status"); entity.laborAutoShip = row.IsNull("labor_auto_ship") ? string.Empty : row.Field <string>("labor_auto_ship"); entity.caseQuantity = row.IsNull("case_quantity") ? decimal.Zero : row.Field <decimal>("case_quantity"); entity.palletQuantity = row.IsNull("pallet_quantity") ? decimal.Zero : row.Field <decimal>("pallet_quantity"); entity.transUser = row.IsNull("trans_user") ? string.Empty : row.Field <string>("trans_user"); entity.abcPending = row.IsNull("abc_pending") ? string.Empty : row.Field <string>("abc_pending"); entity.transDate = row.IsNull("trans_date") ? string.Empty : row.Field <string>("trans_date"); entity.transProc = row.IsNull("trans_proc") ? string.Empty : row.Field <string>("trans_proc"); entity.putawayGroup = row.IsNull("putaway_group") ? string.Empty : row.Field <string>("putaway_group"); entity.qtyAvail = row.IsNull("qtyAvail") ? decimal.Zero : row.Field <decimal>("qtyAvail"); entity.qtyUnavail = row.IsNull("qtyUnavail") ? decimal.Zero : row.Field <decimal>("qtyUnavail"); entity.qtyReserved = row.IsNull("qtyReserved") ? decimal.Zero : row.Field <decimal>("qtyReserved"); entity.qtyInTransit = row.IsNull("qtyInTransit") ? decimal.Zero : row.Field <decimal>("qtyInTransit"); entity.qtyOnHand = row.IsNull("qtyOnHand") ? decimal.Zero : row.Field <decimal>("qtyOnHand"); entity.qtyDemand = row.IsNull("qtyDemand") ? decimal.Zero : row.Field <decimal>("qtyDemand"); entity.qtyTotalInInv = row.IsNull("qtyTotalInInv") ? decimal.Zero : row.Field <decimal>("qtyTotalInInv"); entity.isAvailEnabled = row.Field <bool>("is_avail_enabled"); entity.isUnavailEnabled = row.Field <bool>("is_unavail_enabled"); entity.isReservedEnabled = row.Field <bool>("is_reserved_enabled"); entity.isIntransitEnabled = row.Field <bool>("is_intransit_enabled"); entity.isOutordEnabled = row.Field <bool>("is_outord_enabled"); entity.isAltwhseEnabled = row.Field <bool>("is_altwhse_enabled"); entity.isTransactionEnabled = row.Field <bool>("is_transaction_enabled"); entity.isItemHistoryEnabled = row.Field <bool>("is_item_history_enabled"); entity.wholeShipFlag = row.Field <bool>("whole_ship_flag"); entity.rowID = row.Field <byte[]>("rowID").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }