Ejemplo n.º 1
0
        public static Inventorylistresults BuildInventorylistresultsFromRow(DataRow row)
        {
            Inventorylistresults entity = new Inventorylistresults();

            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.totalQty             = row.IsNull("total_qty") ? decimal.Zero : row.Field <decimal>("total_qty");
            entity.binNum               = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num");
            entity.palletId             = row.IsNull("pallet_id") ? string.Empty : row.Field <string>("pallet_id");
            entity.stockStat            = row.IsNull("stock_stat") ? string.Empty : row.Field <string>("stock_stat");
            entity.dateTime             = row.IsNull("date_time") ? string.Empty : row.Field <string>("date_time");
            entity.lot                  = row.IsNull("lot") ? string.Empty : row.Field <string>("lot");
            entity.expiration           = row.Field <DateTime?>("expiration");
            entity.caseQuantity         = row.IsNull("case_quantity") ? decimal.Zero : row.Field <decimal>("case_quantity");
            entity.cycleFlag            = row.Field <bool>("cycle_flag");
            entity.descrip              = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.descrip2             = row.IsNull("descrip2") ? string.Empty : row.Field <string>("descrip2");
            entity.attributes           = row.IsNull("attributes") ? string.Empty : row.Field <string>("attributes");
            entity.cargoControl         = row.IsNull("cargo_control") ? string.Empty : row.Field <string>("cargo_control");
            entity.countryCode          = row.IsNull("country_code") ? string.Empty : row.Field <string>("country_code");
            entity.crossDockOrder       = row.IsNull("cross_dock_order") ? string.Empty : row.Field <string>("cross_dock_order");
            entity.crossDockOrderSuffix = row.IsNull("cross_dock_order_suffix") ? string.Empty : row.Field <string>("cross_dock_order_suffix");
            entity.customData1          = row.IsNull("custom_data1") ? string.Empty : row.Field <string>("custom_data1");
            entity.customData2          = row.IsNull("custom_data2") ? string.Empty : row.Field <string>("custom_data2");
            entity.customData3          = row.IsNull("custom_data3") ? string.Empty : row.Field <string>("custom_data3");
            entity.customData4          = row.IsNull("custom_data4") ? string.Empty : row.Field <string>("custom_data4");
            entity.customData5          = row.IsNull("custom_data5") ? string.Empty : row.Field <string>("custom_data5");
            entity.cycleEmpNum          = row.IsNull("cycle_emp_num") ? string.Empty : row.Field <string>("cycle_emp_num");
            entity.cycleId              = row.IsNull("cycle_id") ? 0 : row.Field <int>("cycle_id");
            entity.cycleLevel           = row.IsNull("cycle_level") ? string.Empty : row.Field <string>("cycle_level");
            entity.empNum               = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.id             = row.IsNull("id") ? 0 : row.Field <int>("id");
            entity.nsComment      = row.IsNull("ns_comment") ? string.Empty : row.Field <string>("ns_comment");
            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.reservedQty    = row.IsNull("reserved_qty") ? decimal.Zero : row.Field <decimal>("reserved_qty");
            entity.rtnCategory    = row.IsNull("rtn_category") ? string.Empty : row.Field <string>("rtn_category");
            entity.rtnPalletFull  = row.Field <bool>("rtn_pallet_full");
            entity.suggestedBin   = row.IsNull("suggested_bin") ? string.Empty : row.Field <string>("suggested_bin");
            entity.taskId         = row.IsNull("task_id") ? 0 : row.Field <int>("task_id");
            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.transUser      = row.IsNull("trans_user") ? string.Empty : row.Field <string>("trans_user");
            entity.truckId        = row.IsNull("truck_id") ? string.Empty : row.Field <string>("truck_id");
            entity.uom            = row.IsNull("uom") ? string.Empty : row.Field <string>("uom");
            entity.vendorId       = row.IsNull("vendor_id") ? string.Empty : row.Field <string>("vendor_id");
            entity.whZone         = row.IsNull("wh_zone") ? string.Empty : row.Field <string>("wh_zone");
            entity.reserved       = row.IsNull("reserved") ? decimal.Zero : row.Field <decimal>("reserved");
            entity.availQty       = row.IsNull("avail_qty") ? decimal.Zero : row.Field <decimal>("avail_qty");
            entity.itemRowID      = row.Field <byte[]>("itemRowID").ToStringEncoded();
            entity.binmstRowID    = row.Field <byte[]>("binmstRowID").ToStringEncoded();
            entity.inventoryRowID = row.Field <byte[]>("inventoryRowID").ToStringEncoded();
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }