Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSerialhistorylist(ref DataRow row, Serialhistorylist entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("abs_num", entity.absNum);
     row.SetField("order", entity.order);
     row.SetField("order_suffix", entity.orderSuffix);
     row.SetField("lot", entity.lot);
     row.SetField("line", entity.line);
     row.SetField("line_sequence", entity.lineSequence);
     row.SetField("type", entity.type);
     row.SetField("serial_num", entity.serialNum);
     row.SetField("rma", entity.rma);
     row.SetField("pick_id", entity.pickId);
     row.SetField("rowId", entity.rowId.ToByteArray());
     row.SetField("serialhistorylistuserfield", entity.serialhistorylistuserfield);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Serialhistorylist BuildSerialhistorylistFromRow(DataRow row)
        {
            Serialhistorylist entity = new Serialhistorylist();

            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.absNum       = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_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.lot          = row.IsNull("lot") ? string.Empty : row.Field <string>("lot");
            entity.line         = row.IsNull("line") ? 0 : row.Field <int>("line");
            entity.lineSequence = row.IsNull("line_sequence") ? 0 : row.Field <int>("line_sequence");
            entity.type         = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.serialNum    = row.IsNull("serial_num") ? string.Empty : row.Field <string>("serial_num");
            entity.rma          = row.IsNull("rma") ? string.Empty : row.Field <string>("rma");
            entity.pickId       = row.IsNull("pick_id") ? 0 : row.Field <int>("pick_id");
            entity.rowId        = row.Field <byte[]>("rowId").ToStringEncoded();
            entity.serialhistorylistuserfield = row.IsNull("serialhistorylistuserfield") ? string.Empty : row.Field <string>("serialhistorylistuserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }