<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="classscoreinput.aspx.cs"  Inherits="School_Web.admin.score.classscoreinput" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ 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">
    <title>
        <asp:Literal ID="LiteralTitle" runat="server" EnableViewState="true"></asp:Literal>
    </title>

    <script language="javascript" src="/admin/js/SystemPage.js" type="text/jscript"></script>

    <link href="../style/green/skin.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="/admin/style/jquery/jquery.js"></script>

    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
            $("#topURLul").children().click(function() {
                $(this).siblings().removeClass().end().addClass("divURLed");
				$("#mypanel").children().css("display","none");
				$("#d"+ this.id).css("display","");
				
				//alert(this.id);
            });
            $("#topURLul").children().hover(
              function() {
                  $(this).addClass("divURLon");
                //akon(this);
              },
              function() {
                  if ($(this).attr("class") != "divURLed") {
                      $(this).removeClass("divURLon");
                  }
              }
            );
        });
    </script>

    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
           chkState();
        });
        function chkState()
        {
            $(":checkbox").click( function () { 
                
                var chkid=$(this).attr("id");
                if(chkid=="checkSelect")
                {
                    return ;
                }
                if(chkid=="chkSelect")
                {
                    
                }
                chkid=chkid.replace("chkIsMakeup","TextBox6");
                
                var b=$(this).attr("checked");
                if(b)
                {
                    $("#"+chkid).attr("readonly","");
                    $("#"+chkid).removeClass("skyInputNormal").addClass("skyInputRed");
                }
                else
                {
                     $("#"+chkid).attr("readonly","readonly");
                     $("#"+chkid).val("0");
                     $("#"+chkid).removeClass("skyInputRed").addClass("skyInputNormal");
                }
                
             });
        }
        
    </script>
    <script language="javascript" src="/admin/js/SystemScoreInput.js" type="text/jscript"></script>
