Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model IbrahimProject.Models.ResultViewModel
- @{
- ViewBag.Title = "Results";
- }
- <h2>Results</h2>
- <br />
- <br />
- <div id="customers">
- <table id="tab_customers" class="table">
- <thead>
- <tr>
- <th>Name</th>
- <th>Type Check</th>
- <th>Date of check</th>
- <th>Result</th>
- </tr>
- </thead>
- <tbody>
- @if (Model.Result != null)
- {
- foreach (var item in Model.Result)
- {
- if (item.result == "SUCCESS")
- {
- <tr class="success">
- <td>@item.NameCheck.NameCheckName</td>
- <td>@item.TypeCheck.TypeCheckName</td>
- <td>@item.ResultDate</td>
- <td>@item.result</td>
- </tr>
- }
- else
- {
- <tr class="danger">
- <td>@item.NameCheck.NameCheckName</td>
- <td>@item.TypeCheck.TypeCheckName</td>
- <td>@item.ResultDate</td>
- <td>@item.result</td>
- </tr>
- }
- }
- }
- </tbody>
- </table>
- </div>
- @Scripts.Render("~/bundles/jquery")
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.4/jspdf.debug.js" type="text/javascript"></script>
- <script src="~/Scripts/Results.js" type="text/javascript"></script>
- <button onclick="myFunction()" class="btn btn-success">Print results</button>
- <script>
- function myFunction() {
- window.print();
- }
- </script>
- <button onclick="demoFromHTML()" class="btn btn-success">Export to PDF</button>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement