コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromItemunavail(ref DataRow row, Itemunavail entity)
 {
     row.SetField("abs_num", entity.absNum);
     row.SetField("bin_num", entity.binNum);
     row.SetField("total_qty", entity.totalQty);
     row.SetField("pallet_id", entity.palletId);
     row.SetField("stock_stat", entity.stockStat);
     row.SetField("holdCode", entity.holdCode);
     row.SetField("date_time_rec", entity.dateTimeRec);
     row.SetField("lot", entity.lot);
     row.SetField("date_expiration", entity.dateExpiration);
     row.SetField("case_quantity", entity.caseQuantity);
     row.SetField("cycle_flag", entity.cycleFlag);
     row.SetField("itemRowID", entity.itemRowID.ToByteArray());
     row.SetField("inventoryRowID", entity.inventoryRowID.ToByteArray());
     row.SetField("itemunavailuserfield", entity.itemunavailuserfield);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Itemunavail BuildItemunavailFromRow(DataRow row)
        {
            Itemunavail entity = new Itemunavail();

            entity.absNum               = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num");
            entity.binNum               = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num");
            entity.totalQty             = row.IsNull("total_qty") ? decimal.Zero : row.Field <decimal>("total_qty");
            entity.palletId             = row.IsNull("pallet_id") ? string.Empty : row.Field <string>("pallet_id");
            entity.stockStat            = row.IsNull("stock_stat") ? string.Empty : row.Field <string>("stock_stat");
            entity.holdCode             = row.IsNull("holdCode") ? string.Empty : row.Field <string>("holdCode");
            entity.dateTimeRec          = row.IsNull("date_time_rec") ? string.Empty : row.Field <string>("date_time_rec");
            entity.lot                  = row.IsNull("lot") ? string.Empty : row.Field <string>("lot");
            entity.dateExpiration       = row.Field <DateTime?>("date_expiration");
            entity.caseQuantity         = row.IsNull("case_quantity") ? decimal.Zero : row.Field <decimal>("case_quantity");
            entity.cycleFlag            = row.Field <bool>("cycle_flag");
            entity.itemRowID            = row.Field <byte[]>("itemRowID").ToStringEncoded();
            entity.inventoryRowID       = row.Field <byte[]>("inventoryRowID").ToStringEncoded();
            entity.itemunavailuserfield = row.IsNull("itemunavailuserfield") ? string.Empty : row.Field <string>("itemunavailuserfield");
            entity.userfield            = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }