文件操作 - Load.js
返回文件管理
返回主菜单
删除本文件
文件: E:\HostingSpaces\kimblycr\howell.kimbly.in\wwwroot\js\Load.js
编辑文件内容
oldBox = "#Home"; var LoggedInEmpID; var LoginName; var UserType; $(document).ready(function () { LoggedInEmpID = sessionStorage.getItem("LoggedInEmpID"); if (LoggedInEmpID == null) { window.location = "Login.aspx"; } GetBirthdays(); LoginName = sessionStorage.getItem("LoginName"); UserType = sessionStorage.getItem("UserType"); oldBox = "#Home"; showInitialHome(); $(".displayBlock").click(function () { $("#infoContainer").children().hide(); $("#secondScreen").show(); var e = $(this).attr("id").substring(3); if (e == 'Enquiries') { // getAlerts(); } else if (e == 'Support') { //getAlertsSupport(); } else if (e == 'Approvals') { GetApprovalCountByOwner(LoggedInEmpID); } $("#" + e).show(); }); $.ajaxSetup({ beforeSend: function () { $("#loading").show() }, complete: function () { $("#loading").hide() } }) //CheckSearchRestrictions(); //CheckAddRestrictions(); CheckDeductRestrictions(); CheckSettingsRestriction(); GetApprovalCountByOwner(LoggedInEmpID); $("#btnExport").click(function (e) { e.preventDefault(); //getting data from our table var data_type = 'data:application/vnd.ms-excel'; var table_div = document.getElementById('dvGrdReportAttendance'); var table_html = table_div.outerHTML.replace(/ /g, '%20'); var a = document.createElement('a'); a.href = data_type + ', ' + table_html; a.download = 'exported_table_' + Math.floor((Math.random() * 9999999) + 1000000) + '.xls'; a.click(); }); }) function GetBirthdays(){ $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Default.aspx/GetBirthdays", data: "", dataType: "json", success: function (data) { if (data.d != null) { document.getElementById('marqueeElem').innerHTML = data.d; } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function showHome() { $("#infoContainer").children().hide(); $("#secondScreen").show(); $("#Home").show(); $("#dvSummary").hide(); } function showInitialHome() { $("#infoContainer").children().hide(); $("#secondScreen").show(); $("#Home").show(); $("#dvSummary").hide(); showPresence('A'); showLeaveSummary(); } function ShowManualAttendance() { $("#infoContainer").children().hide(); $("#secondScreen").show(); $("#ManualAttendance").show(); $.ajax({ type: "POST", url: "WebMethods/Employees.aspx/GetEmployeesList", data: "", contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { if (data.d != null) { var select = document.getElementById('SelEmployeeManualAttn'); select.options.length = 0; var obj = JSON.parse(data.d); for (i = 0; i < obj.length; i++) { select.options[select.options.length] = new Option(obj[i].Name, obj[i].ID); } } } }); } function SaveManualAttendance() { var InTime = document.getElementById('ChkInTime'); //console.log('In Time-' + InTime); var TimeIn = document.getElementById('txtInTime').value; console.log('Time In-' + TimeIn); var OutTime = document.getElementById('ChkOutTime'); // console.log('Out Time-' + OutTime); var TimeOut = document.getElementById('txtOutTime').value; console.log('Time Out-' + TimeOut); var EmpID = document.getElementById('SelEmployeeManualAttn').value; console.log('EmpID-' + EmpID); var ActDate = document.getElementById('txtInDate').value; console.log('ActDate-' + ActDate); if (InTime.checked) { console.log('In InTime Checked'); $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Default.aspx/UpdateManualTiming", data: "{'ActDate':'" + ActDate + "','ActTime': '" + TimeIn + "','EmpID': '" + EmpID + "'}", dataType: "json", success: function (data) { }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } if (OutTime.checked) { console.log('In OutTime Checked'); $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Default.aspx/UpdateManualTiming", data: "{'ActDate':'" + ActDate + "','ActTime': '" + TimeOut + "','EmpID': '" + EmpID + "'}", dataType: "json", success: function (data) { }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } alert('Done'); } function showPresence(scope) { console.log('In showPresence'); $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebMethods/Attendance.aspx/GetPresence", data: "{'scope': '" + scope + "'}", dataType: "json", success: function (data) { if (data.d != null) { $("#dvSummary").empty(); var str = "<table style='width:100%' class='table'><thead><tr><td><b>Employee Name</b></td><td><b>CardNo</b></td><td><b>Presence</b></td><td><b>InTime</b></td><td style='width: 30%;'><b>Reporting Address</b></td></tr></thead><tbody>"; for (i = 0; i < data.d.length; i++) { var hdr = data.d[i].RowData; str += hdr; } $("#dvSummary").append(str); $("#dvSummary").append("</tbody></table>"); $("#dvSummary").show(); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function GetActivities() { var scope = document.getElementById('ActivitiesScope').value; var Name = document.getElementById('Activities_Search_txtName').value; var ActivityDate = document.getElementById('Activities_Search_txtDate').value; console.log('scope-' + scope); if (scope == 'Me') { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebMethods/Attendance.aspx/GetActivitiesByEmpID", data: "{'EmpID': '" + LoggedInEmpID + "','ActivityDate': '" + ActivityDate + "'}", dataType: "json", success: function (data) { if (data.d != null) { $("#dvGrdReportActivities").empty(); var str = "<table style='width:100%' class='table'><thead><tr><td><b>Employee Name</b></td><td><b>CardNo</b></td><td style='width: 10%;'><b>Date</b></td><td><b>InTime</b></td><td style='width: 30%;'><b>Reporting Address</b></td><td><b>Source</b></td></tr></thead><tbody>"; for (i = 0; i < data.d.length; i++) { var hdr = data.d[i].RowData; str += hdr; } $("#dvGrdReportActivities").append(str); $("#dvGrdReportActivities").append("</tbody></table>"); $("#dvGrdReportActivities").show(); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } else{ $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebMethods/Attendance.aspx/GetActivities", data: "{'Name': '" + Name + "','ActivityDate': '" + ActivityDate + "'}", dataType: "json", success: function (data) { if (data.d != null) { $("#dvGrdReportActivities").empty(); var str = "<table style='width:100%' class='table'><thead><tr><td><b>Employee Name</b></td><td><b>CardNo</b></td><td style='width: 10%;'><b>Date</b></td><td><b>InTime</b></td><td style='width: 30%;'><b>Reporting Address</b></td><td><b>Source</b></td></tr></thead><tbody>"; for (i = 0; i < data.d.length; i++) { var hdr = data.d[i].RowData; str += hdr; } $("#dvGrdReportActivities").append(str); $("#dvGrdReportActivities").append("</tbody></table>"); $("#dvGrdReportActivities").show(); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } } function GetAttendance() { var scope = document.getElementById('AttendanceScope').value; var Name = document.getElementById('Attendance_Search_txtName').value; var SDate = document.getElementById('Attendance_Search_txtSDate').value; var EDate = document.getElementById('Attendance_Search_txtEDate').value; console.log('scope-' + scope); if (scope == 'Me') { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebMethods/Attendance.aspx/GetAttendanceByEmpID", data: "{'EmpID': '" + LoggedInEmpID + "','SDate': '" + SDate + "','EDate': '" + EDate + "'}", dataType: "json", success: function (data) { if (data.d != null) { for (i = 0; i < data.d.length; i++) { $("#dvGrdReportAttendance").empty(); var str = "<table style='width:100%' class='table'><thead><tr><td><b>Name</b></td><td><b>CardNo</b></td><td style='width: 10%;'><b>Date</b></td><td><b>InTime</b></td><td><b>OutTime</b></td><td><b>TotalTime</b></td><td><b>LateTime</b></td><td><b>EarlyTime</b></td><td><b>LostHours</b></td><td><b>Status</b></td></tr></thead><tbody>"; for (i = 0; i < data.d.length; i++) { var hdr = data.d[i].RowData; str += hdr; } $("#dvGrdReportAttendance").append(str); $("#dvGrdReportAttendance").append("</tbody></table>"); $("#dvGrdReportAttendance").show(); } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } else { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebMethods/Attendance.aspx/GetAttendance", data: "{'Name': '" + Name + "','SDate': '" + SDate + "','EDate': '" + EDate + "'}", dataType: "json", success: function (data) { if (data.d != null) { for (i = 0; i < data.d.length; i++) { $("#dvGrdReportAttendance").empty(); var str = "<table style='width:100%' class='table'><thead><tr><td><b>Name</b></td><td><b>CardNo</b></td><td style='width: 10%;'><b>Date</b></td><td><b>InTime</b></td><td><b>OutTime</b></td><td><b>TotalTime</b></td><td><b>LateTime</b></td><td><b>EarlyTime</b></td><td><b>LostHours</b></td><td><b>Status</b></td></tr></thead><tbody>"; for (i = 0; i < data.d.length; i++) { var hdr = data.d[i].RowData; str += hdr; } $("#dvGrdReportAttendance").append(str); $("#dvGrdReportAttendance").append("</tbody></table>"); $("#dvGrdReportAttendance").show(); } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } } function showAlerts(alrt, module, id) { console.log('In showAlert'); var htmlexist = document.getElementById('AlertPanelBody').innerHTML; document.getElementById('AlertPanelBody').innerHTML = htmlexist + '<div class="alert alert-warning alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button><a href="#" onclick="EditEnquiries(' + id + ')">' + alrt + '</a></div>'; } function CheckSearchRestrictions() { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebMethods/Contacts.aspx/GetSearchRestrictionByEmpID", data: "", dataType: "json", success: function (data) { if (data.d != null) { for (i = 0; i < data.d.length; i++) { var nm = data.d[i].RowData; console.log('nm-' + nm); if (nm == "Contacts") { $("#btnSearchContacts").hide(); } else if (nm == "Enquiries") { $("#BtnEnquirySearch").hide(); } else if (nm == "Quotes") { $("#BtnQuoteSearch").hide(); } else if (nm == "Complaints") { $("#BtnComplaintSearch").hide(); } else if (nm == "Products") { $("#BtnProductSearch").hide(); } else if (nm == "Inventory") { $("#BtnInventorySearch").hide(); } else if (nm == "Employees") { $("#BtnEmployeeSearch").hide(); } else if (nm == "Docs") { $("#BtnDocsSearch").hide(); } else if (nm == "AMC") { $("#BtnAMCSearch").hide(); } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function CheckAddRestrictions() { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebMethods/Contacts.aspx/GetAddRestrictionByEmpID", data: "", dataType: "json", success: function (data) { if (data.d != null) { for (i = 0; i < data.d.length; i++) { var nm = data.d[i].RowData; if (nm == "Contacts") { $("#btnContactsAdd").hide(); } else if (nm == "Enquiries") { $("#BtnEnquiryAdd").hide(); } else if (nm == "Quotes") { $("#BtnQuoteAdd").hide(); } else if (nm == "Complaints") { $("#BtnComplaintAdd").hide(); } else if (nm == "Products") { $("#BtnProductAdd").hide(); } else if (nm == "Inventory") { $("#BtnInventoryAdd").hide(); } else if (nm == "Employees") { $("#BtnEmployeeAdd").hide(); } else if (nm == "Docs") { $("#BtnDocsAdd").hide(); } else if (nm == "AMC") { $("#BtnAMCAdd").hide(); } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function CheckDeductRestrictions() { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebMethods/Contacts.aspx/GetDeductRestrictionByEmpID", data: "", dataType: "json", success: function (data) { if (data.d != null) { for (i = 0; i < data.d.length; i++) { var nm = data.d[i].RowData; if (nm == "Inventory") { $("#BtnInventoryDeduct").hide(); } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function CheckSettingsRestriction() { console.log('In CheckSettingsRestriction'); $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "index.aspx/GetSettingsRestriction", data: "", dataType: "json", success: function (data) { if (data.d != null) { for (i = 0; i < data.d.length; i++) { var nm = data.d[i].RowData; if (nm == "Settings") { $("#boxSettings").hide(); } else if (nm == "Reports") { $("#boxReports").hide(); } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function closeEditForm(form) { var collection; if (form == 1) { collection = "Contacts"; } else if (form == 2) { collection = "Enquiries"; } else if (form == 3) { collection = "Support"; } else if (form == 4) { collection = "Products"; } else if (form == 5) { collection = "Inventory"; } else if (form == 6) { collection = "Employees"; } else if (form == 7) { collection = "Documents"; } else if (form == 8) { collection = "AMC"; } else if (form == 9) { collection = "Quotes"; } closeEditFormByName(collection); } function closeEditFormByName(collection) { $("#DvFrmEdit" + collection).hide(); $("#grd" + collection).show(); $("#dvGrdReport" + collection).show(); $("#Dv" + collection + "Frm").show(); } function HideAddForm() { console.log('In HideAddForm') $("#dvFrm").html(""); $("#dvFrm").empty(); //showInitialHome(); $('#dvFrm').show(); } function showPresenceDashboard() { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebMethods/Attendance.aspx/GetPresenceDashboard", data: "", dataType: "json", success: function (data) { if (data.d != null) { for (i = 0; i < data.d.length; i++) { var out = data.d.split(";"); document.getElementById('lblTotalPresent').innerHTML = out[0]; document.getElementById('lblTotalAbsent').innerHTML = out[1]; document.getElementById('lblTotalLate').innerHTML = out[2]; document.getElementById('lblTotalOnTime').innerHTML = out[3]; document.getElementById('lblTotal').innerHTML = out[4]; document.getElementById('lblTotalLeave').innerHTML = out[5]; } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function ChangePassword() { var pwd = document.getElementById('txtPassword1').value; var pwd2 = document.getElementById('txtPassword2').value; if (pwd != pwd2) { alert('Confirm Password does not match'); return; } $.ajax({ type: "POST", url: "Default.aspx/ChangePassword", data: "{'password': '" + pwd + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { alert(data.d); showHome(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function AddDoc(formname, id) { $("#DocumentUploadFrame").attr("src", "DocumentUpload.aspx?SourceCollection=" + formname + "&SourceID=" + id); document.getElementById('UpdName').value = formname; document.getElementById('UpdID').value = id; } function RefreshForm() { var formname = document.getElementById('UpdName').value; var id = document.getElementById('UpdID').value; console.log('formname-' + formname); //EditObject(formname, id); } function GetAssociatedComments(objecttype, objectID) { console.log('In GetAssociatedComments'); var commentdata = '<div class="col-sm-2" style="padding: 0px;width: 70px;">Comments:</div><div class="col-sm-10">'; $.ajax({ type: "POST", url: "WebMethods/Documents.aspx/GetAssociatedComments", data: "{'ObjectType': '" + objecttype + "','ObjectID': '" + objectID + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { if (data.d != null) { setTimeout(function () { for (i = 0; i < data.d.length; i++) { commentdata += data.d[i].CommentData + "<small style='color: lightgray;'> " + data.d[i].FullName + " by " + data.d[i].DateStamp + "</small><hr style='color: lightgray;margin-top: 0px;margin-bottom: 0px;'>"; } if (data.d.length > 0) { commentdata += "</div>"; $("#DV" + objecttype + "Comments").html(""); $("#DV" + objecttype + "Comments").append(commentdata); $("#DV" + objecttype + "Comments").show(); } }, 1000); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function StartComment(headertext, ID) { commentObject = headertext; CommentObjectID = ID; document.getElementById('txtComment').focus(); } function SaveComment() { var comment = document.getElementById('txtComment').value.replace(/'/g, ''); $.ajax({ type: "POST", url: "WebMethods/Documents.aspx/InsertComment", data: "{'Comment': '" + comment + "','ID': '" + LoggedInEmpID + "','ObjectType': '" + commentObject + "','ObjectID': '" + CommentObjectID + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { GetAssociatedComments(commentObject, CommentObjectID); document.getElementById('txtComment').value = ""; }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function GetEmployeesAllowedRestrictions() { LoggedInEmpID = sessionStorage.getItem("LoggedInEmpID"); var ModuleID = 3; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Settings.aspx/GetRestrictionsByFormEmpID", data: "{'ModuleID':'" + ModuleID + "','EmpID': '" + LoggedInEmpID + "'}", dataType: "json", success: function (data) { if (data.d != null) { for (var i = 0; i < data.d.length; i++) { if (data.d[i].Action == 'View') { $('#BtnEmployeeSearch').show(); } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function GetActivitiesAllowedRestrictions() { LoggedInEmpID = sessionStorage.getItem("LoggedInEmpID"); var ModuleID = 1; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Settings.aspx/GetRestrictionsByFormEmpID", data: "{'ModuleID':'" + ModuleID + "','EmpID': '" + LoggedInEmpID + "'}", dataType: "json", success: function (data) { if (data.d != null) { for (var i = 0; i < data.d.length; i++) { if (data.d[i].Action == 'View') { //$('#btnSearchActivities').show(); $('#Activities_Search_txtName').show(); document.getElementById('ActivitiesScope').value = "All"; } if (data.d[i].Action == 'Manual Attendance') { console.log('Manual Attendance'); $('#btnManualAtten').show(); } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function GetAttendanceAllowedRestrictions() { LoggedInEmpID = sessionStorage.getItem("LoggedInEmpID"); var ModuleID = 2; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Settings.aspx/GetRestrictionsByFormEmpID", data: "{'ModuleID':'" + ModuleID + "','EmpID': '" + LoggedInEmpID + "'}", dataType: "json", success: function (data) { if (data.d != null) { for (var i = 0; i < data.d.length; i++) { if (data.d[i].Action == 'View') { $('#btnSearchAttendance').show(); $('#Attendance_Search_txtName').show(); document.getElementById('AttendanceScope').value = "All"; } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function GetConveyanceAllowedRestrictions() { LoggedInEmpID = sessionStorage.getItem("LoggedInEmpID"); var ModuleID = 4; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Settings.aspx/GetRestrictionsByFormEmpID", data: "{'ModuleID':'" + ModuleID + "','EmpID': '" + LoggedInEmpID + "'}", dataType: "json", success: function (data) { if (data.d != null) { for (var i = 0; i < data.d.length; i++) { if (data.d[i].Action == 'Approve') { $('#BtnConveyancesearch').show(); } else if (data.d[i].Action == 'Pay') { $('#BtnConveyanceUnpaid').show(); $('#DvConveyancesFrm').show(); } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function GetDocumentAllowedRestrictions() { LoggedInEmpID = sessionStorage.getItem("LoggedInEmpID"); var ModuleID = 8; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Settings.aspx/GetRestrictionsByFormEmpID", data: "{'ModuleID':'" + ModuleID + "','EmpID': '" + LoggedInEmpID + "'}", dataType: "json", success: function (data) { if (data.d != null) { for (var i = 0; i < data.d.length; i++) { if (data.d[i].Action == 'Search') { $('#BtnDocsSearch').show(); $('#Documents_Search_ObjectType').show(); $('#Documents_Search_txtTitle').show(); } else if (data.d[i].Action == 'Add') { $('#BtnDocsAdd').show(); } else if (data.d[i].Action == 'Delete') { $('#btnDeleteDocs').show(); } else if (data.d[i].Action == 'Edit') { $('#btnUpdateDocs').show(); } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function GetHomeAllowedDashboard() { LoggedInEmpID = sessionStorage.getItem("LoggedInEmpID"); var ModuleID = 9; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Settings.aspx/GetRestrictionsByFormEmpID", data: "{'ModuleID':'" + ModuleID + "','EmpID': '" + LoggedInEmpID + "'}", dataType: "json", success: function (data) { if (data.d != null) { for (var i = 0; i < data.d.length; i++) { if (data.d[i].Action == 'View Dashboard') { $('#DivDashboardSpan3').show(); } else if (data.d[i].Action == 'View Presence') { $('#divHomePresence').show(); $('#dvLeaveSummary').show(); } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function GetSettingsAllowed() { LoggedInEmpID = sessionStorage.getItem("LoggedInEmpID"); var ModuleID = 7; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Settings.aspx/GetRestrictionsByFormEmpID", data: "{'ModuleID':'" + ModuleID + "','EmpID': '" + LoggedInEmpID + "'}", dataType: "json", success: function (data) { if (data.d != null) { for (var i = 0; i < data.d.length; i++) { console.log('data.d[i].Action-' + data.d[i].Action) if (data.d[i].Action == 'Change') { $('#boxSettings').show(); } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function GetReportsAllowed() { LoggedInEmpID = sessionStorage.getItem("LoggedInEmpID"); var ModuleID = 6; console.log('In Reports Allowed Module Reports') $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Settings.aspx/GetRestrictionsByFormEmpID", data: "{'ModuleID':'" + ModuleID + "','EmpID': '" + LoggedInEmpID + "'}", dataType: "json", success: function (data) { if (data.d != null) { for (var i = 0; i < data.d.length; i++) { console.log('data.d[i].Action-' + data.d[i].Action) if (data.d[i].Action == 'View') { $('#boxReports').show(); } } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function showLeaveSummary() { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebMethods/Attendance.aspx/GetLeaveSummary", data: "", dataType: "json", success: function (data) { if (data.d != null) { $("#dvLeaveSummary").empty(); var str = "<table style='width:100%' class='table'><thead><tr><td><b>Type</b></td><td><b>Count</b></td></tr></thead><tbody>"; for (i = 0; i < data.d.length; i++) { var hdr = data.d[i].RowData; str += hdr; } $("#dvLeaveSummary").append(str); $("#dvLeaveSummary").append("</tbody></table>"); //$("#dvLeaveSummary").show(); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件