Advertisement
Guest User

Untitled

a guest
Nov 27th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.58 KB | None | 0 0
  1. @model ModelFolder.Models.NewRedemptions
  2. <head>
  3. <meta name="viewport" content="width=device-width" />
  4. <link rel="stylesheet" href="~/Content/bootstrap.paper.css" />
  5.  
  6. @{
  7. ViewBag.Title = "New Redemption";
  8. Layout = "~/Views/Shared/_Layout.cshtml";
  9. }
  10. </head>
  11.  
  12.  
  13. <div class="container">
  14.  
  15. </div>
  16. <div>
  17. <div style="margin-top: 60px;"></div>
  18.  
  19. <h2>New Redemption</h2>
  20.  
  21. <h3>Upload File</h3>
  22.  
  23. @*@ViewBag.result*@
  24.  
  25. @using (Html.BeginForm("Index", "NewRedemption", null, FormMethod.Post, new { enctype = "multipart/form-data", id = "redemptionForm" }))
  26. {
  27. @Html.AntiForgeryToken()
  28. @Html.ValidationSummary()
  29.  
  30. <div class="form-group">
  31. <label class="control-label">Upload Files</label><br />
  32. <label class="btn btn-default btn-file" for="dataFile">
  33. <input type="file" id="dataFile" name="upload" style="display:none;" onchange="$('#upload-file-info').html(this.files[0].name)">
  34. Choose File
  35. </label>
  36. <span class="" id="upload-file-info">
  37.  
  38. </span>
  39. </div>
  40.  
  41. <div class="form-group">
  42. <input type="submit" value="Submit Files" class="btn btn-primary" data-toggle="modal" data-target="#myModal" onclick="document.getElementById('redemptionForm').submit()"/>
  43. </div>
  44.  
  45.  
  46.  
  47. <div class="modal fade" id="myModal" role="dialog">
  48. <div class="modal-dialog modal-lg">
  49. <div class="modal-content">
  50. <div class="modal-header">
  51. <button type="button" class="close" data-dismiss="modal">&times;</button>
  52. <h5 class="modal-title">Preview Upload</h5>
  53. </div>
  54.  
  55. <div class="modal-body">
  56. @if (Model != null)
  57. {
  58. <table class="table table-responsive table-striped table-hover" cellspacing="0" width="100%">
  59. <thead>
  60. <tr>
  61. <th>Fund Code</th>
  62. <th>Fund Name</th>
  63. <th>EA Account Number</th>
  64. <th>Registrar Account Number</th>
  65. <th>Investor Name</th>
  66. <th>Redeem Units</th>
  67. <th>Tracker ID</th>
  68. </tr>
  69. </thead>
  70. <tbody>
  71. @foreach (var data in Model.Item)
  72. {
  73. <tr>
  74. <td>@data.FunCode</td>
  75. <td>@data.FunCode</td>
  76. <td>@data.AccountNumber</td>
  77. <td>@data.RegistrarAccountNo</td>
  78. <td>@data.InvestorName</td>
  79. <td>@data.RedeemUnit</td>
  80. <td>@data.PDFImages</td>
  81. </tr>
  82. }
  83. </tbody>
  84. </table>
  85. }
  86. else
  87. {
  88. <center>
  89. <i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i>
  90. <span class="sr-only">Loading...</span>
  91. </center>
  92. }
  93. </div>
  94.  
  95. <div class="modal-footer">
  96. <button type="button" class="btn btn-primary savechanges">Save changes</button>
  97. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102.  
  103. if (Model != null)
  104. {
  105. <div class="alert alert-dismissible alert-success">
  106. <button type="button" class="close" data-dismiss="alert">&times;</button>
  107. <strong>@ViewBag.result</strong>
  108. </div>
  109.  
  110. <div class="well">
  111. <table id="example" class="table table-responsive table-striped table-hover" cellspacing="0" width="100%" style="display:none;">
  112. <thead>
  113. <tr>
  114. <th>Fund Code</th>
  115. <th>Fund Name</th>
  116. <th>EA Account Number</th>
  117. <th>Registrar Account Number</th>
  118. <th>Investor Name</th>
  119. <th>Redeem Units</th>
  120. <th>Tracker ID</th>
  121. </tr>
  122. </thead>
  123. <tbody>
  124. @foreach (var data in Model.Item)
  125. {
  126. <tr>
  127. <td>@data.FunCode</td>
  128. <td>@data.FunName</td>
  129. <td>@data.AccountNumber</td>
  130. <td>@data.RegistrarAccountNo</td>
  131. <td>@data.InvestorName</td>
  132. <td>@data.RedeemUnit</td>
  133. <td>@data.PDFImages</td>
  134. </tr>
  135. }
  136. </tbody>
  137. </table>
  138. </div>
  139. }
  140. }
  141. </div>
  142.  
  143. <script src="~/Scripts/jquery-1.10.2.min.js"></script>
  144. <script src="~/Scripts/jquery.validate.min.js"></script>
  145. @*<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
  146. <script src="~/Scripts/jquery.unobtrusive-ajax.js"></script>*@
  147.  
  148. <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
  149. <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
  150. <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
  151.  
  152. <script src="~/Scripts/DataTables/jquery.dataTables.min.js"></script>
  153. <script src="~/Scripts/DataTables/dataTables.bootstrap.min.js"></script>
  154. <script src="~/Scripts/DataTables/dataTables.buttons.min.js"></script>
  155. <script src="~/Scripts/DataTables/buttons.flash.min.js"></script>
  156. <script src="~/Scripts/DataTables/buttons.html5.min.js"></script>
  157. <script src="~/Scripts/DataTables/buttons.print.min.js"></script>
  158.  
  159.  
  160.  
  161. <script>
  162. $(document).ready(function () {
  163. $('#example').DataTable({
  164. dom: 'Bfrtip',
  165. buttons: [
  166. 'copy', 'csv', 'excel', 'pdf', 'print'
  167. ],
  168. "paging": true,
  169. "searching": true,
  170. "ordering": true,
  171. "language":
  172. {
  173. "processing": "<div class='overlay custom-loader-background'><i class='fa fa-cog fa-spin custom-loader-color'></i></div>"
  174. },
  175. "processing": true
  176. });
  177.  
  178. $('.savechanges').click(function () {
  179. $('#example').show();
  180. });
  181. });
  182. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement