Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCcinvtrans(ref DataRow row, Ccinvtrans entity)
 {
     row.SetField("is_disc", entity.isDisc);
     row.SetField("item_qty", entity.itemQty);
     row.SetField("sugg_qty", entity.suggQty);
     row.SetField("diff_qty", entity.diffQty);
     row.SetField("lot", entity.lot);
     row.SetField("lot_before", entity.lotBefore);
     row.SetField("date_time", entity.dateTime);
     row.SetField("emp_num", entity.empNum);
     row.SetField("bin_num", entity.binNum);
     row.SetField("abs_num", entity.absNum);
     row.SetField("pallet_id", entity.palletId);
     row.SetField("stock_stat", entity.stockStat);
     row.SetField("transRowID", entity.transRowID.ToByteArray());
     row.SetField("ccinvtransuserfield", entity.ccinvtransuserfield);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Ccinvtrans BuildCcinvtransFromRow(DataRow row)
        {
            Ccinvtrans entity = new Ccinvtrans();

            entity.isDisc              = row.Field <bool>("is_disc");
            entity.itemQty             = row.IsNull("item_qty") ? decimal.Zero : row.Field <decimal>("item_qty");
            entity.suggQty             = row.IsNull("sugg_qty") ? decimal.Zero : row.Field <decimal>("sugg_qty");
            entity.diffQty             = row.IsNull("diff_qty") ? decimal.Zero : row.Field <decimal>("diff_qty");
            entity.lot                 = row.IsNull("lot") ? string.Empty : row.Field <string>("lot");
            entity.lotBefore           = row.IsNull("lot_before") ? string.Empty : row.Field <string>("lot_before");
            entity.dateTime            = row.IsNull("date_time") ? string.Empty : row.Field <string>("date_time");
            entity.empNum              = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.binNum              = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num");
            entity.absNum              = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num");
            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.transRowID          = row.Field <byte[]>("transRowID").ToStringEncoded();
            entity.ccinvtransuserfield = row.IsNull("ccinvtransuserfield") ? string.Empty : row.Field <string>("ccinvtransuserfield");
            entity.userfield           = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }