コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromItemoutord(ref DataRow row, Itemoutord entity)
 {
     row.SetField("order", entity.order);
     row.SetField("order_suffix", entity.orderSuffix);
     row.SetField("order_date", entity.orderDate);
     row.SetField("req_qty", entity.reqQty);
     row.SetField("altWhse", entity.altWhse);
     row.SetField("same_lot", entity.sameLot);
     row.SetField("lot", entity.lot);
     row.SetField("assigned", entity.assigned);
     row.SetField("printed", entity.printed);
     row.SetField("statusName", entity.statusName);
     row.SetField("itemoutorduserfield", entity.itemoutorduserfield);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Itemoutord BuildItemoutordFromRow(DataRow row)
        {
            Itemoutord entity = new Itemoutord();

            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.orderDate           = row.Field <DateTime?>("order_date");
            entity.reqQty              = row.IsNull("req_qty") ? decimal.Zero : row.Field <decimal>("req_qty");
            entity.altWhse             = row.IsNull("altWhse") ? string.Empty : row.Field <string>("altWhse");
            entity.sameLot             = row.Field <bool>("same_lot");
            entity.lot                 = row.IsNull("lot") ? string.Empty : row.Field <string>("lot");
            entity.assigned            = row.Field <bool>("assigned");
            entity.printed             = row.Field <bool>("printed");
            entity.statusName          = row.IsNull("statusName") ? string.Empty : row.Field <string>("statusName");
            entity.itemoutorduserfield = row.IsNull("itemoutorduserfield") ? string.Empty : row.Field <string>("itemoutorduserfield");
            entity.userfield           = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }