<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Class.aspx.cs" Inherits="SWTraining.Class.Class"
    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 runat="server">
    <link id="linkStyle" runat="server" href="../Themes/Orange/css.css" rel="stylesheet"
        type="text/css" />
</head>
<body>

    <script type="text/javascript">
        function Print(ClassID) {
            var doc = document.getElementById("ddlDoc");

            if (doc.selectedIndex >= 0) {
                var templet = doc.options[doc.selectedIndex].value;
                document.frames.PrintWeb.location = "../Report/Print.aspx?DocType=3&ClassID=" + ClassID + "&Templet=" + templet;
            } else
                alert("请选择需要打印的文档。");
        }
    </script>

    <form id="form1" runat="server">
    <div id="sw_content">
        <div class="divpanel">
            <asp:FormView ID="fvClassInfo" runat="server" Width="100%">
                <ItemTemplate>
                    <table cellspacing="0" class="table">
                        <tr>
                            <th colspan="2">
                                班级信息
                            </th>
                            <tr>
                                <td>
                                    编号：
                                </td>
                                <td>
                                    <%# Eval("ClassID") %><asp:Button ID="btnEdit" runat="server" Text="编辑" OnClick="btnEdit_Click" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    班级名称：
                                </td>
                                <td>
                                    <%# Eval("ClassName") %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    课程：
                                </td>
                                <td>
                                    <%# Eval("CourseName") %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    主讲老师：
                                </td>
                                <td>
                                    <%# Eval("TeacherName") %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    总课时：
                                </td>
                                <td>
                                    <%# Eval("Lessons") %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    开课日期：
                                </td>
                                <td>
                                    <%# Eval("StartDate","{0:d}") %>
                                    至
                                    <%# Eval("EndDate","{0:d}") %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    上课规律：
                                </td>
                                <td>
                                    <%# Eval("TimeRule") %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    教室：
                                </td>
                                <td>
                                    <%# Eval("ClassroomName") %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    课程进度：
                                </td>
                                <td>
                                    <uc1:Progress ID="CourseProgress" runat="server" MaxNum='<%# Eval("Lessons") %>'
                                        MinNum='<%# Eval("CourseProgress") %>' Text="课时" Width="80%" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    招生比例：
                                </td>
                                <td>
                                    <uc1:Progress ID="PlanProgress" runat="server" MaxNum='<%# Eval("PlanCount") %>'
                                        MinNum='<%# Eval("StuCount") %>' Text="人" Width="80%" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    出勤率：
                                </td>
                                <td>
                                    <uc1:Progress ID="AttendanceProgress" runat="server" Text="%" Width="80%" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    续报率：
                                </td>
                                <td>
                                    <uc1:Progress ID="ContinueRegProgress" runat="server" Text="%" Width="80%" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    班级介绍：
                                </td>
                                <td>
                                    <%# Eval("Remark") %>
                                </td>
                            </tr>
                        </tr>
                        <tr>
                            <td>
                                打印班级：
                            </td>
                            <td>
                                <select id="ddlDoc">
                                    <option value="sys_Points.xsl">点名表</option>
                                    <option value="sys_Lessons.xsl">课程表</option>
                                    <option value="sys_Student.xsl">学员信息</option>
                                </select>
                                <asp:HyperLink ID="hlkPrint" runat="server" NavigateUrl='<%#string.Format("javascript:Print({0});void(0);",Request.QueryString["ClassID"]) %>'
                                    ImageUrl='<%# accTheme("print.gif")%>'></asp:HyperLink>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:FormView>
        </div>
        <div class="backpanel">
            <input id="Button1" causesvalidation="false" type="button" runat="server" onclick="back()"
                value="返回" />
        </div>
    </div>
    </form>
    <iframe id="PrintWeb" width="0" height="0"></iframe>
</body>
</html>
