我需要一些帮助才能将 where 规则放入 foreach 搜索中。我的目标是排除 customerOrder.ERPOrderNumber 以字母 E 开头的订单
我拥有的代码返回特定客户的所有订单。
预先感谢您的帮助。
@foreach (var customerOrder in Model.CustomerOrders)
{
<tr>
<td class="mavo-order-date">@customerOrder.OrderDate.ToShortDateString()
</td>
<td class="mavo-status">@customerOrder.Status
</td>
<td class="mavo-order-number">
<a href="@Url.Action("OrderHistoryDetail", "Account", new { orderId = customerOrder.ERPOrderNumber })">@customerOrder.OrderNumber</a>
</td>
@if (Model.ShowErpOrderNumber)
{
<td class="mavo-erp-order">@customerOrder.ERPOrderNumber
</td>
}
<td class="mavo-po">@customerOrder.CustomerPO
</td>
<td class="mavo-order-total">@customerOrder.OrderGrandTotal.ToCurrency()
</td>
<td class="mavo-view">
<a class="btn btnStyleA tbm5" href="@Url.Action("OrderHistoryDetail", "Account", new { orderId = customerOrder.ERPOrderNumber })">View Details</a>
</td>
</tr>
}