Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWavesummaryshipments(ref DataRow row, Wavesummaryshipments entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("carrier", entity.carrier);
     row.SetField("num_of_cartons", entity.numOfCartons);
     row.SetField("num_of_shipped", entity.numOfShipped);
     row.SetField("row_id", entity.rowId.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Wavesummaryshipments BuildWavesummaryshipmentsFromRow(DataRow row)
        {
            Wavesummaryshipments entity = new Wavesummaryshipments();

            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.carrier      = row.IsNull("carrier") ? string.Empty : row.Field <string>("carrier");
            entity.numOfCartons = row.IsNull("num_of_cartons") ? 0 : row.Field <int>("num_of_cartons");
            entity.numOfShipped = row.IsNull("num_of_shipped") ? 0 : row.Field <int>("num_of_shipped");
            entity.rowId        = row.Field <byte[]>("row_id").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }