Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWavesummarycartons(ref DataRow row, Wavesummarycartons entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("carton_id", entity.cartonId);
     row.SetField("row_status", entity.rowStatus);
     row.SetField("last_order", entity.lastOrder);
     row.SetField("last_order_suffix", entity.lastOrderSuffix);
     row.SetField("carrier_id", entity.carrierId);
     row.SetField("box_id", entity.boxId);
     row.SetField("tracking_id", entity.trackingId);
     row.SetField("row_id", entity.rowId.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Wavesummarycartons BuildWavesummarycartonsFromRow(DataRow row)
        {
            Wavesummarycartons entity = new Wavesummarycartons();

            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.cartonId        = row.IsNull("carton_id") ? string.Empty : row.Field <string>("carton_id");
            entity.rowStatus       = row.IsNull("row_status") ? string.Empty : row.Field <string>("row_status");
            entity.lastOrder       = row.IsNull("last_order") ? string.Empty : row.Field <string>("last_order");
            entity.lastOrderSuffix = row.IsNull("last_order_suffix") ? string.Empty : row.Field <string>("last_order_suffix");
            entity.carrierId       = row.IsNull("carrier_id") ? string.Empty : row.Field <string>("carrier_id");
            entity.boxId           = row.IsNull("box_id") ? string.Empty : row.Field <string>("box_id");
            entity.trackingId      = row.IsNull("tracking_id") ? string.Empty : row.Field <string>("tracking_id");
            entity.rowId           = row.Field <byte[]>("row_id").ToStringEncoded();
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }