<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="courseattendancemanager.aspx.cs" Inherits="Us.Web.Extend.admin.extcourse.courseattendancemanager" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!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">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>出勤管理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <asp:Literal ID="litregscript" runat="server" Text=""></asp:Literal><link href="../style/default/style.css" rel="stylesheet" type="text/css" />
    <%=ImportScriptStr %>
    <script language="javascript" src="/admin/My97DatePicker/WdatePicker.js" type="text/jscript"></script>
    <script type="text/javascript" src="/admin/js/jquery.freezeheader.js"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#rptInfo").freezeHeader();

            $("input").keyup(function () {
                $(this).val($(this).val().replace(/[^0-9.-]/g, ''));
            }).bind("paste", function () { //CTR+V事件处理  $(this).val($(this).val().replace(/[^0-9.]/g,''));   
            }).css("ime-mode", "disabled"); //CSS设置输入法不可用 







            $(".ResultsType").change(function () {
                var v = $(this).val();
                if (v != "0") {
                    $(this).parent().parent().css('background-color', '#D4E7F0');
                }
                else {
                    $(this).parent().parent().css('background-color', '#ffffff');
                }
            });

            $(".ResultsType").each(function () {
                $(this).change();
            });


            $(".fontblue").each(function () {
                var v = $(this).html();
                if (v != "在读") {
                    $(this).parent().parent().css('background-color', '#EEEEEE');
                }
                else {
                    //$(this).parent().css('background-color', '#ffffff');
                }
            });
        });
    </script>
