私は WCF サービスを使用しており、無料のクレジットを消費したクライアントのレコードを生成する必要がありました。そのレコードを生成しましたが、同じログイン ID を持つクライアントがレコードで繰り返されています。ログイン ID を再度表示したくありませんが、呼び出したすべての番号を表示したいと考えています。これが私の見解のコードです
@model IEnumerable<MyYello.Admin.Models.CallHistory>
@{ViewBag.Title = "UsersWhoHaveConsumedFreeCredit";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Users Who Have Consumed Free Credit</h2>
<table class="table table-striped table-bordered tablesorter" style="display: block">
<thead>
<tr>
<th>Login</th>
<th>FirstName</th>
<th>LastName</th>
<th>Email</th>
<th>Country</th>
<th>Phone</th>
<th>TarrifDesc</th>
<th>CalledNum</th>
<th>CallStart</th>
<th>CallEnd</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>@item.Login</td>
<td>@item.FirstName</td>
<td>@item.LastName</td>
<td>@item.Email</td>
<td>@item.Country</td>
<td>@item.Phone</td>
<td>@item.TariffDescription</td>
</tr>
}
@if (!Model.Any())
{
<tr>
<td colspan="14">No Record Found</td>
</tr>
}
</tbody>
</table>
アイデアが必要なだけ