<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelectClass.aspx.cs" Inherits="MTCUN.Mobile.Affairs.SelectClass"
    Title="选班处理-教务" %>

<%@ Import Namespace="MTCUN" %>
<%@ Register Src="../../UserCol/SimpleCode.ascx" TagName="SimpleCode" TagPrefix="uc1" %>
<%@ Register Src="../User_Col/col_Header.ascx" TagName="col_Header" 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="mobileCss" runat="server" href="../themes/mobile.css" rel="stylesheet"
        type="text/css" />

    <script type="text/javascript">
        function OpenSearch() {
            if (setContent.style.display == 'none') {
                setContent.style.display = 'block';
                setControl.innerHTML = '▲搜索';
                __mt__setSearchCookie(1);
            }
            else {
                setContent.style.display = 'none';
                setControl.innerHTML = '▼搜索';
                __mt__setSearchCookie(0);
            }
        }

        function defaultSearchState() {
            var num = __mt__getSearchCookie();
            if (num == 1) {
                setContent.style.display = 'block';
                setControl.innerHTML = '▲搜索';
            }
            else {
                setContent.style.display = 'none';
                setControl.innerHTML = '▼搜索';
            }
        }
    </script>
</head>
<body onload="defaultSearchState()">
    <form id="form1" runat="server">
        <uc2:col_Header ID="col_Header1" runat="server" />
        <div id="web_page_contents">
            <div class="search biao_zhun_suo_jin">

                <div class="setandsearch">
                    <ul class="searchtool">
                        <li>
                            <div id="setControl" onclick="OpenSearch()">
                                ▼搜索
                            </div>
                        </li>
                    </ul>

                    <div id="setContent" style="display: none">
                        <h1>快速查询</h1>

                        <table class="table_simple_kuan" cellspacing="0">
                            <tr>
                                <td style="width: 85px">校区：</td>
                                <td>
                                    <asp:DropDownList ID="ddlSchool" runat="server" DataTextField="SchoolName" DataValueField="SchoolID">
                                    </asp:DropDownList></td>
                            </tr>
                            <tr>
                                <td>分类：</td>
                                <td>
                                    <asp:DropDownList ID="ddlCourseType" runat="server" DataTextField="CourseTypeName"
                                        DataValueField="CourseTypeID" AutoPostBack="True" OnSelectedIndexChanged="ddlCourseType_SelectedIndexChanged">
                                    </asp:DropDownList></td>
                            </tr>
                            <tr>
                                <td>课程：</td>
                                <td>
                                    <span class="inline_block">
                                        <asp:DropDownList ID="ddlCourse" runat="server" DataTextField="CourseName" DataValueField="CourseID">
                                        </asp:DropDownList></span>
                                    <span class="inline_block">
                                        <uc1:SimpleCode ID="SimpleCode1" runat="server" UsersControlID="ddlCourse" CodeType="Course" />
                                    </span>


                                </td>
                            </tr>
                            <tr>
                                <td>ID卡号：</td>
                                <td>
                                    <asp:TextBox ID="tbxSignInID" runat="server"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td>学号：</td>
                                <td>
                                    <asp:TextBox ID="tbxStudentID" runat="server"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td>姓名：</td>
                                <td>
                                    <asp:TextBox ID="tbxStudentName" runat="server"></asp:TextBox></td>
                            </tr>
                        </table>
                        <label class="lab_button">
                            <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" />
                        </label>
                    </div>

                </div>

                <div class="divpanel">

                    <asp:Repeater ID="repBlock" runat="server" OnItemCommand="repBlock_ItemCommand"
                        OnItemDataBound="repBlock_ItemDataBound">
                        <ItemTemplate>

                            <div class="kuai">
                                <h1 class="auto_length_title">
                                    <%#Eval("StudentName")%>
                                </h1>

                                <table class="table" cellspacing="0" border="0" style="table-layout: fixed; word-break: break-all; word-wrap: break-word">
                                    <tr>
                                        <td style="width: auto">课程：</td>
                                        <td style="width: auto"><%# Eval("ProductName") %></td>
                                    </tr>

                                    <tr>
                                        <td style="width: auto">单价：</td>
                                        <td style="width: auto"><%# Eval("UnitPrice","{0:c2}") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">数量：</td>
                                        <td style="width: auto"><%# Eval("Amount") %><%# Eval("UnitName") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">优惠：</td>
                                        <td style="width: auto"><%# Eval("Favorable","{0:c2}") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">小计：</td>
                                        <td style="width: auto"><%# Eval("TotalPrice","{0:c2}") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">日期：</td>
                                        <td style="width: auto"><%#Eval("DateAndTime")%></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">单号：</td>
                                        <td style="width: auto"><%# Eval("BillID") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">备注：</td>
                                        <td style="width: auto"><%# Eval("Remark") %></td>
                                    </tr>
                                </table>

                                <asp:Panel ID="plItem" runat="server">
                                    <table class="table_simple_kuan">
                                        <tr>
                                            <td style="width: 45px">类型：</td>
                                            <td>
                                                <table class="table_simple_kuan" runat="server" id="tbContinueReg">
                                                    <tr>
                                                        <td><%# Rs.Items.GetStuClassType(Eval("ContinueReg")) %></td>
                                                        <td>
                                                            <div class="lab_button" runat="server" id="divEdit">
                                                                <asp:LinkButton ID="lbnEdit" runat="server" CommandName="Edit" Text='修改' CommandArgument='<%#Eval("BillItemID") %>'></asp:LinkButton>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <asp:Panel ID="plEdit" runat="server">
                                    <table class="table_simple_kuan">
                                        <tr>
                                            <td style="width: 45px">类型：</td>
                                            <td>

                                                <div class="striking">
                                                    <asp:DropDownList ID="ddlContinueReg" runat="server">
                                                        <asp:ListItem Value="-1">待定</asp:ListItem>
                                                        <asp:ListItem Value="0">试听</asp:ListItem>
                                                        <asp:ListItem Value="1" Selected="True">新增</asp:ListItem>
                                                        <asp:ListItem Value="2">续报</asp:ListItem>
                                                    </asp:DropDownList>
                                                    <table class="table_simple_kuan">
                                                        <tr>
                                                            <td>
                                                                <div class="lab_button">
                                                                    <asp:LinkButton ID="lbnCancel" runat="server" CommandName="Cancel">取消</asp:LinkButton>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <div class="lab_button">
                                                                    <asp:LinkButton ID="lbnUpdate" runat="server" CommandName="Update" CommandArgument='<%#Eval("BillItemID") %>'>保存</asp:LinkButton>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>

                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>

                                <table class="table_simple_kuan">
                                    <tr>
                                        <td style="width:50%">
                                            <div class="lab_button">
                                                <asp:HyperLink ID="hlkControlPanel" runat="server" Text="控制面板" NavigateUrl='<%# string.Format("StuProduct.aspx?StudentID={0}&topURL={1}",Eval("StudentID"),swq.Web.PathAndQuery()) %>' />
                                            </div>
                                        </td>
                                        <td>
                                            <div class="lab_button statebg" runat="server" id="divState">
                                                <asp:HyperLink runat="server" ID="hlkState"></asp:HyperLink>
                                                <asp:LinkButton ID="lbnState" runat="server" CommandName="ChangeState" CommandArgument='<%#Eval("BillItemID") %>'></asp:LinkButton>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>

                        </ItemTemplate>
                    </asp:Repeater>
                </div>

                <div class="pager_button">
                    <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
                </div>

                <div class="backpanel">
                    <label class="lab_button_kuan" id="__mt_labBack" runat="server">
                        <input causesvalidation="false" type="button" runat="server" onclick="back(this)" value="返回" />
                    </label>
                </div>

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