📄 signstatistic.aspx
字号:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"AutoEventWireup="true" CodeFile="SignStatistic.aspx.cs" Inherits="MonuoalSign_SignStatistic" %>
<asp:Content ID="kaoqincha" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
<script language="javascript" type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>
<script language="javascript" type="text/javascript">
function fillstring(str)
{
if(str.length==1)
{
str = "0" + str;
}
return(str);
}
function quickseldate(type)
{
var begintime,endtime;
var oneminute = 60*1000;
var onehour = 60*oneminute;
var oneday = 24*onehour;
var oneweek = 7*oneday;
var todayDate = new Date();
var date = todayDate.getDate();
var month= todayDate.getMonth() +1;
var year= todayDate.getYear();
var day = todayDate.getDay();
if(navigator.appName == "Netscape")
{
year = 1900 + year;
}
//-->
if(type=="day")
{
begintime = year.toString() + "-" + fillstring(month.toString()) + "-" +
fillstring(date.toString());
endtime = begintime;
}
else if(type=="week")
{
var daytoMon = day-1;
if(day==0)
daytoMon = 6;
todayDate.setTime(todayDate.getTime()-daytoMon*oneday);
date = todayDate.getDate();
month= todayDate.getMonth() +1;
year= todayDate.getYear();
day = todayDate.getDay();
begintime = year.toString() + "-" + fillstring(month.toString()) + "-" +
fillstring(date.toString());
todayDate.setTime(todayDate.getTime()+6*oneday);
date = todayDate.getDate();
month= todayDate.getMonth() +1;
year= todayDate.getYear();
endtime = year.toString() + "-" + fillstring(month.toString()) + "-" +
fillstring(date.toString());
}
else if(type=="month")
{
var dateto1 = date-1;
todayDate.setTime(todayDate.getTime()-dateto1*oneday);
date = todayDate.getDate();
month= todayDate.getMonth() +1;
year= todayDate.getYear();
day = todayDate.getDay();
begintime = year.toString() + "-" + fillstring(month.toString()) + "-" +
fillstring(date.toString());
todayDate.setMonth(month);
todayDate.setTime(todayDate.getTime()-oneday);
date = todayDate.getDate();
month= todayDate.getMonth() +1;
year= todayDate.getYear();
endtime = year.toString() + "-" + fillstring(month.toString()) + "-" +
fillstring(date.toString());
}
document.getElementById("<% = txtBeginTime.ClientID %>").value = begintime;
document.getElementById("<% = txtEndTime.ClientID %>").value = endtime;
}
</script>
<div style="width:99%;height:30px; text-align:left;">
当前位置:员工考勤统计</div>
<div style="text-align:center"><b>员 工 考 勤 统 计</b></div>
<TABLE cellSpacing="0" cellPadding="0" width="95%" dataPageSize="56">
<tr>
<td colspan="2">
<asp:UpdatePanel id="upManualSignStatistic" runat="server" UpdateMode="conditional">
<ContentTemplate>
<TABLE><TBODY><TR><TD style="WIDTH: 91px; HEIGHT: 39px" align=center>输入时间段:</TD><TD style="HEIGHT: 39px"> 开始时间: <asp:textbox id="txtBeginTime" onfocus="new WdatePicker(this,'%Y-%M-%D',true,'default')" runat="server" Width="141px" CssClass="inputCss"></asp:textbox> * ----- 结束时间: <asp:textbox id="txtEndTime" onfocus="new WdatePicker(this,'%Y-%M-%D',true,'default')" runat="server" Width="149px" CssClass="inputCss"></asp:textbox> * <asp:CompareValidator id="cvTime" runat="server" Display="Dynamic" ControlToValidate="txtEndTime" Operator="GreaterThanEqual" ErrorMessage="结束时间不应小于开始时间" ControlToCompare="txtBeginTime"></asp:CompareValidator> <asp:radiobutton id="rdoThisDay" onclick="quickseldate('day');" runat="server" Text="本日" GroupName="quickdate"></asp:radiobutton> <asp:radiobutton id="rdoThisWeek" onclick="quickseldate('week');" runat="server" Text="本周" GroupName="quickdate"></asp:radiobutton> <asp:radiobutton id="rdoThisMonth" onclick="quickseldate('month');" runat="server" Text="本月" GroupName="quickdate"></asp:radiobutton></TD></TR><TR><TD style="HEIGHT: 1px" vAlign=middle align=center colSpan=2>
<HR width="95%" color=gray SIZE=1 />
</TD></TR><TR><TD colSpan=2> 机构: <asp:dropdownlist id="ddlBranchs" runat="server" Width="160px" CssClass="ddlCss" OnSelectedIndexChanged="ddlBranchs_SelectedIndexChanged" AutoPostBack="True"></asp:dropdownlist> 部门: <asp:dropdownlist id="ddlDeparts" runat="server" Width="184px" CssClass="ddlCss"></asp:dropdownlist> <asp:Button id="btnStatistic" onclick="btnStatistic_Click" runat="server" Height="23px" Width="110px" CssClass="buttonCss" Text="统 计"></asp:Button> <asp:Button id="btnLoad" runat="server" Height="23px" Width="110px" Enabled="False" CssClass="buttonCss" Text="导入Excel打印"></asp:Button> </TD></TR><TR><TD width="100%" colSpan=2><TABLE id="print" width="100%" runat="server"><TBODY><TR><TD style="HEIGHT: 100%" vAlign=top align=center width="90%" colSpan=2><asp:GridView id="gvSignInfoStatistic" runat="server" Width="96%" DataKeyNames="SignId" AutoGenerateColumns="False" BorderColor="#66CCFF" BorderWidth="1px" CellPadding="4" OnRowDataBound="gvSignInfoStatistic_RowDataBound"><Columns>
<asp:BoundField DataField="SignId" HeaderText="姓名"></asp:BoundField>
<asp:BoundField DataField="SignId" HeaderText="出勤率(%)"></asp:BoundField>
<asp:BoundField DataField="SignId" HeaderText="迟到次数"></asp:BoundField>
<asp:BoundField DataField="SignId" HeaderText="早退次数"></asp:BoundField>
<asp:BoundField DataField="SignId" HeaderText="旷工次数"></asp:BoundField>
<asp:BoundField DataField="SignId" HeaderText="所属部门"></asp:BoundField>
<asp:BoundField DataField="SignId" HeaderText="所属机构"></asp:BoundField>
</Columns>
</asp:GridView> </TD></TR><TR><TD align=center colSpan=2><DIV id="divReportUser" runat="server" visible="false"> 制表人: <asp:Label style="POSITION: static" id="lblReportUser" runat="server" Font-Bold="True" Width="88px"></asp:Label> 上报日期: <asp:label id="lblReportTime" runat="server" Font-Bold="True" Width="106px"></asp:label> </DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</ContentTemplate>
</asp:UpdatePanel> s
</td>
</tr>
</TABLE>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -