<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin_SJType" Title="试卷类别管理" Codebehind="KS.SJType.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 class="curr"><a href="KS.SJType.aspx">自定义类别</a></li>
          <li><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">
    	<div class="fr headOperation ">
            <ul>
               <li class="fl"><asp:LinkButton ID="addclassbutton" runat="server" CssClass="button button_on" OnClick="addclassbutton_Click">添加试卷类别</asp:LinkButton></li>
               <li class="fl"><asp:LinkButton ID="TotalType" runat="server" OnClick="TotalType_Click" CssClass="button">一键统计类别数量</asp:LinkButton></li>
        	</ul>
        </div>
        试卷类别管理</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:BoundField HeaderText="类别名称" DataField="TypeName" HtmlEncode="False" >
                <itemstyle  verticalalign="Middle" />
            </asp:BoundField>
               <asp:BoundField HeaderText="试卷数量" DataField="TotalNum">
                <itemstyle width="90px" verticalalign="Middle"  horizontalalign="Center"/>
            </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>


     
    <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" style="width: 258px"><b>试卷类别名称：</b></td>
            <td class="righttd">
                &nbsp;<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">
                &nbsp;<asp:TextBox CssClass="textbox" ID="Color" runat="server" Width="56px"></asp:TextBox>
                  <img border=0 id="Img1" src="../../admin/images/rect.gif" style="cursor:pointer;background-Color:<%=Color.Text %>;" onClick="Getcolor('Img1','Img1|<%=Color.ClientID %>');" title="选取颜色">
                如#ff6600等</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">
                &nbsp;<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" />
      
</div>
    </asp:Panel>
</asp:Content>
