Example #1
0
 //产品初始化入库:如果此单据细节中的产品还没有入库.
 public virtual ProductStock InitProductStock()
 {
     ProductStock newStock = new ProductStock();
     newStock.UpdateTime = this.UpdateTime;
     newStock.StockUnit = this.StockUnit;
     newStock.Stock = 0;
     newStock.ProductName = this.ProductName;
     newStock.Product = this.Product;
     newStock.Price_Import = this.Price_Import;
     newStock.Price_Display = this.Price_Display;
     newStock.Location = this.Location;
     return newStock;
 }
Example #2
0
 public ProductStock Populate(System.Data.DataRow row)
 {
     IRowPopulate populate = new RowPolulateBaojiandan();
     ProductStock stock = new ProductStock();
     //此处的product不能用
     Product p = populate.PopulateFromRow(row);
     stock.Product = p;
     //if (row["BillNo"] != null)
     //{
     //    string billNo = row["BillNo"].ToString();
     //    stock.BillRelative = new BizBill().GetOne(billNo);
     //}
     stock.Location = row["库位号"].ToString();
     stock.StockUnit = row["库存单位"].ToString();
     stock.Stock = decimal.Parse(row["库存数"].ToString());
     stock.UpdateTime = DateTime.Now;
     return stock;
 }