私は、BookingId
という名前のかみそりのマージフィールドを持っています。 A BookingIdは名前を付けることができリストから間違った表の印刷
:CCFM384-3049
、RJDd3248-34
またはEVO-23804f-fgg3
BookingIdは言葉EVOが含まれている場合、私はBookingIdはEVOが含まれていない場合、私は第2のテーブルの行を印刷する必要があり、最初のテーブルの行を印刷することがあります。
私はBookingId:EVO-23804f-fgg3でテストしています。しかし、私はまだ2番目のタブロープリントを取得します。私のコードで何が間違っているのですか?
@if ((new List<string> { "EVO" }).Contains(Model.Order.EvoBookingId))
{
<!-- First tablerow -->
<tr>
<th class="small-12 large-6 columns first">
<table>
<tr>
<th width="300">
<p class="text-left small-text-left"><strong>EVO:</strong></p>
</th>
</tr>
</table>
</th>
<th class="small-12 large-6 columns last">
<table>
<tr>
<th width="300">
<p class="text-left small-text-left">
This table contains EVO
</p>
</th>
<th class="expander"></th>
</tr>
</table>
</th>
</tr>
}
else
{
<!-- Second tablerow -->
<tr>
<th class="small-12 large-6 columns first">
<table>
<tr>
<th width="300">
<p class="text-left small-text-left"><strong>EVO:</strong></p>
</th>
</tr>
</table>
</th>
<th class="small-12 large-6 columns last">
<table>
<tr>
<th width="300">
<p class="text-left small-text-left">
<br /><br />
This table does not contains EVO
</p>
</th>
<th class="expander"></th>
</tr>
</table>
</th>
</tr>
}
(これが事実であるように、あなたの例では、見た目ほど)を起動します。 BookingIdに "Evo"という単語が含まれていると、とてもうまく動作します。単語をテストすると "EVO"が含まれていないと、 "この表にはEVOが含まれています"というメッセージが表示されます。 – M375