Example #1
0
        public static Locationresults BuildLocationresultsFromRow(DataRow row)
        {
            Locationresults entity = new Locationresults();

            entity.abc                      = row.IsNull("abc") ? string.Empty : row.Field <string>("abc");
            entity.abcPending               = row.IsNull("abc_pending") ? string.Empty : row.Field <string>("abc_pending");
            entity.absNum                   = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num");
            entity.aisle                    = row.IsNull("aisle") ? 0 : row.Field <int>("aisle");
            entity.binHits                  = row.IsNull("bin_hits") ? 0 : row.Field <int>("bin_hits");
            entity.binNum                   = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num");
            entity.checkQty                 = row.Field <bool>("check_qty");
            entity.coNum                    = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.cube                     = row.IsNull("cube") ? decimal.Zero : row.Field <decimal>("cube");
            entity.cycleFlag                = row.Field <bool>("cycle_flag");
            entity.depth                    = row.IsNull("depth") ? 0 : row.Field <int>("depth");
            entity.height                   = row.IsNull("height") ? 0 : row.Field <int>("height");
            entity.inboundstgfl             = row.Field <bool>("inboundstgfl");
            entity.lastCount                = row.IsNull("last_count") ? string.Empty : row.Field <string>("last_count");
            entity.locType                  = row.IsNull("loc_type") ? string.Empty : row.Field <string>("loc_type");
            entity.maxLvl                   = row.IsNull("max_lvl") ? decimal.Zero : row.Field <decimal>("max_lvl");
            entity.maxPal                   = row.IsNull("max_pal") ? 0 : row.Field <int>("max_pal");
            entity.maxWeight                = row.IsNull("max_weight") ? 0 : row.Field <int>("max_weight");
            entity.minLvl                   = row.IsNull("min_lvl") ? decimal.Zero : row.Field <decimal>("min_lvl");
            entity.palletFootprint          = row.IsNull("pallet_footprint") ? 0 : row.Field <int>("pallet_footprint");
            entity.physical                 = row.Field <bool>("physical");
            entity.pickSequence             = row.IsNull("pick_sequence") ? 0 : row.Field <int>("pick_sequence");
            entity.primPick                 = row.Field <bool>("prim_pick");
            entity.primPickType             = row.IsNull("prim_pick_type") ? string.Empty : row.Field <string>("prim_pick_type");
            entity.putawayGroup             = row.IsNull("putaway_group") ? string.Empty : row.Field <string>("putaway_group");
            entity.repQty                   = row.IsNull("rep_qty") ? decimal.Zero : row.Field <decimal>("rep_qty");
            entity.repUnit                  = row.IsNull("rep_unit") ? string.Empty : row.Field <string>("rep_unit");
            entity.rowStatus                = row.Field <bool>("row_status");
            entity.stackHeight              = row.IsNull("stack_height") ? 0 : row.Field <int>("stack_height");
            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.whNum                    = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.whZone                   = row.IsNull("wh_zone") ? string.Empty : row.Field <string>("wh_zone");
            entity.width                    = row.IsNull("width") ? 0 : row.Field <int>("width");
            entity.binmstRowID              = row.Field <byte[]>("binmstRowID").ToStringEncoded();
            entity.updtdefzonefl            = row.Field <bool>("updtdefzonefl");
            entity.enableinventory          = row.Field <bool>("enableinventory");
            entity.enablemovement           = row.Field <bool>("enablemovement");
            entity.enablepicks              = row.Field <bool>("enablepicks");
            entity.enablereplenishment      = row.Field <bool>("enablereplenishment");
            entity.locationresultsuserfield = row.IsNull("locationresultsuserfield") ? string.Empty : row.Field <string>("locationresultsuserfield");
            entity.userfield                = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Example #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLocationresults(ref DataRow row, Locationresults entity)
 {
     row.SetField("abc", entity.abc);
     row.SetField("abc_pending", entity.abcPending);
     row.SetField("abs_num", entity.absNum);
     row.SetField("aisle", entity.aisle);
     row.SetField("bin_hits", entity.binHits);
     row.SetField("bin_num", entity.binNum);
     row.SetField("check_qty", entity.checkQty);
     row.SetField("co_num", entity.coNum);
     row.SetField("cube", entity.cube);
     row.SetField("cycle_flag", entity.cycleFlag);
     row.SetField("depth", entity.depth);
     row.SetField("height", entity.height);
     row.SetField("inboundstgfl", entity.inboundstgfl);
     row.SetField("last_count", entity.lastCount);
     row.SetField("loc_type", entity.locType);
     row.SetField("max_lvl", entity.maxLvl);
     row.SetField("max_pal", entity.maxPal);
     row.SetField("max_weight", entity.maxWeight);
     row.SetField("min_lvl", entity.minLvl);
     row.SetField("pallet_footprint", entity.palletFootprint);
     row.SetField("physical", entity.physical);
     row.SetField("pick_sequence", entity.pickSequence);
     row.SetField("prim_pick", entity.primPick);
     row.SetField("prim_pick_type", entity.primPickType);
     row.SetField("putaway_group", entity.putawayGroup);
     row.SetField("rep_qty", entity.repQty);
     row.SetField("rep_unit", entity.repUnit);
     row.SetField("row_status", entity.rowStatus);
     row.SetField("stack_height", entity.stackHeight);
     row.SetField("trans_date", entity.transDate);
     row.SetField("trans_proc", entity.transProc);
     row.SetField("trans_user", entity.transUser);
     row.SetField("wh_num", entity.whNum);
     row.SetField("wh_zone", entity.whZone);
     row.SetField("width", entity.width);
     row.SetField("binmstRowID", entity.binmstRowID.ToByteArray());
     row.SetField("updtdefzonefl", entity.updtdefzonefl);
     row.SetField("enableinventory", entity.enableinventory);
     row.SetField("enablemovement", entity.enablemovement);
     row.SetField("enablepicks", entity.enablepicks);
     row.SetField("enablereplenishment", entity.enablereplenishment);
     row.SetField("locationresultsuserfield", entity.locationresultsuserfield);
     row.SetField("userfield", entity.userfield);
 }