Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromReplother(ref DataRow row, Replother entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("abs_num", entity.absNum);
     row.SetField("item_area", entity.itemArea);
     row.SetField("item_zone", entity.itemZone);
     row.SetField("item_group", entity.itemGroup);
     row.SetField("bin_num", entity.binNum);
     row.SetField("bin_area", entity.binArea);
     row.SetField("bin_zone", entity.binZone);
     row.SetField("bin_group", entity.binGroup);
     row.SetField("num_locations", entity.numLocations);
     row.SetField("qtyonhand", entity.qtyonhand);
     row.SetField("lot", entity.lot);
     row.SetField("pallet_id", entity.palletId);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Replother BuildReplotherFromRow(DataRow row)
        {
            Replother entity = new Replother();

            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.itemArea     = row.IsNull("item_area") ? string.Empty : row.Field <string>("item_area");
            entity.itemZone     = row.IsNull("item_zone") ? string.Empty : row.Field <string>("item_zone");
            entity.itemGroup    = row.IsNull("item_group") ? string.Empty : row.Field <string>("item_group");
            entity.binNum       = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num");
            entity.binArea      = row.IsNull("bin_area") ? string.Empty : row.Field <string>("bin_area");
            entity.binZone      = row.IsNull("bin_zone") ? string.Empty : row.Field <string>("bin_zone");
            entity.binGroup     = row.IsNull("bin_group") ? string.Empty : row.Field <string>("bin_group");
            entity.numLocations = row.IsNull("num_locations") ? 0 : row.Field <int>("num_locations");
            entity.qtyonhand    = row.IsNull("qtyonhand") ? decimal.Zero : row.Field <decimal>("qtyonhand");
            entity.lot          = row.IsNull("lot") ? string.Empty : row.Field <string>("lot");
            entity.palletId     = row.IsNull("pallet_id") ? string.Empty : row.Field <string>("pallet_id");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }