Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. @{
  2. int i = 0;
  3. }
  4.  
  5. @foreach (var b in ViewBag.ReadBin)
  6. {
  7. if (i <= 3)
  8. {
  9. <tr>
  10. <td>
  11. <p>@b.NumberPosition</p>
  12. </td>
  13.  
  14. <td>
  15. <p>@b.ShaftNumberLower</p>
  16. </td>
  17.  
  18. <td>
  19. <p>@b.ShaftNumberUpper</p>
  20. </td>
  21.  
  22. <td>
  23. <p>@b.DiameterShaftLower</p>
  24. </td>
  25.  
  26. <td>
  27. <p>@b.DiameterShaftUpper</p>
  28. </td>
  29. </tr>
  30. i++;
  31. }
  32.  
  33. else
  34. {
  35. <tr>
  36. <td>
  37. <p>@b.NumberPosition</p>
  38. </td>
  39.  
  40. <td>
  41. <p>@b.ShaftNumberLower</p>
  42. </td>
  43.  
  44. <td>
  45. <p>@b.ShaftNumberUpper</p>
  46. </td>
  47.  
  48. <td>
  49. <p></p>
  50. </td>
  51. <td>
  52. <p></p>
  53. </td>
  54. </tr>
  55. }
  56. }
  57.  
  58. public class HomeController : Controller
  59. {
  60. readonly ReadBinaryFile _readBinary = new ReadBinaryFile();
  61. public ActionResult Index()
  62. {
  63. var transhipments = _readBinary.ReadBin();
  64. ViewBag.ReadBin = transhipments;
  65. return View();
  66. }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement