【发布时间】:2013-11-13 21:44:21
【问题描述】:
我需要将在“AuctionPage”中选择的线圈发送到“MyBids”页面上的另一个表。我认为最好抓住线圈ID并以这种方式传递但不知道如何?任何帮助将不胜感激。
拍卖页面-->
@model NucorPrototypes_V1.ViewModel.AuctionPage
@{
ViewBag.Title = "Index";
}
<title>Auction </title>
<div id="header" style="background-color: #008751">
<h1 style="margin-bottom: 0; color: #FFFFFF">Secondary Coil Auction </h1>
</div>
<div id="content">
<h2>Index</h2>
<table id="myTable" border="3" style="background-color: #B0B0B0" cellpadding="10" class="table">
<tr>
<th>Select</th>
<th>Serial Number</th>
<th>Minimum Bid</th>
<th>Current High Bid</th>
<th>Grade</th>
<th>Heat Number</th>
<th>Gauge</th>
<th>Width</th>
<th>Weight</th>
<th>Defect 1</th>
<th>Defect 2</th>
<th>Defect 3</th>
</tr>
@foreach (var item1 in Model.Coils)
{
<tr>
<td>
<input type="checkbox" name="selection" id="@item1.Coil_ID" align="center">
</td>
<td>
@Html.DisplayFor(modelItem => item1.Coil_ID)
</td>
<td>
@foreach (var item2 in Model.Auctions)
{
@Html.DisplayFor(modelItem => item2.Auc_MinBid)
}
</td>
<td>
@foreach (var item3 in Model.Bids)
{
@Html.DisplayFor(modelItem => item3.Bid_Amt)
//string sqlq = "select max(Bid_Amt) from Bid inner join AuctionItem ON Bid.Bid_ID = AuctionItem.Bid_ID where Coil_ID =" + item1.Coil_ID +"' '";
}
</td>
<td>
@Html.DisplayFor(modelItem => item1.Coil_Grade)
</td>
<td>
<a data-toggle="modal" data-target="#myModal">@Html.DisplayFor(modelItem => item1.Coil_HeatNo)</a>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">@Html.DisplayFor(modelItem => item1.Coil_HeatNo)</h4>
</div>
<div class="modal-body">
CHemistries
</div>
</div>
</div>
</div>
</td>
<td>
@Html.DisplayFor(modelItem => item1.Coil_Gauge)
</td>
<td>
@Html.DisplayFor(modelItem => item1.Coil_Width)
</td>
<td>
@Html.DisplayFor(modelItem => item1.Coil_Weight)
</td>
<td>
@Html.DisplayFor(modelItem => item1.Coil_Defect1)
</td>
<td>
@Html.DisplayFor(modelItem => item1.Coil_Defect2)
</td>
<td>
@Html.DisplayFor(modelItem => item1.Coil_Defect3)
</td>
</tr>
}
</table>
</center>
</div>
<center>
</center>
MyBids 页面-->
@model NucorPrototypes_V1.ViewModel.MyBids
@{
ViewBag.Title = "MyBids";
}
拍卖
二次线圈拍卖 每100重量的投标金额 移除出价 序列号 最低出价 当前最高出价 年级 发热量 测量 宽度 重量 缺陷一 缺陷 2 缺陷 3 @foreach(Model.Coils 中的 var 行) { 移除出价 @Html.DisplayFor(modelItem => row.Coil_ID) }<center>
确认出价
另存为...
</center>
【问题讨论】:
-
当您说发送到另一个页面时。这是他们点击一行时的重定向,还是您收集他们发布和重定向时点击的所有行?
-
行被复选框选中,然后他们单击“放置投标”按钮将行发送到“我的投标”页表。
标签: c# javascript asp.net sql asp.net-mvc-4