Advertisement
Guest User

View

a guest
May 16th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.06 KB | None | 0 0
  1. <table class="table">
  2.     <tr>
  3.         <th>
  4.             @Html.DisplayNameFor(model => model.Forklift.ModelNumber)
  5.         </th>
  6.         <th>
  7.             @Html.DisplayNameFor(model => model.Forklift.ManufacturerID)
  8.         </th>
  9.         <th>
  10.             @Html.DisplayNameFor(model => model.Forklift.Power)
  11.         </th>
  12.         <th>
  13.             @Html.DisplayNameFor(model => model.Forklift.Capacity)
  14.         </th>
  15.         <th>
  16.             @Html.DisplayNameFor(model => model.Forklift.Year)
  17.         </th>
  18.         <th style="text-align: center;">
  19.             @Html.DisplayNameFor(model => model.Forklift.LoweredHeight)/@Html.DisplayNameFor(model => model.Forklift.RaisedHeight)
  20.         </th>
  21.         <th style="text-align: right;">
  22.             @Html.DisplayNameFor(model => model.Forklift.PurchasedPrice)
  23.         </th>
  24.         <th style="text-align: right;">
  25.             @Html.DisplayNameFor(model => model.Forklift.WholesalePrice)
  26.         </th>
  27.         <th style="text-align: right;">
  28.             @Html.DisplayNameFor(model => model.Forklift.RetailPrice)
  29.         </th>
  30.         <th>
  31.  
  32.         </th>
  33.     </tr>
  34.  
  35.     @foreach (var item in Model.ForkliftStockInventoryList)
  36.     {
  37.         <tr onclick="location.href = '@(Url.Action("Details", "Forklift", new { id = item.ForkliftID }))'" class="inventory-row">
  38.             <td>
  39.                 @Html.DisplayFor(modelItem => item.ModelNumber)
  40.             </td>
  41.             <td>
  42.                 @Html.DisplayFor(modelItem => item.Manufacturer.Name)
  43.             </td>
  44.             <td>
  45.                 @Html.DisplayFor(modelItem => item.Power)
  46.             </td>
  47.             <td>
  48.                 @Html.DisplayFor(modelItem => item.Capacity)
  49.             </td>
  50.             <td>
  51.                 @Html.DisplayFor(modelItem => item.Year)
  52.             </td>
  53.             <td style="text-align: center;">
  54.                 @Html.DisplayFor(modelItem => item.LoweredHeight)"/@Html.DisplayFor(modelItem => item.RaisedHeight)"
  55.             </td>
  56.             <td style="text-align: right;">
  57.                 $@Html.DisplayFor(modelItem => item.PurchasedPrice)
  58.             </td>
  59.             <td style="text-align: right;">
  60.                 $@Html.DisplayFor(modelItem => item.WholesalePrice)
  61.             </td>
  62.             <td style="text-align: right;">
  63.                 $@Html.DisplayFor(modelItem => item.RetailPrice)
  64.             </td>
  65.             <td>
  66.                 <script type="text/javascript">
  67.                     $(document).ready(function () {
  68.                         $(".btn.btn-danger").click(function (e) {
  69.                             e.stopPropagation()
  70.                             let target = $(this).data('target')
  71.                             $(target).modal('show')
  72.                         })
  73.                     })
  74.                 </script>
  75.  
  76.                 <button id="Test" type="button" class="btn btn-danger" data-toggle="modal" data-target="#DeleteForkliftModal">
  77.                     <i class="fas fa-trash-alt"></i>
  78.                 </button>
  79.  
  80.             </td>
  81.         </tr>
  82.     }
  83.  
  84. </table>
  85.  
  86.  
  87. <div class="modal fade" id="DeleteForkliftModal" tabindex="-1" role="dialog" aria-labelledby="DeleteForkliftModalLabel" aria-hidden="true">
  88.     <div class="modal-dialog" role="document">
  89.         <div class="modal-content">
  90.             <div class="modal-header">
  91.                 <h5 class="modal-title" id="DeleteForkliftModalLabel">Warning</h5>
  92.                 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  93.                     <span aria-hidden="true">&times;</span>
  94.                 </button>
  95.             </div>
  96.             <div class="modal-body">
  97.                 Are you sure you want to delete the forklift?
  98.                 <br />
  99.                 This action cannot be undone.
  100.             </div>
  101.             <div class="modal-footer">
  102.                 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  103.                 <button type="button" class="btn btn-danger" data-dismiss="modal">Delete</button>
  104.             </div>
  105.         </div>
  106.     </div>
  107. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement