Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1. using Microsoft.AspNetCore.Mvc;
  2.  
  3. namespace LegalClusterLanguageManagement.Web.Controllers
  4. {
  5. public class SharedController : Controller
  6. {
  7. public IActionResult Edit(string id)
  8. {
  9. return View();
  10. }
  11.  
  12. public IActionResult Details(string id)
  13. {
  14. return View();
  15. }
  16.  
  17. public ActionResult Delete(string id)
  18. {
  19. return null;
  20. }
  21. }
  22. }
  23. ////////////////////////////
  24.  
  25.  
  26. @{
  27. ViewData["Title"] = "Edit";
  28. }
  29.  
  30. <h2>Edit</h2>
  31.  
  32. ///////////////////////////////////////
  33.  
  34.  
  35. @model IEnumerable<LegalClusterLanguageManagement.Web.Models.Entities.MultilanguageEntity>
  36.  
  37. @{
  38. ViewData["Title"] = "GridView";
  39. }
  40.  
  41. <link href="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.12/css/dataTables.bootstrap4.min.css" rel="stylesheet" />
  42. <div class="container">
  43. <table id="dataTable" class="table table-bordered table-hover" width="100%">
  44. <thead >
  45. <tr >
  46. <th style="text-align: center">Id</th>
  47. <th style="text-align: center">Name</th>
  48. <th style="text-align: center">Logical Id</th>
  49. <th style="text-align: center">Update By</th>
  50. <th style="text-align: center">Last Modification</th>
  51. <th style="text-align: center">Actions</th>
  52. </tr>
  53. </thead>
  54. <tbody>
  55. @foreach (var item in Model)
  56. {
  57. <tr>
  58. <td style="text-align: center">
  59. @Html.DisplayFor(modelItem => item.id)
  60. </td>
  61. <td style="text-align: center">
  62. @Html.Encode(item.Name)
  63. </td>
  64. <td style="text-align: center">
  65. @Html.DisplayFor(modelItem => item.LogicalId)
  66. </td>
  67. <td style="text-align: center">
  68. @Html.DisplayFor(modelItem => item.UpdatedBy)
  69. </td>
  70. <td style="text-align: center">
  71. @Html.DisplayFor(modelItem => item.LastModification)
  72. </td>
  73. <td style="text-align: center">
  74. <input type="button" class="btn btn-info" value="Details" onclick="location.href = '@Url.Action("Details", "Shared", new {id = item.id})'" />
  75. <input type="button" class="btn btn-primary" value="Edit" onclick="location.href = '@Url.Action("Edit", "Shared", new {id = item.id})'" />
  76. <input type="button" class="btn btn-danger" value="Delete" onclick="location.href = '@Url.Action("Delete", "Shared", new {id = item.id})'" />
  77. </td>
  78. </tr>
  79. }
  80. </tbody>
  81. </table>
  82. </div>
  83.  
  84. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  85. <script src="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.12/js/jquery.dataTables.min.js"></script>
  86. <script src="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.13/js/dataTables.bootstrap4.min.js"></script>
  87. <script>
  88. $('#dataTable').DataTable();
  89. </script>
  90.  
  91.  
  92. /////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement