<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserSignInManage.aspx.cs"
    Inherits="SWTraining.Personnel.UserSignInManage" Title="人事管理-员工签到管理" %>

<%@ Register Src="../UserCol/Progress.ascx" TagName="Progress" TagPrefix="uc1" %>
<%@ Import Namespace="SWTraining" %>
<%@ Register Src="../UserCol/SimpleCode.ascx" TagName="SimpleCode" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="tool_Search">
        员工：<asp:DropDownList ID="ddlEmployee" runat="server" DataTextField="TrueName" DataValueField="UserID">
        </asp:DropDownList>
        <uc2:SimpleCode ID="SimpleCode1" runat="server" CodeType="Users" UsersControlID="ddlEmployee" />
        日期：<asp:TextBox ID="tbxStartDate" runat="server" Width="96px"></asp:TextBox>
        至<asp:TextBox ID="tbxEndDate" runat="server" Width="92px"></asp:TextBox>
        <label class="lab_buttom">
<asp:Button ID="btnSelect" runat="server" OnClick="btnSelect_Click" Text="查询" />
</label></div>
    <div class="both">
    </div>
    <div class="divpanel">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="gridview"
            DataKeyNames="TimecardID,DateAndTime,UserID" OnRowCancelingEdit="GridView1_RowCancelingEdit"
            OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating">
            <Columns>
                <asp:BoundField DataField="TimecardID" HeaderText="编号" ReadOnly="True" />
                <asp:BoundField DataField="TrueName" HeaderText="姓名" ReadOnly="True" />
                <asp:BoundField DataField="DateAndTime" DataFormatString="{0:d}" HeaderText="日期"
                    ReadOnly="true" />
                <asp:TemplateField HeaderText="上午">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("AMStart","{0:HH:mm:ss}") +"-"+Eval("AMEnd","{0:HH:mm:ss}") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="tbxAMStart" runat="server" Text='<%# Eval("AMStart","{0:HH:mm:ss}") %>'
                            Width="65px"></asp:TextBox>-<asp:TextBox ID="tbxAMEnd" runat="server" Text='<%# Eval("AMEnd","{0:HH:mm:ss}") %>'
                                Width="65px"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="下午">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("PMStart","{0:HH:mm:ss}") +"-"+Eval("PMEnd","{0:HH:mm:ss}") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="tbxPMStart" runat="server" Text='<%# Eval("PMStart","{0:HH:mm:ss}") %>'
                            Width="65px"></asp:TextBox>-<asp:TextBox ID="tbxPMEnd" runat="server" Text='<%# Eval("PMEnd","{0:HH:mm:ss}") %>'
                                Width="65px"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="晚上">
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("NightStart","{0:HH:mm:ss}") +"-"+Eval("NightEnd","{0:HH:mm:ss}") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="tbxNightStart" runat="server" Text='<%# Eval("NightStart","{0:HH:mm:ss}") %>'
                            Width="65px"></asp:TextBox>-<asp:TextBox ID="tbxNightEnd" runat="server" Text='<%# Eval("NightEnd","{0:HH:mm:ss}") %>'
                                Width="65px"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:CommandField HeaderText="编辑" EditText="编辑" CancelText="取消" UpdateText="更新" CausesValidation="False"
                    ShowEditButton="True" />
                <asp:TemplateField HeaderText="清除">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbnDelete" runat="server" CommandName="Delete" OnClientClick="<%# Rs.Messages.确定删除%>"
                            Text="清除"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div class="divpanel">
        <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
    </div>
    </form>
</body>
</html>
