<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin_SJCorrection" Title="试题纠错管理" Codebehind="KS.SJCorrection.aspx.cs" %>

<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="Server">
    <script>
        function editSt(id) {
            parent.openWin('修改试题', 'exam/KS.EditSt.Aspx?tmid=' + id, false, 980, 560);
        }
    </script>
    <asp:Panel ID="ListPanel" runat="server" Width="100%">

        <style>
            .location {width: 98%;margin: 0 auto;}
            .categorynav {line-height: 25px;width: 97%;margin: 0 auto;margin-bottom: 10px;border: 1px solid #DEEFFA;background-color: #F7FBFE;padding: 5px 0px 5px 10px}
            ul, li {padding: 0px;margin: 0px}
            .categorynav li {width: 160px;float: left;}
        </style>
        <div class="content-area mt20">
            <div class="myTitle">
                试题纠错管理
            </div>
            <div class="quickSearch clearfix">
                <div class="SearchBox fl">
                    <asp:DropDownList ID="DrpType" runat="server" Style="margin-right:10px;">
                         <asp:ListItem Value="2">试题ID</asp:ListItem>
                        <asp:ListItem Value="0">提交内容</asp:ListItem>
                        <asp:ListItem Value="1">提交者</asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox CssClass="textbox" ID="TxtKeyWord" runat="server"></asp:TextBox>&nbsp;<asp:Button ID="Button1" runat="server" Text=" 搜索 " CssClass="button" OnClick="Button1_Click" />
                </div>
                <div class="property">
                    <div class="name button ml15">筛选</div>
                    <div class="propertyBox">
                        <ul class="tabs clearfix">
                        	<span class="screen fl">纠正状态：</span>
                            <li <%= (KSCMS.S("flag")==""?"class='active'":"" )%>><a href="KS.SJCorrection.aspx">所有记录</a></li>
                            <li <%= (KSCMS.S("flag")=="1"?"class='active'":"") %>><a href="KS.SJCorrection.aspx?flag=1">已纠正</a></li>
                            <li <%= (KSCMS.S("flag")=="0"?"class='active'":"") %>><a href="KS.SJCorrection.aspx?flag=0">未纠正</a></li>
                        </ul>
                        <ul class="tabs clearfix">
                        	<span class="screen fl">试题类型：</span>
                            <li <%= (KSCMS.S("showtype")==""?"class='active'":"") %>><a href="KS.SJCorrection.aspx">所有题型</a></li>
                            <li <%= (KSCMS.S("showtype")=="1"?"class='active'":"") %>><a href="KS.SJCorrection.aspx?showtype=1">主观题</a></li>
                            <li <%= (KSCMS.S("showtype")=="2"?"class='active'":"") %>><a href="KS.SJCorrection.aspx?showtype=2">单选题</a></li>
                            <li <%= (KSCMS.S("showtype")=="3"?"class='active'":"") %>><a href="KS.SJCorrection.aspx?showtype=3">多选题</a></li>
                            <li <%= (KSCMS.S("showtype")=="4"?"class='active'":"") %>><a href="KS.SJCorrection.aspx?showtype=4">判断题</a></li>
                            <li <%= (KSCMS.S("showtype")=="5"?"class='active'":"") %>><a href="KS.SJCorrection.aspx?showtype=5">填空题</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <KS:KSGV ID="List" runat="server" AutoGenerateColumns="False" EmptyDataText="没有考生提交纠错报告!" PagerType="CustomNumeric" Width="99%" HorizontalAlign="Center" GridLines="None" OnRowDataBound="List_RowDataBound" OnRowCommand="List_RowCommand" OnRowCreated="List_RowCreated" CssClass="CTable">
                <Columns>
                    <asp:TemplateField HeaderText="选择">
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                        <ItemTemplate>
                            <input type="checkbox" name="ids" id="ids" value="<%#Eval("id") %>" />
                        </ItemTemplate>
                    </asp:TemplateField>
                  
                     <asp:TemplateField HeaderText="题目ID">
                        <ItemStyle Width="100px" HorizontalAlign="Center" />
                        <ItemTemplate>  <%# Utils.StrToInt(Eval("tmid").ToString())%> </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="题目内容">
                        <ItemTemplate>
                            <%# Kesion.Exam.Function.ReplaceTKTTags(Convert.ToString(Eval("Title")),0, Convert.ToInt32(Eval("tmid")))%>
                            <%# Kesion.Exam.Function.ReplaceTKTTags(Utils.CutStr(Utils.RemoveHtml(Eval("tmnr").ToString(), "img"), 300), 0,Convert.ToInt32(Eval("tmid"))) %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="错误类型">
                        <ItemStyle Width="100px" HorizontalAlign="Center" />
                        <ItemTemplate><%# Kesion.Exam.Function.GetErrorType(Utils.StrToInt(Eval("ErrorType").ToString()))%>               </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="错误内容">
                        <ItemTemplate>
                            <span style="cursor: pointer" onmousedown='parent.openWin("查看错误试题ID<%#Eval("tmid")%>详情","exam/KS.SJShowCorrection.aspx?ID="+<%# Eval("id") %>,false);return false;'>
                                <%# Utils.CutStr(Convert.ToString(Eval("content")),200) %>
                            </span>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:BoundField HeaderText="提交人" DataField="UserName">
                        <ItemStyle Width="100px" HorizontalAlign="Center" />
                    </asp:BoundField>
                     <asp:TemplateField HeaderText="联系方式">
                        <ItemStyle Width="120px" HorizontalAlign="Center" />
                        <ItemTemplate>  <%# UserManage.GetUserInfo(Eval("UserName").ToString()).Mobile %> </ItemTemplate>
                    </asp:TemplateField>

                    <asp:BoundField HeaderText="提交时间" DataField="AddDate">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="状态">
                        <ItemStyle HorizontalAlign="Center" Width="100" />
                        <ItemTemplate>
                          <span>  <%# Convert.ToString(Eval("status"))=="1"?"<font class='greenFont'>已纠正</font>":"<font class='redFont'>未纠正</font>" %></span>                  
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="操作">
                        <ItemStyle Width="200px" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <a style="cursor: pointer" href="javascript:;" onclick="editSt(<%# Eval("tmid") %>);" class="greenFont">查看</a>&nbsp;&nbsp;&nbsp;
                            <asp:LinkButton runat="server" ID="delete" CommandArgument='<%#Eval("id") %>' CommandName="del" CssClass="greenFont">删除</asp:LinkButton>&nbsp;&nbsp;&nbsp;
                            <asp:LinkButton runat="server" ID="verify" CommandArgument='<%#Eval("id") %>' CommandName="verify" CssClass="greenFont">设置</asp:LinkButton>
                        </ItemTemplate>

                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="CTitle" />
                <EmptyDataRowStyle CssClass="emptycss" />
            </KS:KSGV>

            <asp:Panel ID="Panel2" runat="server" Height="30px" Width="741px">
                <div class="listedit">
                    <ul>
                        <input type="checkbox" name="chkall" id="chkall" onclick="CheckAll(this.form);" /><label for="chkall">全选</label>
                        <input type="button" value="删除记录" class="button" onclick="if (GetIDS('del')) { this.form.action = '?action=del'; this.form.submit() }" />
                        <asp:Button ID="BtnVerify" CssClass="button" Text="批量设置已纠正" runat="server" OnClick="BtnVerify_Click" />
                        <asp:Button ID="BtnUnVerify" CssClass="button" Text="批量取消已纠正" runat="server" OnClick="BtnUnVerify_Click" />
                        <asp:Button ID="BtnSubmit" Text="导出Excel" runat="server" CssClass="button" OnClick="BtnSubmit_Click" />
                    </ul>
                </div>
            </asp:Panel>
            <KS:Page ID="Page1" runat="server" />
            <asp:Panel ID="Panel1" runat="server" Height="30px" Width="100%">
                <script type="text/javascript">
                    showtips('<span class="state"><strong>操作说明：</strong><br /></span>您可以在此处理考生在前台提出的试题错误。');
                </script>

            </asp:Panel>

        </div>

    </asp:Panel>


</asp:Content>
