public void Checkout() { string shopCartId = Middle.GetCurrentUser().ShoppingCartId.ToString(); DataTable dt = DatabaseFunc.Order.GetShopcart(shopCartId); if (dt != null) { Order.ShopcartToOrder(this); } else { throw new Exception("nothing in shopping cart"); } }