<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StuBirthday.aspx.cs" Inherits="SWTraining.Affairs.StuBirthday"
    Title="教务管理-今日过生日学员" %>

<%@ 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 runat="server">
    <title></title>
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />

    <script type="text/javascript">
        function Checks(checkbox) {
            for (var i = 0; i < document.forms[0].elements.length; i++) {
                var e = document.forms[0].elements[i];
                if (e.type == "checkbox" && e.id == "id") {
                    e.checked = checkbox.checked;
                }
            }
        }



        function Send() {
            var StudentID = "";
            for (var i = 0; i < document.forms[0].elements.length; i++) {
                var e = document.forms[0].elements[i];
                if (e.type == "checkbox" && e.id == "id") {
                    if (e.checked) {
                        StudentID += "," + e.value;
                    }
                }
            }

            if (StudentID.length > 0) {
                StudentID = StudentID.substring(1, StudentID.length);
                document.getElementById("StudentID").value = StudentID;
                document.formStudent.action = "../SMS/SendToStudent.aspx";
                document.formStudent.submit();
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div class="divpanel">
        <span runat="server" id="spanAllBox">
            <div style="float: left">
                   <fieldset style="width: auto; padding-bottom: 5px">
                        <legend style="font-size: 10px">控制面板</legend>
                        <ul class="grouptools">
                            <li style="float: left">
                                <input onclick="Checks(this)" type="checkbox">
                            </li>
                            <li style="float: left">全选 </li>
                            <li style="float: left" class="ico_sms"></li>
                            <li style="float: left">
                                <asp:HyperLink ID="hlkSMS" runat="server" NavigateUrl='<%#string.Format("javascript:Send();void(0);") %>'
                                    Text="发短信" /></li>
                        </ul>
                    </fieldset>
            </div>
        </span>
    </div>
    <div class="divpanel">
        <asp:GridView ID="GridView1" runat="server" CssClass="gridview" AutoGenerateColumns="False"
            DataKeyNames="StudentID" OnRowDataBound="GridView1_RowDataBound">
            <Columns>
                <asp:TemplateField HeaderText="学号">
                    <ItemTemplate>
                        <span runat="server" id="spanBox">
                            <input type="checkbox" id="id" value='<%#Eval("StudentID")%>' /></span>
                        <asp:Label ID="labStudentID" runat="server" Text='<%# Eval("StudentID") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="学员">
                    <ItemTemplate>
                        <%#Eval("StudentName")%><%# (Convert.IsDBNull(Eval("Byname")) || Eval("Byname").ToString().Trim() == "") ? "" : "(" + Eval("Byname").ToString() + ")"%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="类别">
                    <ItemTemplate>
                        <%#Rs.Items.GetStudentType(Eval("StudentType"))%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="DateAndTime" DataFormatString="{0:d}" HeaderText="报名日期" />
                <asp:TemplateField HeaderText="校区">
                    <ItemTemplate>
                        <%#Eval("SchoolName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="消费总额">
                    <ItemTemplate>
                        <%#Eval("ConsumedMoney","{0:c2}")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="信用金额">
                    <ItemTemplate>
                        <%#Eval("CreditMoney", "{0:c2}")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="可用余额">
                    <ItemTemplate>
                        <%#Eval("AvailableMoney", "{0:c2}")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="最新选班">
                    <ItemTemplate>
                        <%#Eval("LastClassName")%>
                        (<span style="color: Red"><b><%#Eval("StuClassCount")%></b></span>)
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="录入员">
                    <ItemTemplate>
                        <%#Eval("TrueName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="浏览">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlkShow" runat="server" Text="浏览" NavigateUrl='<%# string.Format("StudentShow.aspx?StudentID={0}",Eval("StudentID")) %>' />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    </form>
    <form id="formStudent" name="formStudent" method="post">
    <input id="StudentID" name="StudentID" type="hidden" value="" />
    </form>
</body>
</html>
