Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOmorderdroplist(ref DataRow row, Omorderdroplist entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("order", entity.order);
     row.SetField("order_suffix", entity.orderSuffix);
     row.SetField("assigned", entity.assigned);
     row.SetField("id", entity.id);
     row.SetField("class", entity.@class);
     row.SetField("rv_qty_remaining", entity.rvQtyRemaining);
     row.SetField("paramTwentyOverride", entity.paramTwentyOverride);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Omorderdroplist BuildOmorderdroplistFromRow(DataRow row)
        {
            Omorderdroplist entity = new Omorderdroplist();

            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.order               = row.IsNull("order") ? string.Empty : row.Field <string>("order");
            entity.orderSuffix         = row.IsNull("order_suffix") ? string.Empty : row.Field <string>("order_suffix");
            entity.assigned            = row.Field <bool>("assigned");
            entity.id                  = row.IsNull("id") ? 0 : row.Field <int>("id");
            entity.@class              = row.IsNull("class") ? string.Empty : row.Field <string>("class");
            entity.rvQtyRemaining      = row.IsNull("rv_qty_remaining") ? decimal.Zero : row.Field <decimal>("rv_qty_remaining");
            entity.paramTwentyOverride = row.IsNull("paramTwentyOverride") ? 0 : row.Field <int>("paramTwentyOverride");
            entity.rowid               = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield           = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }