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?

Category ID の取得

コードはとても単純です。

Cookie に格納したい情報を取得するには、始めに GetAt メソッドを使用して、最初の TicketItem オブジェクトを取得します。次に、参照している FilmCategory オブジェクトのオブジェクト ID を取得します。

—TicketConfirm.OnPreHTTP—
TicketConfirm.OnPreHTTP
ClassMethod OnPreHTTP() As %Boolean
{
    If $data(%session.Data("Order")) {
        Set ord = ##class(Cinema.TicketOrder).%OpenId(%session.Data("Order"))
        Set itm = ord.Items.GetAt(1)
        Set cat = itm.Show.Film.Category.%Id()

        // ...

    }

    Quit 1
}
FeedbackOpens in a new tab