Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOrdercartonresults(ref DataRow row, Ordercartonresults entity)
 {
     row.SetField("batch", entity.batch);
     row.SetField("order", entity.order);
     row.SetField("order_suffix", entity.orderSuffix);
     row.SetField("carton_id", entity.cartonId);
     row.SetField("tracking_id", entity.trackingId);
     row.SetField("carrier_id", entity.carrierId);
     row.SetField("row_status", entity.rowStatus);
     row.SetField("sequence", entity.sequence);
     row.SetField("box_id", entity.boxId);
     row.SetField("weight", entity.weight);
     row.SetField("pallet_id", entity.palletId);
     row.SetField("cartonmstRowid", entity.cartonmstRowid.ToByteArray());
     row.SetField("ordercartonresultsuserfield", entity.ordercartonresultsuserfield);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Ordercartonresults BuildOrdercartonresultsFromRow(DataRow row)
        {
            Ordercartonresults entity = new Ordercartonresults();

            entity.batch          = row.IsNull("batch") ? 0 : row.Field <int>("batch");
            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.cartonId       = row.IsNull("carton_id") ? string.Empty : row.Field <string>("carton_id");
            entity.trackingId     = row.IsNull("tracking_id") ? string.Empty : row.Field <string>("tracking_id");
            entity.carrierId      = row.IsNull("carrier_id") ? string.Empty : row.Field <string>("carrier_id");
            entity.rowStatus      = row.IsNull("row_status") ? string.Empty : row.Field <string>("row_status");
            entity.sequence       = row.IsNull("sequence") ? 0 : row.Field <int>("sequence");
            entity.boxId          = row.IsNull("box_id") ? string.Empty : row.Field <string>("box_id");
            entity.weight         = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight");
            entity.palletId       = row.IsNull("pallet_id") ? string.Empty : row.Field <string>("pallet_id");
            entity.cartonmstRowid = row.Field <byte[]>("cartonmstRowid").ToStringEncoded();
            entity.ordercartonresultsuserfield = row.IsNull("ordercartonresultsuserfield") ? string.Empty : row.Field <string>("ordercartonresultsuserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }