是否可以引用两个单独的表,比如 - JourneyStatistics(JS)和Journeys(J)?
在Autom8 Rider列下,我想在我们的Journeys数据库表中使用用户名值填充这些行,而其他所有行都将使用JourneyStatistics数据库表。
<table class="table table-hover">
<thead>
<tr>
<th>Rank</th>
<th>Autom8 Rider</th>
<th>Total Carpool Miles</th>
<th>As Driver</th>
<th>As Passenger</th>
<th>Total Savings</th>
</tr>
</thead>
<asp:ListView ID="leaderboardList" runat="server"
ItemType="SE_TeamZephyr.Models.JourneyStatistics" SelectMethod="GetJourneyStatistics">
<ItemTemplate>
<td runat="server">
<tr>
<%-- Currently adds in a line under rank number --%>
<td><%#: Container.DataItemIndex + 1 %></td>
<td><%#:Item.JourneyStatisticsID%></td>
<td><%#:Item.TotalDistanceTravelled%></td>
<td><%#:Item.DistanceAsDriver%></td>
<td><%#:Item.DistanceAsPassenger%></td>
<td><%#:Item.FuelCost%></td>
</tr>
</td>
</ItemTemplate>
</asp:ListView>
</table>
上述工作,但那是因为它只使用一个表。欢呼声。