<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Attend.aspx.cs" Inherits="SWTraining.Class.Attend"
    Title="教务管理-上课点名" %>

<%@ Register Src="../UserCol/Progress.ascx" TagName="Progress" TagPrefix="uc1" %>
<%@ Import Namespace="SWTraining" %>
<!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 id="Head1" runat="server">
    <link id="linkStyle" runat="server" href="../Themes/Orange/css.css" rel="stylesheet"
        type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div id="sw_content">
        <div class="divpanel">
            <table cellspacing="0" border="0" style="width: 100%">
                <tr>
                    <td style="width: 120px; vertical-align: top">
                        <table class="table" cellspacing="0">
                            <tr>
                                <th>
                                    学员名单簿
                                </th>
                            </tr>
                            <tr>
                                <td>
                                    <asp:ListBox ID="lbxStudents" runat="server" Height="320px" Width="100%" DataTextField="StudentName"
                                        DataValueField="StuClassID" SelectionMode="Multiple"></asp:ListBox>
                                    <asp:Button ID="btnSelectAll" runat="server" Text="全选" OnClick="btnSelectAll_Click" />
                                    <asp:Button ID="btnCancel" runat="server" OnClick="btnCancel_Click" Text="取消" />
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td style="vertical-align: top">
                        <div class="divpanel">
                            <table class="table" cellspacing="0">
                                <tr>
                                    <th>
                                        操作面板
                                    </th>
                                </tr>
                                <tr>
                                    <td style="vertical-align: bottom;">
                                        <div>
                                            本课课题：<asp:TextBox ID="tbxSubject" runat="server"></asp:TextBox>
                                            <asp:Button ID="btnSave" runat="server" Text="更新" OnClick="btnSave_Click" />
                                        </div>
                                        <div style="float: left">
                                            批量考勤：</div>
                                        <div style="float: left">
                                            <asp:RadioButtonList ID="rblAtStateID" runat="server" RepeatDirection="Horizontal">
                                                <asp:ListItem Value="1" Text="出勤" Selected="True"></asp:ListItem>
                                                <asp:ListItem Value="2" Text="迟到"></asp:ListItem>
                                                <asp:ListItem Value="3" Text="早退"></asp:ListItem>
                                                <asp:ListItem Value="4" Text="旷课"></asp:ListItem>
                                                <asp:ListItem Value="5" Text="请假"></asp:ListItem>
                                            </asp:RadioButtonList>
                                        </div>
                                        <div style="float: left; height: 100%">
                                            备注：<asp:TextBox ID="tbxRemark" runat="server"></asp:TextBox>
                                            <asp:Button ID="btnExe" runat="server" Text="执行" OnClick="btnExe_Click" />
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="divpanel">
                            <asp:GridView ID="GridView1" runat="server" CssClass="gridview" AutoGenerateColumns="False"
                                DataKeyNames="AttendID" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowEditing="GridView1_RowEditing"
                                OnRowUpdating="GridView1_RowUpdating" OnRowDeleting="GridView1_RowDeleting" OnRowDataBound="GridView1_RowDataBound">
                                <Columns>
                                    <asp:BoundField DataField="StudentID" ReadOnly="True" HeaderText="学号" />
                                    <asp:TemplateField HeaderText="姓名">
                                        <ItemTemplate>
                                            <%#Eval("StudentName")%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="选班状态">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="ScStateID" Text='<%# Rs.Items.GetScState(Eval("ScStateID")) %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="课时">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="labCurrentLessons" Text='<%#Eval("CurrentLessons") %>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlLessons" runat="server">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="出勤状态">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="AtStateID" Text='<%# Rs.Items.GetAtState(Eval("AtStateID"))%>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlAtStateID" runat="server">
                                                <asp:ListItem Value="1" Text="正常"></asp:ListItem>
                                                <asp:ListItem Value="2" Text="迟到"></asp:ListItem>
                                                <asp:ListItem Value="3" Text="早退"></asp:ListItem>
                                                <asp:ListItem Value="4" Text="旷课"></asp:ListItem>
                                                <asp:ListItem Value="5" Text="请假"></asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="签到">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="labSignOn" Text='<%#Eval("SignOn","{0:HH:mm}")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="签退">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="labSignOut" Text='<%#Eval("SignOut","{0:HH:mm}")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="备注">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="RemarkText" Text='<%#Eval("Remark")%>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="tbxRemark" Text='<%#Eval("Remark")%>' runat="server" TextMode="SingleLine"
                                                Rows="2" Columns="30"></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="个人课时进度">
                                        <ItemTemplate>
                                            <uc1:Progress ID="Progress1" runat="server" MaxNum='<%#Eval("Lessons") %>' MinNum='<%#Eval("CourseProgress") %>'
                                                ProgressParentWidth="60%" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:CommandField HeaderText="编辑" EditText="编辑" CancelText="取消" UpdateText="更新" ShowEditButton="true" />
                                    <asp:TemplateField HeaderText="删除">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lbnDelete" runat="server" CommandName="Delete" Text="删除" OnClientClick="<%# Rs.Messages.确定删除%>"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </div>
                        <div class="divpanel">
                            <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <div class="divpanel" style="text-align: center">
            <input id="Button1" causesvalidation="false" type="button" runat="server" onclick="back()" value="返回" />
        </div>
        <div class="divremark">
            注意：选班日期在上课日期之后的学员不会出现在名单簿上。
        </div>
    </div>
    </form>
</body>
</html>
