<%@ Page Language="C#"  MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Title="试卷自定义类别管理" Inherits="Kesion.Net.WebExam.Admin.Exam.KS_SJZDYType" Codebehind="KS.SJZDYType.aspx.cs" %>
<%@ Import Namespace="Kesion.Publics" %> 
<%@ Import Namespace="Kesion.Cache" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
  <div id="manage_top" class="menu_top_fixed">
         <ul class="titleTab">
          <li><a href="KS.SJConfig.aspx">频道参数设置</a></li>
          <li><a href="KS.SJCategory.aspx">分类管理</a></li>
          <li><a href="KS.SJType.aspx">自定义类别</a></li>
          <li class="curr"><a href="KS.SJZDYType.aspx">自定义题型</a></li>
           <%if (MyCache.GetSJCacheConfig(2).ToString() == "1"){ %>
          <li><a href="KS.SJKnowledge.aspx">知识点管理</a></li>
        <%} %>
          <li><a href="KS.SjTypeClass.aspx">章节管理</a></li>
          <li><a href="KS.SJCJD.aspx">成绩等级管理</a></li>
          <li><a href="KS.ZGCard.aspx">准考证生成管理</a></li>
          <li><a href="KS.SJKM.aspx">会计科目管理</a></li>
       </ul>
 </div>  
<div class="menu_top_fixed_height"></div><asp:Panel ID="ListPanel" runat="server" Width="100%">
 <div class="content-area"> 
 	<div class="myTitle">
    	<asp:LinkButton ID="addclassbutton" runat="server" OnClick="addclassbutton_Click" CssClass="fr mr20 button button_on">添加试卷类别</asp:LinkButton>
        自定义题型
    </div>      
    <KS:ksgv id="List" cssclass="CTable" runat="server" AutoGenerateColumns="False" EmptyDataText="没有添加任何自定义题型!" PagerType="CustomNumeric" Width="99%" GridLines="None" OnRowDataBound="List_RowDataBound" OnRowCommand="List_RowCommand" OnRowCreated="List_RowCreated">
        <Columns>
         	<asp:TemplateField HeaderText="选择">
               
                <itemstyle horizontalalign="Center" width="50px" />
                <itemtemplate>
                	<input type="checkbox"  name="ids" id="ids" value="<%#Eval("typeid") %>" />
                </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="类别ID" DataField="TypeID" >
                <itemstyle width="100px" Height="30px" horizontalalign="Center" />
            </asp:BoundField>
              <asp:TemplateField HeaderText="题目类型">
                <itemstyle horizontalalign="Center" width="160px" />
                <itemtemplate>
              <%#   Eval("tmtype").ToString()=="0"?"未选择题目类型":Kesion.Exam.Function.TMTypeArr[Utils.StrToInt(Eval("tmtype").ToString(),1)-1] %>
                </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="类别名称" DataField="TypeName" HtmlEncode="False" >
                <itemstyle  verticalalign="Middle" />
            </asp:BoundField>
            <asp:BoundField HeaderText="排列序号" DataField="OrderID">
                <itemstyle width="120px" verticalalign="Middle"  horizontalalign="Center"/>
            </asp:BoundField>
            <asp:BoundField HeaderText="是否默认" DataField="IsDefault">
                <itemstyle width="120px" verticalalign="Middle"  horizontalalign="Center"/>
            </asp:BoundField>

            <asp:TemplateField HeaderText="操作">
              <itemstyle width="200px" horizontalalign="Center"/>
              <itemtemplate>
                  <a href="?action=modify&typeid=<%# Eval("typeid") %>" class="greenFont">编辑</a>&nbsp;&nbsp;&nbsp;
                  <asp:LinkButton runat="server" CssClass="greenFont" ToolTip="删除" id="delete" commandargument=<%#Eval("typeid") %> commandname="del">删除</asp:LinkButton>
              </itemtemplate>
             </asp:TemplateField>

        </Columns>
        <HeaderStyle CssClass="CTitle" />
        <EmptyDataRowStyle CssClass="emptycss" />
       
    </KS:ksgv>
    <div class="listedit">
      	  <ul>
          <input type='checkbox' name='chkall' id='chkall' onClick='CheckAll(this.form);'/><label for="chkall">全选</label>
          <asp:LinkButton ID="delclassbutton" runat="server" OnClick="delclassbutton_Click" CssClass="button">删除自定义题型</asp:LinkButton>
          </ul>
    </div>
    <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>
</asp:Panel>
</div>
    <asp:Panel ID="AddPanel" runat="server"  Width="100%" Visible="false">
 <div class="content-area">
	<div class="myTitle">
        <%=!string.IsNullOrEmpty(KSCMS.S("typeid"))?"修改":"添加" %>自定义题型</div>  
    <table width="99%" align="center" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable"> 
               <tr>
            <td class="lefttd" height="30" align="right"><b>题目类型：</b></td>
            <td class="righttd"><asp:DropDownList ID="DrpTmType" runat="server">
            <asp:ListItem Value="0">--选择题目类型--</asp:ListItem>
               </asp:DropDownList> <span class="tips"></span>
            </td>
        </tr>

          <tr>
            <td class="lefttd" height="30" align="right" style="width: 258px"><b>自定义类型：</b></td>
            <td class="righttd">
                <asp:TextBox CssClass="textbox" ID="TypeName" runat="server" Width="203px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TypeName"
                    ErrorMessage="请填写自定义题型名称!" Display="Dynamic"></asp:RequiredFieldValidator> 如计算题，听力题，拼音等</td>
        </tr>
      
        <tr>
            <td align="right" class="lefttd" height="30" style="width: 258px">
                <strong>是否默认：</strong></td>
            <td class="righttd">
                <asp:RadioButtonList ID="IsDefault" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="1">是</asp:ListItem>
                    <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
                </asp:RadioButtonList></td>
        </tr>
        <tr>
            <td align="right" class="lefttd" height="30" style="width: 258px">
                <strong>排 序 号：</strong></td>
            <td class="righttd">
                <asp:TextBox CssClass="textbox" ID="OrderID" runat="server" Width="60px"></asp:TextBox>序号越小排在越前面</td>
        </tr>
      </table>
      <br />
        <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit" />
      
    </asp:Panel>
	</div>
</asp:Content>
