Esempio n. 1
0
        public TS_STOCK_DETAIL ToStockDetailInventory(SpareEntities db)
        {
            var stockDetail = db.TS_STOCK_DETAIL.Find(this.FromLocCode, this.PartCode, this.Batch);
            var detailIn    = new TS_STOCK_DETAIL();

            if (stockDetail == null)
            {
                detailIn = db.TS_STOCK_DETAIL.Find(this.ToLocCode, this.PartCode, this.Batch).Clone();
            }
            else
            {
                detailIn = stockDetail.Clone();
            }
            detailIn.LocCode   = this.ToLocCode;
            detailIn.Qty       = this.Qty;
            detailIn.UpdateQty = this.Qty;
            return(detailIn);
        }
Esempio n. 2
0
        public TS_STOCK_DETAIL ToStockDetailIn(SpareEntities db)
        {
            var stockDetail = db.TS_STOCK_DETAIL.Find(this.FromLocCode, this.PartCode, this.Batch);
            var detailIn    = stockDetail.Clone();

            detailIn.LocCode   = this.ToLocCode;
            detailIn.Qty       = this.Qty;
            detailIn.UpdateQty = this.Qty;
            return(detailIn);

//            return new TS_STOCK_DETAIL
//            {
//                LocCode = this.ToLocCode,
//                PartCode = this.PartCode,
//                Batch = this.Batch,
//                EqptCode = this.EqptCode,
//                Qty = 0,
//                UpdateQty = this.Qty,
//                ProduceDate = this.ProduceDate,
//                OverdueDate = (this.ProduceDate).AddDays(GlobalBuffer.GetValidateDays(this.PartCode)),
//            };
        }