我在asp.net mvc应用程序中有以下视图: -
@model MvcApplication4.Models.ContactsDetails
<h3>Select Contacts Detials</h3>
<p class="dashboarder" style = "color:#5c87b2"><strong>@Model.Info.Count()</strong> Selected Customers Accounts.</p>
@using (Html.BeginForm("Export", null))
{
Int32 c = -1;
<table>
<tr>
<th>
Account Name @Html.CheckBox("IncludeAccountName", true)
</th>
<th>
Name @Html.CheckBox("IncludeName", true)
</th>
Run Code Online (Sandbox Code Playgroud)
使用以下操作方法填充: -
public ActionResult CustomersDetails(long[] SelectRight)
{
if (SelectRight == null)
{
return RedirectToAction("customer", new { isError = true });
}
else
{
var ContactsDetails2 = new ContactsDetails
{
Info = r.getcontactinfo(SelectRight)
};
return View(ContactsDetails2);
}
}
Run Code Online (Sandbox Code Playgroud)
然后是以下存储库方法: -
public IEnumerable<AaaUserContactInfo> getcontactinfo(long[] id) …Run Code Online (Sandbox Code Playgroud)