Exemple #1
0
        private void ConFirmPay(OrderInfo order)
        {
            OrderDao orderDao = new OrderDao();

            orderDao.DebuctFactStock(order.OrderId);
            ProductDao productDao = new ProductDao();

            foreach (LineItemInfo current in order.LineItems.Values)
            {
                ProductInfo productDetails = productDao.GetProductDetails(current.ProductId);
                productDetails.SaleCounts     += current.Quantity;
                productDetails.ShowSaleCounts += current.Quantity;
                productDao.UpdateProduct(productDetails, null);
            }
            OrderHelper.UpdateUserAccount(order);
        }