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?

TicketItem の取得

GetAt メソッドを使用して、各 TicketItem オブジェクトを検索できます。オブジェクトがあれば、上映開始時間、映画のタイトルと映画館の名前を表示します。

ObjectScript 関数 $ZTIME (省略形 $ZT) を使用して表示の開始時刻をフォーマットすることに注意してください。$ZTIME と他の ObjectScript 関数の詳細は、"Caché ObjectScript リファレンス" の "$ZTIME" エントリを参照してください。

—Order.csp—
Order.csp
<html> <head></head>
<body>
<csp:class super="%CSP.Page,Cinema.Utils">
<csp:if condition='$D(%session.Data("Order"))'>
    <img src="YourTicketOrder.gif"><br>
    <script language="cache" runat="server">
        // Open Order object for display
        Set ord = ##class(Cinema.TicketOrder).%OpenId(%session.Data("Order"))
    </script>
    <csp:loop counter="num" from=1 to=#( ord.Items.Count() )#>
        <script language="cache" runat="server">
            Set itm = ord.Items.GetAt(num)
        </script>
        For the #($ZT(itm.Show.StartTime,4))#
        showing of #(itm.Show.Film.Title)#
        at #(itm.Show.Theater.TheaterName)#
        <br><br>
    </csp:loop>
</csp:if>
</body> </html>
FeedbackOpens in a new tab