Advertisement
Guest User

Untitled

a guest
May 17th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.85 KB | None | 0 0
  1. @model IbrahimProject.Models.ResultViewModel
  2. @{
  3.     ViewBag.Title = "Results";
  4. }
  5.  
  6. <h2>Results</h2>
  7. <br />
  8. <br />
  9. <div id="customers">
  10.     <table id="tab_customers" class="table">
  11.         <thead>
  12.             <tr>
  13.                 <th>Name</th>
  14.                 <th>Type Check</th>
  15.                 <th>Date of check</th>
  16.                 <th>Result</th>
  17.             </tr>
  18.         </thead>
  19.         <tbody>
  20.             @if (Model.Result != null)
  21.             {
  22.                 foreach (var item in Model.Result)
  23.                 {
  24.                     if (item.result == "SUCCESS")
  25.                     {
  26.                         <tr class="success">
  27.                             <td>@item.NameCheck.NameCheckName</td>
  28.                             <td>@item.TypeCheck.TypeCheckName</td>
  29.                             <td>@item.ResultDate</td>
  30.                             <td>@item.result</td>
  31.                         </tr>
  32.                     }
  33.                     else
  34.                     {
  35.                         <tr class="danger">
  36.                             <td>@item.NameCheck.NameCheckName</td>
  37.                             <td>@item.TypeCheck.TypeCheckName</td>
  38.                             <td>@item.ResultDate</td>
  39.                             <td>@item.result</td>
  40.                         </tr>
  41.                     }
  42.                 }
  43.             }
  44.  
  45.         </tbody>
  46.     </table>
  47. </div>
  48. @Scripts.Render("~/bundles/jquery")
  49. <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.4/jspdf.debug.js" type="text/javascript"></script>
  50. <script src="~/Scripts/Results.js" type="text/javascript"></script>
  51.  
  52. <button onclick="myFunction()" class="btn btn-success">Print results</button>
  53.  
  54. <script>
  55.     function myFunction() {
  56.         window.print();
  57.     }
  58. </script>
  59.  
  60. <button onclick="demoFromHTML()" class="btn btn-success">Export to PDF</button>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement