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
/
mapqa
/
Views
/
WorkPlanSelf
/
View File Name :
ActivityLogSelfList.cshtml
@using RER_Project.BusinessLayer.BusinessService @{ var meta = AppUserService.GetCurrent(); } <script> window.setTimeout(function () { $(".alert").fadeTo(500, 0).slideUp(500, function () { $(this).remove(); }); }, 4000); </script> @if (TempData["AlertMessage"] != null) { <div class="alert alert-danger"> <strong>Access Denied !</strong> @TempData["AlertMessage"] <button type="button" class="close" data-dismiss="alert"> <span>×</span> </button> </div> } <div class="wrapper wrapper-content animated"> <div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-content"> <label style="font-size: medium"><b>Daily Activity Log List</b></label> @*<button type="button" class="btn btn-primary pull-right" onclick="tableToExcel('pvtTable1','PivotDownload')"> <i class="fa fa-file-excel-o" aria-hidden="true"></i> Download </button>*@ @*<a href="#" id="btnExport" class="btn pull-right"> <img src="~/Images/ExternalIcon/excel.png" style="height: 38px; width: 34px; padding-bottom: 5px; margin: -8px;"> </a>*@ <a href="#" onclick="createPDF()" class="btn pull-right"> <img src="~/Images/ExternalIcon/pdf.png" style="height: 42px; width: 38px; padding-bottom: 5px; margin: -8px;"> </a> <a href="/activitylog/self" class="btn btn-primary pull-right">Create</a> <hr /> <form id="WorkPlanActivityReporting"> <input type="hidden" name="CurrentPage" id="CurrentPage" /> <div class="row"> <div class="form-group col-md-4"> <label><strong>User:</strong><span class="small" id="select-all" style="color:blue"><strong>Select All</strong></span> </label> <select type="text" class="form-control required" multiple name="UserId" id="UserId" data-api-selected-value="@meta.UserId" data-api="/users/select"></select> <input type="hidden" id="SelectedUserIds" name="SelectedUserIds" /> </div> <div class="form-group col-md-3"> <label><strong>Year:</strong> </label> <br /> <select type="text" class="form-control required" onchange="yearChanged(event)" name="YearId" id="YearId" data-api="/year_nepali/select"></select> </div> <div class="form-group col-md-3"> <label><strong>Month:</strong> </label> <br /> <select type="text" class="form-control required" name="MonthId" id="MonthId" data-api="/month/select/keyvalue"></select> </div> <div class="form-group col-md-2"> <br /> <input type="button" value="Search" class="btn btn-primary" id="SearchButton" onclick="Search()" /><span> </span> </div> </div> </form> <div id="loadPartialView"></div> </div> </div> </div> </div> </div> <link href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" rel="stylesheet" /> <script src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js"></script> <script> $(function () { var globalValue = 0; window.initializeSelectApis(); WorkForce.loader.show(); document.getElementById('CurrentPage').value = 1; $('#user-detail').hide(); var userId = $('#UserId'); //$(userId).select2({ // multiple: true, // allowClear: true //}); $(userId).select2({ multiple: true, allowClear: true, }).change(function () { var selectedUserIDs = $.map($(userId).select2('data'), function (val, i) { return val.id; }).join(","); $('#SelectedUserIds').val(selectedUserIDs); }); WorkForce.loader.hide(); }); $("#select-all").click(function () { //if ($("#checkbox").is(':checked')) { $("#UserId > option").prop("selected", "selected"); $("#UserId").trigger("change"); //} else { //$("#UserId > option").get(0).remove(); //$("#UserId option[value='Select']").remove(); $('#UserId option[value="Select"]').remove(); // $("#UserId").trigger("change"); //} }); function yearChanged(event) { console.log(event); } async function Search() { var dd = document.getElementById('SelectedUserIds').value; WorkForce.loader.show(); document.getElementById('CurrentPage').value = 1; await getDailyActivityReportingList(); } function callSearchPagination(id) { WorkForce.loader.show(); document.getElementById('CurrentPage').value = id; getDailyActivityReportingList(); } async function getDailyActivityReportingList() { debugger; var xhr = new XMLHttpRequest(); var yearText = $('#YearId option:selected').html(); var yearPart = 0; if (yearText != undefined) { yearPart = yearText.replace(' BS', ''); } var year = yearPart; if (year == 'Select') { WorkForce.loader.hide(); ShowMessage("error", 'Year is Required'); return; } var month = $("#MonthId").val(); if (month == "") { WorkForce.loader.hide(); ShowMessage("error", 'Month is Required'); return; } var userId = $("#UserId").val(); if (userId == "") { WorkForce.loader.hide(); ShowMessage("error", 'User is Required'); return; } var jsonData = { UserIds: document.getElementById('SelectedUserIds').value, Year: Number(yearPart), Month: Number($("#MonthId").val()), CurrentPage: document.getElementById('CurrentPage').value }; var urlSearchParams = new URLSearchParams(jsonData); xhr.open('POST', '/activitylog/self_list/search', true); xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); xhr.onload = function () { if (this.status == 200) { WorkForce.loader.hide(); console.log(this.responseText) document.getElementById("loadPartialView").innerHTML = this.responseText; } } xhr.send(urlSearchParams); } //function exportExcel() { // var userId = $("#UserId").val(); // var yearText = $('#YearId option:selected').html(); // var yearPart = 0; // if (yearText != undefined) { // yearPart = yearText.replace(' BS', ''); // } // var year = yearPart; // if (year == 'Select') { // ShowMessage("error", 'Year is Required'); // return; // } // var month = $("#MonthId").val(); // if (month == "") { // ShowMessage("error", 'Month is Required'); // return; // } // if (userId == "") { // ShowMessage("error", 'User is Required'); // return; // } // debugger; // window.location.href = `/report/activity_self/excel?user=${userId}&year=${year}&month=${month}`; //} function createPDF() { var sTable = document.getElementById('dvData').innerHTML; $('.hideColumn').hide(); var style = "<style>"; style = style + "table {width: 100%;font: 17px Calibri;}"; style = style + "table, th, td {border: solid 1px #DDD; border-collapse: collapse;"; style = style + "padding: 2px 3px;}"; style = style + "</style>"; // CREATE A WINDOW OBJECT. var win = window.open('', '', 'height=700,width=700'); win.document.write('<html><head>'); win.document.write('<title></title>'); // <title> FOR PDF HEADER. win.document.write(style); // ADD STYLE INSIDE THE HEAD TAG. win.document.write('</head>'); win.document.write('<body>'); win.document.write('<center><h2>Rural Enterprise Remittance Project(RERP)</h2></center>'); win.document.write('<center><h3>SAMRIDDHI</h3></center>'); win.document.write('<center><h4>Activity Log</h4></center>'); win.document.write(sTable); win.document.write('<br><br><br><br> Prepared BY Verified By Approved By') win.document.write('</body></html>'); win.document.close(); // CLOSE THE CURRENT WINDOW. win.print(); // PRINT THE CONTENTS. } $("#btnExport").click(function (e) { var userId = $("#UserId").val(); var userIds = document.getElementById('SelectedUserIds').value; var yearText = $('#YearId option:selected').html(); var yearPart = 0; if (yearText != undefined) { yearPart = yearText.replace(' BS', ''); } var year = yearPart; if (year == 'Select') { ShowMessage("error", 'Year is Required'); return; } var month = $("#MonthId").val(); if (month == "") { ShowMessage("error", 'Month is Required'); return; } if (userId == "") { ShowMessage("error", 'User is Required'); return; } $(this).attr({ 'download': "download.xls", 'href': 'data:application/csv;charset=utf-8,' + encodeURIComponent($('#dvData').html()) }) }); </script>