Beispiel #1
0
 public InOutStock(InOutStock thiz)
 {
     StockType = thiz.StockType;
     ID = thiz.ID;
     Date = thiz.Date;
     SpecificationID = thiz.SpecificationID;
     Quantity = thiz.Quantity;
     EnterpriseID = thiz.EnterpriseID;
     EmployeeID = thiz.EmployeeID;
     //WarehouseID = thiz.WarehouseID;
     Remark = thiz.Remark;
     ItemID = thiz.ItemID;
     InventoryID = thiz.InventoryID;
 }
        protected override void Initialize(IProductWrapper product = null)
        {
            if (product == null)
            {
                InOutStock = new InOutStock();
                Quantity = 1;
                Date = DateTime.Now;
            }
            else
            {
                InOutStock = product.Product.Clone() as InOutStock;

                var stock = product as StockWrapper;
                Item = stock.Item;
                Specification = stock.Specification;
                Warehouse = stock.Warehouse;
                Quantity = stock.Quantity;
                Client = stock.Client;
                Employee = stock.Employee;
            }
        }
 /// <summary>
 /// for edit
 /// </summary>
 /// <param name="inOutStock"></param>
 public InOutStockHelper(InOutStock inOutStock)
 {
     _InOutStock = inOutStock;
 }
 /// <summary>
 /// for register
 /// </summary>
 public InOutStockHelper()
 {
     _InOutStock = new InOutStock();
 }