</head>
<body onload="win_onLoad();">
    <form id="Form1" method="post" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <div id="divLoading">
                <img src="/admin/images/loading.gif" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <div id="tbMain">
        <div class="divTbg">
            <div class="divTbgL">
            </div>
            <div class="divTbgInfo">
                <div class="divTbgTitle">
                    <span class="WtableTBig">成绩管理 </span>
                </div>
            </div>
        </div>
        <div class="divTbgF">
        </div>
        <div class="divTNavBG" id="topURL">
            <ul id="topURLul">
                <li class="divURLed" id="div1">
                    <div>
                        <img src="../style/green/images/mini_icons_046.gif" width="10" height="10" /><span
                            class="tableTBig">课程基本信息</span></div>
                </li>
                <li id="div2">
                    <div>
                        <img src="../style/green/images/mini_icons_046.gif" width="10" height="10" /><span
                            class="tableTBig">成绩汇总表</span></div>
                </li>
                <li id="div3">
                    <div>
                        <img src="../style/green/images/mini_icons_046.gif" width="10" height="10" /><span
                            class="tableTBig">辅助计算器</span></div>
                </li>
                <li id="div4">
                    <div>
                        <img src="../style/green/images/mini_icons_046.gif" width="10" height="10" /><span
                            class="tableTBig">帮助说明</span></div>
                </li>
            </ul>
        </div>
        <div id="mypanel">
            <div class="divInfo" id="ddiv1">
                <div class="divInfoTop">
                    <div class="listLeft">
                        <ul>
                            <li>
                                <div>
                                    <img src="../style/green/images/basic.gif" /></div>
                            </li>
                            <li><span class="tableTBig">课程基本信息</span></li>
                        </ul>
                    </div>
                </div>
                <div class="divInfoContext">
                    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="SkyTableLine">
                        <tr>
                            <td align="center" class="SkyTDTopLine">
                                开课编号
                            </td>
                            <td align="center" class="SkyTDTopLine">
                                课程名称
                            </td>
                            <td align="center" class="SkyTDTopLine">
                                开课院系
                            </td>
                            <td align="center" class="SkyTDTopLine">
                                开课班级
                            </td>
                            <td align="center" class="SkyTDTopLine">
                                开课学期
                            </td>
                            <td align="center" class="SkyTDTopLine">
                                开课教师
                            </td>
                            <td align="center" class="SkyTDTopLine">
                                课程学时
                            </td>
                            <td align="center" class="SkyTDTopLine">
                                课程学分
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="SkyTDLine">
                                <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                            </td>
                            <td align="center" class="SkyTDLine">
                                <asp:Literal ID="Literal2" runat="server"></asp:Literal>
                            </td>
                            <td align="center" class="SkyTDLine">
                                <asp:Literal ID="Literal3" runat="server"></asp:Literal>
                            </td>
                            <td align="center" class="SkyTDLine">
                                <asp:Literal ID="Literal4" runat="server"></asp:Literal>
                            </td>
                            <td align="center" class="SkyTDLine">
                                <asp:Literal ID="Literal5" runat="server"></asp:Literal>
                            </td>
                            <td align="center" class="SkyTDLine">
                                <asp:Literal ID="Literal6" runat="server"></asp:Literal>
                            </td>
                            <td align="center" class="SkyTDLine">
                                <asp:Literal ID="Literal7" runat="server"></asp:Literal>
                            </td>
                            <td align="center" class="SkyTDLine">
                                <asp:Literal ID="Literal8" runat="server"></asp:Literal>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="divInfo" id="ddiv2">
                <div class="divInfoTop">
                    <div class="listLeft">
                        <ul>
                            <li>
                                <div>
                                    <img src="../style/green/images/basic.gif" /></div>
                            </li>
                            <li><span class="tableTBig">成绩汇总表</span></li>
                        </ul>
                    </div>
                New:当成绩文本框获得焦点时，可以使用上下左右键（↑↓←→）进行行列内的快速移动</div>
                <div class="divInfoContext">
                    <div class="divSave">
                        <asp:Button ID="btnInit" runat="server" Text="成绩初始化" CssClass="SkyButtonFocus" OnClick="btnInit_Click" />
                        <asp:Button ID="btnSync" runat="server" Text="成绩同步" CssClass="SkyButtonFocus" OnClick="btnSync_Click" />
                        <asp:Button ID="btnSave" runat="server" Text="成绩保存" CssClass="SkyButtonFocus" OnClick="btnSave_Click" />
                        <asp:Button ID="btnCheck" runat="server" CssClass="SkyButtonFocus" Text="审核状态" OnClick="btnCheck_Click"
                            ToolTip="发布状态表示学生可以查询成绩，否则不能查询，注意：发布状态不影响成绩汇总功能" />
                         <asp:Button ID="btnDelete" runat="server" CssClass="SkyButtonFocus" Text="删除数据" 
                            ToolTip="删除录入的成绩数据，这样可以删除这个课程" onclick="btnDelete_Click" />
                    </div>
                    <div style="font: 2px; line-height: 2px;">
                        &nbsp;</div>
                    <asp:GridView ID="gvInfo" runat="server" AutoGenerateColumns="False" BorderStyle="None"
                        CellPadding="1" CellSpacing="1" GridLines="None" Width="100%" CssClass="Ntable"
                        HorizontalAlign="Center" OnRowDataBound="gvInfo_RowDataBound">
                        <RowStyle CssClass="SkyTDLine" HorizontalAlign="Center" />
                        <HeaderStyle HorizontalAlign="Center" CssClass="SkyTDTopLine"></HeaderStyle>
                        <Columns>
                            <asp:BoundField DataField="id" HeaderText="序号" />
                            <asp:BoundField HeaderText="课程名称" DataField="CourseName" />
                            <asp:BoundField HeaderText="学生学号" DataField="UserID" />
                            <asp:BoundField HeaderText="学生名称" DataField="UserName" />
                            <asp:TemplateField HeaderText="平时成绩">
                                <ItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ResultsPS") %>' MaxLength="5"
                                        Width="50px"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="作业成绩">
                                <ItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("ResultsZY") %>' MaxLength="5"
                                        Width="50px"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="期中成绩">
                                <ItemTemplate>
                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("ResultsQZ") %>' MaxLength="5"
                                        Width="50px"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="期末成绩">
                                <ItemTemplate>
                                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("ResultsQM") %>' MaxLength="5"
                                        Width="50px"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="综合成绩">
                                <ItemTemplate>
                                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("ResultsZH") %>' MaxLength="5"
                                        Width="50px"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="是否补考">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkIsMakeup" runat="server" Text="补考" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="补考成绩">
                                <ItemTemplate>
                                    <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("ResultsMakeup") %>' MaxLength="3" Enabled="false" ToolTip="补考成绩不可以在此处录入，您只能设置该生补考。"
                                        Width="40px" Height="15px" CssClass='<%# Eval("ResultsIsMakeup").ToString()=="1"?"skyInputRed":"skyInputNormal" %>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    </td> </tr> </table>
                    <div class="divInfoRight">
                        <webdiyer:AspNetPager ID="Pager" runat="server" OnPageChanged="Pager_PageChanged"
                            ShowNavigationToolTip="True" AlwaysShow="True">
                        </webdiyer:AspNetPager>
                    </div>
                </div>
            </div>
            <div class="divInfo" id="ddiv3">
                <div class="divInfoTop">
                    <div class="listLeft">
                        <ul>
                            <li>
                                <div>
                                    <img src="../style/green/images/basic.gif" /></div>
                            </li>
                            <li><span class="tableTBig">辅助计算器</span></li>
                        </ul>
                    </div>
                （更多说明请参考底部帮助）</div>
                <div class="divInfoContext">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="100" align="center" class="SkyTDTopLine">
                                            源成绩
                                        </td>
                                        <td class="SkyTDLine">
                                            <asp:DropDownList ID="drpSelect" runat="server" DataTextField="DName" 
                                                DataValueField="DValue">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" class="SkyTDTopLine">
                                            目标成绩
                                        </td>
                                        <td class="SkyTDLine">
                                            <asp:RadioButton ID="rad1" runat="server" Checked="True" GroupName="rad" Text="普通设置" />
                                            =
                                            <asp:TextBox ID="txt1" runat="server" MaxLength="3" Width="40px">100</asp:TextBox>
                                            (源成绩直接复制成文本中的成绩)<br />
                                            <asp:RadioButton ID="rad2" runat="server" GroupName="rad" Text="普通复制" />
                                            =
                                            <asp:DropDownList ID="drpSelect0" runat="server" DataTextField="DName" 
                                                DataValueField="DValue">
                                                <asp:ListItem Value="1">平时成绩</asp:ListItem>
                                                <asp:ListItem Value="2">作业成绩</asp:ListItem>
                                                <asp:ListItem Value="3">期中成绩</asp:ListItem>
                                                <asp:ListItem Value="4">期末成绩</asp:ListItem>
                                                <asp:ListItem Value="5">综合成绩</asp:ListItem>
                                                <asp:ListItem Value="6">补考成绩</asp:ListItem>
                                            </asp:DropDownList>
                                            (源成绩直接复制到目标成绩中)<br />
                                            <asp:RadioButton ID="rad3" runat="server" GroupName="rad" Text="比例复制" />
                                            =
                                            <asp:TextBox ID="txt2" runat="server" MaxLength="3" Width="40px">50</asp:TextBox>
                                            %*
                                            <asp:DropDownList ID="drpSelect1" runat="server" DataTextField="DName" 
                                                DataValueField="DValue">
                                                <asp:ListItem Value="1">平时成绩</asp:ListItem>
                                                <asp:ListItem Value="2">作业成绩</asp:ListItem>
                                                <asp:ListItem Value="3">期中成绩</asp:ListItem>
                                                <asp:ListItem Value="4">期末成绩</asp:ListItem>
                                                <asp:ListItem Value="5">综合成绩</asp:ListItem>
                                                <asp:ListItem Value="6">补考成绩</asp:ListItem>
                                            </asp:DropDownList>
                                            (源成绩乘以百分之文本比例复制到目标成绩)<br />
                                            <asp:RadioButton ID="rad4" runat="server" GroupName="rad" Text="设置补考" />
                                            &lt;
                                            <asp:TextBox ID="txt7" runat="server" MaxLength="3" Width="40px">60</asp:TextBox>
                                            的成绩设置成<asp:DropDownList ID="drpSelect2" runat="server">
                                                <asp:ListItem Value="0">不补考</asp:ListItem>
                                                <asp:ListItem Value="1" Selected="True">补考</asp:ListItem>
                                            </asp:DropDownList>
                                            (源成绩低于文本值将设置成补考或者不补考)<br />
                                            <asp:Button ID="btnSaveInfo" runat="server" Text="成绩保存" CssClass="SkyButtonFocus"
                                                OnClick="btnSaveInfo_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <br />
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="100" align="center" class="SkyTDLine">
                                            综合计算
                                        </td>
                                        <td class="SkyTDLine">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td align="center" class="SkyTDTopLine">
                                                        平时成绩
                                                    </td>
                                                    <td align="center" class="SkyTDTopLine">
                                                        作业成绩
                                                    </td>
                                                    <td align="center" class="SkyTDTopLine">
                                                        期中成绩
                                                    </td>
                                                    <td align="center" class="SkyTDTopLine">
                                                        期末成绩
                                                    </td>
                                                    <td align="center" class="SkyTDTopLine">
                                                        综合成绩
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="center" class="SkyTDLine">
                                                        <asp:TextBox ID="txt3" runat="server" MaxLength="3" Width="40px">20</asp:TextBox>
                                                        %+
                                                    </td>
                                                    <td align="center" class="SkyTDLine">
                                                        <asp:TextBox ID="txt4" runat="server" MaxLength="3" Width="40px">30</asp:TextBox>
                                                        %+
                                                    </td>
                                                    <td align="center" class="SkyTDLine">
                                                        <asp:TextBox ID="txt5" runat="server" MaxLength="3" Width="40px">50</asp:TextBox>
                                                        %+
                                                    </td>
                                                    <td align="center" class="SkyTDLine">
                                                        <asp:TextBox ID="txt6" runat="server" MaxLength="3" Width="40px">30</asp:TextBox>
                                                        %=
                                                    </td>
                                                    <td align="center" class="SkyTDLine">
                                                        <asp:Button ID="btnSaveInfoC" runat="server" Text="成绩保存" CssClass="SkyButtonFocus"
                                                            OnClick="btnSaveInfoC_Click" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                                <br/>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="100" align="center" class="SkyTDLine">平时成绩</td>
                                      <td class="SkyTDLine">
                                            <asp:Button ID="btnGetPSScore" runat="server" Text="获取平时成绩" 
                                                CssClass="SkyButtonFocus" onclick="btnGetPSScore_Click"
                                                 />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="divInfo" id="ddiv4">
                <div class="divInfoTop">
                    <div class="listLeft">
                        <ul>
                            <li>
                                <div>
                                    <img src="../style/green/images/basic.gif" /></div>
                            </li>
                            <li><span class="tableTBig">帮助说明><span class="tableTBig">帮助说明pan></li>
                        </ul>
                    </div>
                </div>
                <div class="divInfoContext">
                    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="SkyTDLine">
                        <tr>
                            <td class="SkyTDLine">
                                &nbsp; 1、您第一次进入一个课程的成绩输入页面需要进行初始化，也就是点击初始化按钮；<br />
                                2、当您增加或者删除了选择课程的班级中的学生信息，需要进行同步成绩操作，把新加的学生的成绩同步到成绩列表；<br />
                                3、成绩修改完毕后需要保存，否则操作将不进入数据库；<br />
                                4、辅助计算器可以帮助您快速的输入成绩；<br />
                                5、系统支持使用上下左右键（↑↓←→）进行成绩录入快速移动，可以在一列进行快速移动；
                                <br />
                            6、系统支持Ctrl键进行同列向下移动，该按钮等同于下键（↓）；<br />
                            7、系统识别学生是否补考是根据是否补考复选按钮进行的，如果学生成绩低于60分，您需要其补考，则选中这个学生的补考字段即可，系统不是根据任何成绩字段计算补考的；<br />
                            8、系统提供辅助计算器，可以根据指定的成绩低于多少就设置补考的功能；<br />
                            <br />
                          <br /></td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <asp:Literal ID="LiteralScript" runat="server" EnableViewState="False"></asp:Literal>
    </form>
</body>
</html>
