Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWavesummaryzones(ref DataRow row, Wavesummaryzones entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("wh_zone", entity.whZone);
     row.SetField("pick_sequence", entity.pickSequence);
     row.SetField("zone_desc", entity.zoneDesc);
     row.SetField("units", entity.units);
     row.SetField("locs", entity.locs);
     row.SetField("qty", entity.qty);
     row.SetField("qty_open", entity.qtyOpen);
     row.SetField("qty_inpick", entity.qtyInpick);
     row.SetField("qty_packed", entity.qtyPacked);
     row.SetField("altwhse", entity.altwhse);
     row.SetField("row_id", entity.rowId.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Wavesummaryzones BuildWavesummaryzonesFromRow(DataRow row)
        {
            Wavesummaryzones entity = new Wavesummaryzones();

            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.whZone       = row.IsNull("wh_zone") ? string.Empty : row.Field <string>("wh_zone");
            entity.pickSequence = row.IsNull("pick_sequence") ? 0 : row.Field <int>("pick_sequence");
            entity.zoneDesc     = row.IsNull("zone_desc") ? string.Empty : row.Field <string>("zone_desc");
            entity.units        = row.IsNull("units") ? decimal.Zero : row.Field <decimal>("units");
            entity.locs         = row.IsNull("locs") ? 0 : row.Field <int>("locs");
            entity.qty          = row.IsNull("qty") ? 0 : row.Field <int>("qty");
            entity.qtyOpen      = row.IsNull("qty_open") ? 0 : row.Field <int>("qty_open");
            entity.qtyInpick    = row.IsNull("qty_inpick") ? 0 : row.Field <int>("qty_inpick");
            entity.qtyPacked    = row.IsNull("qty_packed") ? 0 : row.Field <int>("qty_packed");
            entity.altwhse      = row.IsNull("altwhse") ? string.Empty : row.Field <string>("altwhse");
            entity.rowId        = row.Field <byte[]>("row_id").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }