Guest User

Untitled

a guest
Jan 31st, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.15 KB | None | 0 0
  1. [{"CustomerName":"Dinesh","product":"23234","perticulars":"wrwer","AddressOfCustomer":"wrew`","ContactNumbers":"jhkjhb"}, {"CustomerName":"dd","product":"dfsdfs","perticulars":"fsdfs","AddressOfCustomer":"sdfsdf","ContactNumbers":"fsfsf"}, {"CustomerName":"Pratik","product":"toothbrush","perticulars":"6 inch","AddressOfCustomer":"shreedhama white rose","ContactNumbers":"9949634396"}]
  2.  
  3. <table id="example" class="display" align="center" vertical-align="middle"; cellspacing="0" width="100%">
  4. <thead>
  5. <tr>
  6. <th>Customer Name</th>
  7. <th>Product</th>
  8. <th>Perticulars</th>
  9. <th>Address of customer.</th>
  10. <th>Contact number</th>
  11. </tr>
  12. </thead>
  13. <tbody>
  14. <tr>
  15. <td></td>
  16. <td></td>
  17. <td></td>
  18. <td></td>
  19. <td></td>
  20. </tr>
  21. </tbody>
  22. <tfoot>
  23. <tr>
  24. <th>Customer Name</th>
  25. <th>Product</th>
  26. <th>Perticulars</th>
  27. <th>Address of customer.</th>
  28. <th>Contact number</th>
  29. </tr>
  30. </tfoot>
  31. </table>
  32.  
  33. $.ajax({
  34. url:'AddQuotation',
  35. type:'get',
  36. success:function(data){
  37. alert(data);
  38.  
  39. var resultTable = $('#example').DataTable({
  40.  
  41. "columns": [
  42. { data: "CustomerName" },
  43. { data: "product" },
  44. { data: "perticulars" },
  45. { data: "AddressOfCustomer" },
  46. { data: "ContactNumbers" }
  47. ],
  48. "destroy": true,
  49. "dom": 'lrtip'
  50. } );
  51. resultTable.rows.add(data1).draw();
  52. dataSet = data;
  53. },
  54. error:function(){
  55. alert('error');
  56. }
  57. });
  58.  
  59. {"data": [{"CustomerName":"Dinesh","product":"23234","perticulars":"wrwer","AddressOfCustomer":"wrew`","ContactNumbers":"jhkjhb"}, {"CustomerName":"dd","product":"dfsdfs","perticulars":"fsdfs","AddressOfCustomer":"sdfsdf","ContactNumbers":"fsfsf"}, {"CustomerName":"Pratik","product":"toothbrush","perticulars":"6 inch","AddressOfCustomer":"shreedhama white rose","ContactNumbers":"9949634396"}]}
  60.  
  61. [enter image description here][1] <tbody>
  62. @foreach (var item in Model.HRMS_Tbl_ExpenseClaimModelList)
  63. {
  64.  
  65. <tr>
  66. @if (item.Approved == "1")
  67. {
  68. <td>@item.Date</td>
  69. <td>@item.Date</td>
  70. <td>@item.Type</td>
  71. <td>@item.Amount</td>
  72. }
  73. </tr>
  74.  
  75. }
  76. </tbody>
  77.  
  78.  
  79. TO:
  80.  
  81.  
  82. <tbody>
  83. @foreach (var item in Model.HRMS_Tbl_ExpenseClaimModelList)
  84. {
  85. if (item.Approved == "1")
  86. {
  87. <tr>
  88.  
  89. <td>@item.Date</td>
  90. <td>@item.Date</td>
  91. <td>@item.Type</td>
  92. <td>@item.Amount</td>
  93.  
  94. </tr>
  95. }
  96. }
  97. </tbody>
Add Comment
Please, Sign In to add comment