</head>
<body onload="win_onLoad();">
    <form id="form1" runat="server">

        <div id="tbMain">
            <div class="divTbg">
                <div class="divTbgL">
                </div>
                <div class="divTbgInfo">
                    <div class="divTbgTitle">
                        出勤管理
                    </div>
                </div>
            </div>
            <div class="divTbgF">
            </div>
            <div class="divTNavBG" id="topURL">
                <ul id="topURLul">
                    <li class="divURLed" id="div1">
                        <div>
                            <img src="../style/default/images/mini_icons_046.gif" width="10" height="10" />
                            基本信息
                        </div>
                    </li>
                </ul>
            </div>
            <div id="mypanel">
                <div class="divInfoContext">
                    <div class="divInfo">
                        <div class="divInfoblack">
                            <div class="divInfoTopList">
                                <div class="listLeft">
                                    <div class="navtitle">
                                        1.出勤基本信息
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="divInfo">
                        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" id="mainlist">
                            <tr class="tablisttr">
                                <td class="tablisttitle">出勤标题
                                </td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtSATtile" runat="server" ToolTip="出勤标题" CssClass="1"></asp:TextBox>
                                </td>
                                <td class="tablisttitle">出勤时间
                                </td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtSADate" runat="server" ToolTip="出勤时间"
                                        onClick="WdatePicker({skin:'whyGreen',isShowClear:false,readOnly:true,dateFmt:'yyyy-MM-dd'});"
                                        ></asp:TextBox>
                                </td>
                            </tr>
                            <tr class="tablisttr">
                                <td class="tablisttitle">出勤类型
                                </td>
                                <td class="tabmanagertr">
                                    <asp:DropDownList runat="server" ID="drpSAType">
                                        <asp:ListItem Value="SAType" Text="codeno"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td class="tablisttitle">班级人数
                                </td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtSANumber" runat="server" ToolTip="班级人数" ReadOnly="True">0</asp:TextBox>
                                    <div class="nodisplay">
                                        <asp:TextBox runat="server" ID="txtSkyCID"></asp:TextBox>
                                        <asp:TextBox runat="server" ID="txtAttID" Text="1001"></asp:TextBox>
                                        <asp:TextBox runat="server" ID="txtSkyDepartCourseID"></asp:TextBox>
                                    </div>
                                </td>
                            </tr>
                            <tr class="tablisttr">
                                <td class="tablisttitle">出勤人数
                                </td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtSAYesNumber" runat="server" ToolTip="出勤人数" ReadOnly="True">0</asp:TextBox>
                                </td>
                                <td class="tablisttitle">出勤率
                                </td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtSAYesP" runat="server" ToolTip="出勤率" ReadOnly="True">0</asp:TextBox>
                                </td>
                            </tr>
                            <tr class="tablisttr">
                                <td class="tablisttitle">缺勤人数
                                </td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtSANoNumber" runat="server" ToolTip="缺勤人数" ReadOnly="True">0</asp:TextBox>
                                </td>
                                <td class="tablisttitle">缺勤率
                                </td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtSANoP" runat="server" ToolTip="缺勤率" ReadOnly="True">0</asp:TextBox>
                                </td>
                            </tr>
                            <tr class="tablisttr">
                                <td class="tablisttitle">备注说明
                                </td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:TextBox ID="txtSAInfo" runat="server" ToolTip="备注说明" Height="40px"
                                        TextMode="MultiLine" Width="100%"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                        <div class="divSave">
                            <asp:Button ID="btnSubmit" runat="server" Text="保存(S)" CssClass="SkyButtonFocus"
                                OnClick="btnSubmit_Click" />
                            <asp:Button ID="btnExit" runat="server" Text="取消(C)" CssClass="SkyButtonFocus" OnClick="btnSubmit_Click" />
                        </div>
                    </div>
                    <div class="divInfo">
                        <span class="usHelpMessage">* 注意事项： 1.先初始化后，在录入出勤信息；2.提交和出勤保存功能基本相同，提交会调用保存功能，会关闭页面，但是出勤保存只会保存出勤信息，不会提交其他信息；


                        </span>
                    </div>

                    <div>
                        <div class="divInfo">
                            <div class="divInfoblack">
                                <div class="divInfoTopList">
                                    <div class="listLeft">
                                        <div class="navtitle">
                                            2.出勤操作区
                                        </div>

                                    </div>

                                </div>
                            </div>
                        </div>



                        <div class="divInfo">
                            <div class="divsquare">
                                <div class="divSave">
                                    <asp:Button ID="btnInit" runat="server" Text="出勤初始化" CssClass="SkyButtonFocus" OnClick="btnInit_Click" ToolTip="" />
                                    <asp:Button ID="btnSync" runat="server" Text="出勤同步" CssClass="SkyButtonFocus" OnClick="btnSync_Click" ToolTip="" />
                                    <asp:Button ID="btnSave" runat="server" Text="出勤保存" CssClass="SkyButtonFocus" OnClick="btnSave_Click" ToolTip="" />

                                </div>
                            </div>
                        </div>

                        <div class="divInfo">


                            <asp:Repeater runat="server" ID="rptInfo">
                                <HeaderTemplate>
                                    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" id="rptInfo" onmouseover="changeto()" onmouseout="changeback()">
                                        <thead>
                                            <tr class="tablisttitle">

                                                <td>序号</td>
                                                <td>编号</td>
                                                <td>学生学号</td>
                                                <td>学生名称</td>
                                                <td>学生状态</td>
                                                <td>出勤状态</td>
                                                <td>出勤说明</td>
                                            </tr>
                                        </thead>

                                        <tbody>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr class="tablisttr">

                                        <td><%#Container.ItemIndex+1%></td>
                                        <td><%#Eval("ID")%></td>
                                        <td><%#Eval("UserID")%>

                                            <%--      <asp:HiddenField runat="server" ID="Acount" Value='<%#Eval("Acount") %>' />
                                            <asp:HiddenField runat="server" ID="CourseName" Value='<%#Eval("CourseName") %>' />
                                            <asp:HiddenField runat="server" ID="SkyTID" Value='<%#Eval("SkyTID") %>' />--%>

                                        </td>
                                        <td><%#Eval("UserName")%></td>

                                        <td><span class="fontblue"><%#Eval("SStateName")%></span></td>


                                        <td>
                                            <asp:DropDownList runat="server" ID="drpAttState" CssClass="ResultsType">
                                            </asp:DropDownList>
                                            <asp:HiddenField runat="server" ID="hidAttState" Value='<%#Eval("AttState") %>' />
                                            <asp:HiddenField runat="server" ID="hidID" Value='<%#Eval("ID") %>' />
                                            <asp:HiddenField runat="server" ID="hidUserName" Value='<%#Eval("UserName") %>' />
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtAttInfo" Text='<%#Eval("AttInfo")%>'></asp:TextBox>
                                        </td>

                                    </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    </tbody></table>
                                </FooterTemplate>
                            </asp:Repeater>



                        </div>


                        <div class="divInfo nodisplay">
                            <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist">
                                <tr>
                                    <td class="tablisttr"></td>
                                </tr>
                            </table>
                        </div>

                    </div>

                    <div id="ddiv4">


                    <div class="divInfo">
                        <div class="divInfoblack">
                            <div class="divInfoTopList">
                                <div class="listLeft">
                                    <div class="navtitle">
                                        3.导入导出考勤
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="divInfo">
                        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist">

                            <tr class="tablisttr" runat="server">
                                <td width="100" align="center" class="tablisttitle">选择EXCEL </td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtExcelPath" runat="server" Width="339px">/upload/systemplate/attendance.xlsx</asp:TextBox>
                                    <a href="#" onclick="SkyOpen('txtExcelPath');">[选择]</a>
                                    <a href="#" onclick="SkyView('txtExcelPath');">[查看]</a>

                                    <a href="/upload/systemplate/attendance.xlsx" target="_blank">[标准文件下载]</a>

                                </td>
                            </tr>
                            <tr class="tablisttr" runat="server">
                                <td align="center" class="tablisttitle">选择操作</td>
                                <td class="tabmanagertr"><span class="divSave">

                                    <asp:Button ID="btnImport" runat="server" CssClass="SkyButtonFocus" Text="考勤导入" OnClick="btnImport_Click" />
                                    <asp:Button ID="btnExport" runat="server" CssClass="SkyButtonFocus" Text="考勤导出" OnClick="btnExport_Click" />


                                </span></td>
                            </tr>

                            <tr class="tablisttr" runat="server">
                                <td align="center" class="tablisttitle">操作提示</td>
                                <td class="tabmanagertr">
                                    <div style="max-height: 80px; overflow: auto; line-height: 18px; font-size: 12px;">
                                        <asp:Literal ID="litImport" runat="server" EnableViewState="False">请按导入模板进行导入！</asp:Literal>
                                    </div>
                                </td>
                            </tr>

                        </table>
                    </div>
                </div>

                </div>
            </div>
        </div>

    </form>
</body>
</html>
