📄 timesheet.aspx
字号:
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="TimeSheet.aspx.vb" Inherits="TimeSheet" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td class="General" nowrap>TimeSheet for
<b><%=Request.QueryString("UserName")%></b></td>
<td><asp:Button ID="btnSave" runat="server" Text="Save" CssClass="FlatButton" /></td>
<td>
<asp:Button ID="btnSubmit" runat="server" CssClass="FlatButton" Text="Submit" /></td>
<td class="General">Week Ending Date<asp:DropDownList ID="cboWeekEndingDate" runat="server" AutoPostBack="True"
CssClass="General">
</asp:DropDownList></td>
</tr>
<tr>
<td colspan="4" class="Spacer" style="height: 5px"></td>
</tr>
<tr>
<td colspan="4" class="CellOutline">
<%Call DisplayTimeSheet()%>
</td>
</tr>
</table>
<script language=javascript>
function IsNumeric()
{
switch (event.keyCode)
{
case 8:
//Backspace
event.returnValue = true;
break;
case 9:
//Tab
event.returnValue = true;
break;
case 48:
//0
event.returnValue = true;
break;
case 96:
//0
event.returnValue = true;
break;
case 49:
//1
event.returnValue = true;
break;
case 97:
//1
event.returnValue = true;
break;
case 50:
//2
event.returnValue = true;
break;
case 98:
//2
event.returnValue = true;
break;
case 51:
//3
event.returnValue = true;
break;
case 99:
//3
event.returnValue = true;
break;
case 52:
//4
event.returnValue = true;
break;
case 100:
//4
event.returnValue = true;
break;
case 53:
//5
event.returnValue = true;
break;
case 101:
//5
event.returnValue = true;
break;
case 54:
//6
event.returnValue = true;
break;
case 102:
//6
event.returnValue = true;
break;
case 55:
//7
event.returnValue = true;
break;
case 103:
//7
event.returnValue = true;
break;
case 56:
//8
event.returnValue = true;
break;
case 104:
//8
event.returnValue = true;
break;
case 57:
//9
event.returnValue = true;
break;
case 105:
//9
event.returnValue = true;
break;
default:
//All others
event.returnValue = false;
break;
}
}
function Recalculate(dayofweek)
{
//Get the number of rows
var intCount = document.all.txtMondayHours.length;
//Find the day of the week that you are working with
switch (dayofweek)
{
case "Monday":
//Set the current total to 0 as it will be recalculated
document.all.txtMondayTotal.value = 0;
//Process each row of data adding it to the total
for (i=0;i<intCount;i++)
{
document.all.txtMondayTotal.value =
parseInt(document.all.txtMondayTotal.value) +
parseInt(document.all.txtMondayHours[i].value);
}
break;
case "Tuesday":
//Set the current total to 0 as it will be recalculated
document.all.txtTuesdayTotal.value = 0;
//Process each row of data adding it to the total
for (i=0;i<intCount;i++)
{
document.all.txtTuesdayTotal.value =
parseInt(document.all.txtTuesdayTotal.value) +
parseInt(document.all.txtTuesdayHours[i].value);
}
break;
case "Wednesday":
//Set the current total to 0 as it will be recalculated
document.all.txtWednesdayTotal.value = 0;
//Process each row of data adding it to the total
for (i=0;i<intCount;i++)
{
document.all.txtWednesdayTotal.value =
parseInt(document.all.txtWednesdayTotal.value) +
parseInt(document.all.txtWednesdayHours[i].value);
}
break;
case "Thursday":
//Set the current total to 0 as it will be recalculated
document.all.txtThursdayTotal.value = 0;
//Process each row of data adding it to the total
for (i=0;i<intCount;i++)
{
document.all.txtThursdayTotal.value =
parseInt(document.all.txtThursdayTotal.value) +
parseInt(document.all.txtThursdayHours[i].value);
}
break;
case "Friday":
//Set the current total to 0 as it will be recalculated
document.all.txtFridayTotal.value = 0;
//Process each row of data adding it to the total
for (i=0;i<intCount;i++)
{
document.all.txtFridayTotal.value =
parseInt(document.all.txtFridayTotal.value) +
parseInt(document.all.txtFridayHours[i].value);
}
break;
}
}
</script>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -