Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @{
- int i = 0;
- }
- @foreach (var b in ViewBag.ReadBin)
- {
- if (i <= 3)
- {
- <tr>
- <td>
- <p>@b.NumberPosition</p>
- </td>
- <td>
- <p>@b.ShaftNumberLower</p>
- </td>
- <td>
- <p>@b.ShaftNumberUpper</p>
- </td>
- <td>
- <p>@b.DiameterShaftLower</p>
- </td>
- <td>
- <p>@b.DiameterShaftUpper</p>
- </td>
- </tr>
- i++;
- }
- else
- {
- <tr>
- <td>
- <p>@b.NumberPosition</p>
- </td>
- <td>
- <p>@b.ShaftNumberLower</p>
- </td>
- <td>
- <p>@b.ShaftNumberUpper</p>
- </td>
- <td>
- <p></p>
- </td>
- <td>
- <p></p>
- </td>
- </tr>
- }
- }
- public class HomeController : Controller
- {
- readonly ReadBinaryFile _readBinary = new ReadBinaryFile();
- public ActionResult Index()
- {
- var transhipments = _readBinary.ReadBin();
- ViewBag.ReadBin = transhipments;
- return View();
- }
- }
- //сдесь пишешь заголовок таблицы
- for (int i=0; i < ViewBag.ReadBin.Count()/2; i++)
- {
- //постить в одну таблицу
- }
- //закываешь таблицу
- //сдесь пишешь заголовок второй таблицы
- for (int i=ViewBag.ReadBin.Count()/2; i <= ViewBag.ReadBin.Count; i++)
- {
- //постить во вторую таблицу
- }
- //закываешь таблицу
Add Comment
Please, Sign In to add comment