Guest User

Untitled

a guest
Feb 19th, 2019
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.00 KB | None | 0 0
  1. @model IEnumerable<AutoStore.Domain.Core.Order>
  2.  
  3. <div id="Orders" class="modal fade">
  4. <div class="modal-dialog modal-lg" role="document">
  5. <div class="modal-content">
  6. <div class="modal-header">
  7. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  8. <span aria-hidden="true">&times;</span>
  9. </button>
  10. <h4 class="modal-title">Список заказов</h4>
  11. </div>
  12.  
  13. <div class="modal-body">
  14. <table class="table table-bordered">
  15. <thead>
  16. <tr>
  17. <th>Дата заказа</th>
  18. <th>Марка автомобиля</th>
  19. <th>Модель автомобиля</th>
  20. <th>Цена</th>
  21. <th>Клиент</th>
  22. <th>Сотрудник</th>
  23. <th>Статус заказа</th>
  24. </tr>
  25. </thead>
  26. <tbody id="orderInf">
  27. @foreach (var item in Model)
  28. {
  29. string clientFIO = item.Clients.CSurname + " " + item.Clients.CName + " " + item.Clients.CPatronymic;
  30. string sellerFIO = item.Sellers == null ? "" : item.Sellers.SSurname + " " + item.Sellers.SName + " " + item.Sellers.SPatronymic;
  31. <tr id="@item.Id">
  32. <td>@Html.DisplayFor(i => item.OrderDate)</td>
  33. <td>@Html.DisplayFor(i => item.Cars.Equipment.CarModel.Mark.MarkName)</td>
  34. <td>@Html.DisplayFor(i => item.Cars.Equipment.CarModel.ModelName)</td>
  35. <td>@Html.DisplayFor(i => item.TotalPrice)</td>
  36. <td>@Html.DisplayFor(i => clientFIO)</td>
  37. <td>@Html.DisplayFor(i => sellerFIO)</td>
  38. <td>@Html.DisplayFor(i => item.Status)</td>
  39. </tr>
  40. }
  41. </tbody>
  42. </table>
  43.  
  44. <div id="equip"></div>
  45. </div>
  46.  
  47. <div class="modal-footer">
  48. <button id="btnHideInf" type="button" class="btn btn-primary">Скрыть информацию</button>
  49. <button type="button" class="btn btn-secondary" data-dismiss="modal">Закрыть</button>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54.  
  55. @model IEnumerable<AutoStore.Domain.Core.Seller>
  56.  
  57. <div id="Sellers" class="modal fade">
  58. <div class="modal-dialog" role="document">
  59. <div class="modal-content">
  60. <div class="modal-header">
  61. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  62. <span aria-hidden="true">&times;</span>
  63. </button>
  64. <h4 class="modal-title">Список продавцов</h4>
  65. </div>
  66.  
  67. <div class="modal-body">
  68. <table class="table table-bordered">
  69. <thead>
  70. <tr>
  71. <th>Сотрудник</th>
  72. <th>Должность</th>
  73. </tr>
  74. </thead>
  75. <tbody>
  76. @foreach (var item in Model)
  77. {
  78. string sellerFIO = item.SSurname + " " + item.SName + " " + item.SPatronymic;
  79. <tr>
  80. <td>@Html.DisplayFor(i => sellerFIO)</td>
  81. <td>@Html.DisplayFor(i => item.Position)</td>
  82. </tr>
  83. }
  84. </tbody>
  85. </table>
  86. </div>
  87.  
  88. <div class="modal-footer">
  89. <button id="btnHideInf" type="button" class="btn btn-primary">Скрыть информацию</button>
  90. <button type="button" class="btn btn-secondary" data-dismiss="modal">Закрыть</button>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95.  
  96. <div id="modalMenu"></div>
  97.  
  98. $.ajax({
  99. type: "GET",
  100. url: "/Administration/_IssuedOrders",
  101. success: function (result) {
  102. $('#modalMenu').html(result);
  103. $('#Orders').modal('show');
  104. }
  105. })
  106.  
  107. $.ajax({
  108. type: "GET",
  109. url: "/Administration/_SellersList",
  110. success: function (result) {
  111. $('#modalSellers').html(result);
  112. $('#Sellers').modal('show');
  113. }
  114. });
Add Comment
Please, Sign In to add comment