Advertisement
Guest User

Untitled

a guest
Jan 7th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. <table class="table">
  2. <tr>
  3. <th>
  4. @Html.DisplayNameFor(model => model.InvoiceID)
  5. </th>
  6. <th>
  7. @Html.DisplayNameFor(model => model.Description)
  8. </th>
  9. <th>
  10. @Html.DisplayNameFor(model => model.InvoiceDate)
  11. </th>
  12. <th>
  13. @Html.DisplayNameFor(model => model.DueDate)
  14. </th>
  15. <th>
  16. @Html.DisplayNameFor(model => model.Paid)
  17. </th>
  18. <th>Actions</th>
  19. </tr>
  20.  
  21. @foreach (var item in Model)
  22. {
  23. <tr>
  24. <td>
  25. @Html.DisplayFor(modelItem => item.InvoiceID)
  26. </td>
  27. <td>
  28. @Html.DisplayFor(modelItem => item.Description)
  29. </td>
  30. <td>
  31. @Html.DisplayFor(modelItem => item.InvoiceDate)
  32. </td>
  33. <td>
  34. @Html.DisplayFor(modelItem => item.DueDate)
  35. </td>
  36. <td>
  37. @Html.DisplayFor(modelItem => item.Paid)
  38. </td>
  39. <td style="white-space: nowrap;width: 1px;">
  40. <button type="button" class="btn btn-primary btn-xs" onclick="location.href='@Url.Action("Edit", "Billing", new { id = item.InvoiceID })'"><span class="glyphicon glyphicon-edit" style="vertical-align:middle;margin-top: -5px"></span> Edit</button>
  41. <button type="button" class="btn btn-default btn-xs" onclick="location.href='@Url.Action("Index", "InvoiceItem", new { id = item.InvoiceID })'"><span class="glyphicon glyphicon-eye-open" style="vertical-align:middle;margin-top: -5px"></span> Details</button>
  42. <button type="button" class="btn btn-danger btn-xs" data-toggle="modal" data-target="#myModal" data-id=@item.InvoiceID><span class="glyphicon glyphicon-trash" style="vertical-align:middle;margin-top: -5px"></span> Delete</button>
  43. <div id="myModal" class="modal fade" role="dialog">
  44. <div class="modal-dialog">
  45. <!-- Modal content-->
  46. <div class="modal-content">
  47. <div class="modal-header">
  48. <button type="button" class="close" data-dismiss="modal">&times;</button>
  49. <h4 class="modal-title">Confirm Delete</h4>
  50. </div>
  51. <div class="modal-body">
  52. <!-- The problem seems to be here:-->
  53. <p>Are you sure you want to delete invoice number: <b>@item.InvoiceID</b></p>
  54. </div>
  55. <div class="modal-footer">
  56. <form asp-controller="Billing" asp-action="Delete" asp-route-id=@item.InvoiceID method="post" class="form-inline" role="form">
  57. <button type="submit" class="btn btn-danger"><span class="glyphicon glyphicon-trash" style="vertical-align:middle;margin-top: -5px"></span> Delete</button>
  58. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  59. </form>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </td>
  65. </tr>
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement