コード例 #1
0
        private static void AddLineToStockAdjustmentPurchaseTransaction(StockAdjustmentTransactionLine line, PurchaseTransaction stockAdjustmentPurchaseTransaction)
        {
            var stockAdjustmentPurchaseLine = new PurchaseTransactionLine
            {
                PurchaseTransaction = stockAdjustmentPurchaseTransaction,
                Item           = line.Item,
                Warehouse      = line.Warehouse,
                PurchasePrice  = 0,
                Discount       = 0,
                Quantity       = line.Quantity,
                Total          = 0,
                SoldOrReturned = 0
            };

            stockAdjustmentPurchaseTransaction.PurchaseTransactionLines.Add(stockAdjustmentPurchaseLine);
        }
コード例 #2
0
 private static void AttachLineToDatabaseContext(ERPContext context, StockAdjustmentTransactionLine line)
 {
     line.Item      = context.Inventory.Single(e => e.ID.Equals(line.Item.ID));
     line.Warehouse = context.Warehouses.Single(e => e.ID.Equals(line.Warehouse.ID));
 }
コード例 #3
0
 private static void AttachLineToDatabaseContext(ERPContext context, StockAdjustmentTransactionLine line)
 {
     line.Item = context.Inventory.Single(e => e.ID.Equals(line.Item.ID));
     line.Warehouse = context.Warehouses.Single(e => e.ID.Equals(line.Warehouse.ID));
 }
コード例 #4
0
 private static void AddLineToStockAdjustmentPurchaseTransaction(StockAdjustmentTransactionLine line, PurchaseTransaction stockAdjustmentPurchaseTransaction)
 {
     var stockAdjustmentPurchaseLine = new PurchaseTransactionLine
     {
         PurchaseTransaction = stockAdjustmentPurchaseTransaction,
         Item = line.Item,
         Warehouse = line.Warehouse,
         PurchasePrice = 0,
         Discount = 0,
         Quantity = line.Quantity,
         Total = 0,
         SoldOrReturned = 0
     };
     stockAdjustmentPurchaseTransaction.PurchaseTransactionLines.Add(stockAdjustmentPurchaseLine);
 }