Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

フォーム・データの使用

次に、TicketConfirm クラスに戻ります。このクラスは、ユーザが [注文完了] ボタンをクリックした時に呼び出されます。

電子メール・アドレスが入力されたかどうかを確認するため、%request オブジェクトの Data Property を経由してフォームの値にアクセスします。

この値の長さが 0 でない場合、アドレスが入力されたことを示します。

—TicketConfirm.OnPage—
TicketConfirm.OnPage
ClassMethod OnPage() As %Status
{
    &html<<html>
    <head>
    </head>
    <body>>
    If ($D(%session.Data("Order"))) {
        Do ..CompleteOrder()

        Write "Thank you for using Caché Cinema!<br>",!
        If ($G(%request.Data("OrderEmail",1)) '= "") {

        }
    }
    Else {
        Write "Your order expired before it was completed."
    }
    &html<</body>
    </html>>
    Quit $$$OK
}
FeedbackOpens in a new tab