public void Clear() { var order = OrderService.GetCurrentOrder(); if (order == null || order.HasPayment) { return; } OrderDetailService.DeleteAndSubmit(order.OrderDetails); OrderExamService.DeleteAndSubmit(order.OrderExams); OrderService.DeleteAndSubmit(order); }
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); }