Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function () {
- $('button').click(function () {
- var str = $("form").serialize();
- $.ajax({
- type: "POST",
- data: str,
- url: "@Url.Action("IndexAjax", "Company")",
- }).done(function (res) {
- $("#table-companies").html(res);
- })
- });
- });
- ///////////////////////////////////////_IndexTable pview
- @model List<Vjezba.Web.Models.Mock.Company>
- @{
- ViewBag.Title = "_IndexTable";
- }
- <table id="table-companies" class="table table-condensed table-hover">
- <thead>
- <tr>
- <th>#</th>
- <th>Naziv</th>
- <th>Adresa</th>
- <th>Datum osnivanja</th>
- <th>Akcija</th>
- </tr>
- </thead>
- <tbody id="companyTable">
- @foreach (var company in Model)
- {
- <tr onmouseover="resetOpacity(this)" onclick="onClickBold(this)">
- <td>@company.ID</td>
- <td>@Html.ActionLink(company.Name, "Details", new { id = company.ID })</td>
- <td>@company.Address</td>
- <td>@company.DateFrom.ToShortDateString()</td>
- <td>@Html.ActionLink("Uredi", "Edit", new { id = company.ID })</td>
- </tr>
- }
- </tbody>
- </table>
- /////////////////////////////Companyfilter
- @model Vjezba.Web.Models.CompanyFilterModel
- <div class="row">
- <div class="col-md-12">
- <form action="@Url.Action("Index")" method="post" class="form-inline">
- <div class="form-group">
- @Html.EditorFor(p => p.Name, new { htmlAttributes = new { @class = "form-control", placeholder = "Pretraga po nazivu" } })
- </div>
- <div class="form-group">
- @Html.TextBoxFor(p => p.Address, new { @class = "form-control", placeholder = "Pretraga po adresi" })
- </div>
- <div class="form-group">
- <input type="text" class="form-control" name="@Html.NameFor(p => p.Email)" placeholder="Pretraga po e-mailu">
- </div>
- <div class="form-group">
- <input type="text" class="form-control" name="@Html.NameFor(p => p.CityName)" placeholder="Pretraga po gradu">
- </div>
- <button type="button" class="btn btn-default">Pretraga</button>
- </form>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement