Advertisement
Guest User

Untitled

a guest
Mar 15th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. $(function () {
  2. $('button').click(function () {
  3. var str = $("form").serialize();
  4. $.ajax({
  5. type: "POST",
  6. data: str,
  7. url: "@Url.Action("IndexAjax", "Company")",
  8. }).done(function (res) {
  9. $("#table-companies").html(res);
  10. })
  11.  
  12. });
  13. });
  14.  
  15.  
  16.  
  17. ///////////////////////////////////////_IndexTable pview
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. @model List<Vjezba.Web.Models.Mock.Company>
  25. @{
  26. ViewBag.Title = "_IndexTable";
  27. }
  28.  
  29. <table id="table-companies" class="table table-condensed table-hover">
  30. <thead>
  31. <tr>
  32. <th>#</th>
  33. <th>Naziv</th>
  34. <th>Adresa</th>
  35. <th>Datum osnivanja</th>
  36. <th>Akcija</th>
  37. </tr>
  38. </thead>
  39. <tbody id="companyTable">
  40. @foreach (var company in Model)
  41. {
  42. <tr onmouseover="resetOpacity(this)" onclick="onClickBold(this)">
  43. <td>@company.ID</td>
  44. <td>@Html.ActionLink(company.Name, "Details", new { id = company.ID })</td>
  45. <td>@company.Address</td>
  46. <td>@company.DateFrom.ToShortDateString()</td>
  47. <td>@Html.ActionLink("Uredi", "Edit", new { id = company.ID })</td>
  48. </tr>
  49. }
  50. </tbody>
  51. </table>
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. /////////////////////////////Companyfilter
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. @model Vjezba.Web.Models.CompanyFilterModel
  75. <div class="row">
  76. <div class="col-md-12">
  77. <form action="@Url.Action("Index")" method="post" class="form-inline">
  78. <div class="form-group">
  79. @Html.EditorFor(p => p.Name, new { htmlAttributes = new { @class = "form-control", placeholder = "Pretraga po nazivu" } })
  80. </div>
  81. <div class="form-group">
  82. @Html.TextBoxFor(p => p.Address, new { @class = "form-control", placeholder = "Pretraga po adresi" })
  83. </div>
  84. <div class="form-group">
  85. <input type="text" class="form-control" name="@Html.NameFor(p => p.Email)" placeholder="Pretraga po e-mailu">
  86. </div>
  87. <div class="form-group">
  88. <input type="text" class="form-control" name="@Html.NameFor(p => p.CityName)" placeholder="Pretraga po gradu">
  89. </div>
  90. <button type="button" class="btn btn-default">Pretraga</button>
  91. </form>
  92. </div>
  93. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement