Ejemplo n.º 1
0
        public static void PaymentConfirmed()
        {
            List <ProcessingOrder> processingOrders;

            if (UserSingleton.GetInstance.IsAuthenticated)
            {
                processingOrders = UserSingleton.GetInstance.ProcessingOrders;
                List <PastOrder> pastOrders = PastOrderFactory.CreateSeveral(processingOrders, UserSingleton.GetInstance.User);
                pastOrders.ForEach(p => p.RecordInDb());
                UserSingleton.GetInstance.PastOrders.AddRange(pastOrders);
                UserSingleton.GetInstance.ProcessingOrders.Clear();
            }
            UserSingleton.VisitorProcessingOrders.Clear();
        }