示例#1
0
        public void Clear()
        {
            var order = OrderService.GetCurrentOrder();

            if (order == null || order.HasPayment)
            {
                return;
            }
            OrderDetailService.DeleteAndSubmit(order.OrderDetails);
            OrderExamService.DeleteAndSubmit(order.OrderExams);
            OrderService.DeleteAndSubmit(order);
        }
示例#2
0
        public void DeleteExam(decimal examID)
        {
            var order = OrderService.GetOrCreateCurrentOrder();

            if (order == null || order.HasPayment)
            {
                return;
            }
            var orderExam = order.OrderExams.FirstOrDefault(oe => oe.Exam_ID == examID);

            if (orderExam == null)
            {
                return;
            }
            OrderExamService.DeleteAndSubmit(orderExam);
        }