public bool CheckOut() { bool result = false; if (this.order != null) { order.Update(DateTime.Now, ETC.Order.STATUS_COMPLETED, this.order.PaymentMethod, this.order.TotalAmount); result = true; } return(result); }
public static void UpdateTotalAmountInOrder(int OrderID) { ETC.Order order = ETC.Order.ExecuteCreate(OrderID); List <ETC.OrderItem> list = ETC.OrderItem.ListByOrderID(OrderID); decimal total = 0.00m; foreach (ETC.OrderItem item in list) { total += item.Subtotal; } order.Update(DateTime.Now, order.Status, order.PaymentMethod, total); }