<%@ page language="C#" autoeventwireup="true" inherits="_edu_set_J1_ExamType, App_Web_j1_examtype.aspx.e1095cb7" %>

<%@ 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>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

    <script language="javascript" src="../../window/jquery/jquery.min.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/message/jquery.message.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/checked/jquery.checked.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/TableRowFocus/jquery.RowFocus.js" type="text/javascript"></script>

    <link href="../../window/_css/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
    <link href="../../window/_css/window.css" rel="stylesheet" type="text/css" />
    <link href="../../css/listpage.css" rel="stylesheet" type="text/css" />

    <title>考试类型设置</title>

    <script language="javascript" type="text/javascript">
    var finder = null;
    var editor =null;
    $(function(){
        $("#insertPanel").dialog({
                autoOpen:false,
                width:450,
                height:200
        });
        
        $("#btnAdd").click(function(){
           var panel =  $("#insertPanel");
           panel.find(":text").val("")
           $("#hfEditID").val("");
           panel.dialog({ title: '设置考试类型' });
           panel.dialog("open");
           
           
        });
        
        if(isEdit){
          $("#insertPanel").dialog({ title: '编辑' });
          $("#insertPanel").dialog("open");
        }
        $("#chk_all").checkedAll("ViewData",0);
        $("#chk_Rev").checkedRev("ViewData",0);
        
        $("#ViewData").RowFocus();
        
    });
  
    var isEdit = false;
    function ShowEdit(){
        isEdit = true;
    }
    function validSelect(){
        var trs = $("#ViewData").find(":checked");

        if(trs.size()==0){
            message("请选择操作的数据项！",1);
            return false;
        }
        return true;
    }
    </script>
    
    <style type="text/css">
<!--
.center {
	text-align: center;
}
-->
</style>
</head>
<body>
    <form id="form2" runat="server">

        <div class="ui-widget-header " style="padding: .4em 1em; margin:2px">
            <span class="ui-dialog-title" >考试类型设置</span>
        </div>
        
        
        <div class="panel">
            考试类型查询(模糊查询)：
            <asp:TextBox ID="txtQueryName" runat="server" MaxLength="50" Width="250px"></asp:TextBox>&nbsp;
            <asp:Button ID="btnQuery" runat="server" CssClass="search" Text="查询" OnClick="btnQuery_Click" />&nbsp;
        </div>
        <div class="panel">
            <input id="btnAdd" class="addnew" type="button" value="添加" />
            <asp:Button ID="btnDelete" runat="server" CssClass="delete" OnClick="lbDelete_Click"
                OnClientClick="if(confirm('确认删除？')){return validSelect(); }else{return false;}" Text="删除" />
            <asp:Button ID="lbUpdate" runat="server" CssClass="modify" OnClick="lbUpdate_Click" Text="编辑" OnClientClick="return validSelect()" />
            &nbsp;
            <asp:Button ID="lbrs" runat="server" CssClass="btn" Text="刷新" OnClick="btnRefresh_Click" />
            
            <asp:Button ID="btnShowAll" runat="server" CssClass="btn" Text="显示所有" OnClick="btnShowAll_Click" />
            <input id="chk_all" name="chk_all" type="checkbox"  />全选 <a id="chk_Rev"
                href="javascript:void(0)">反 选</a>
        </div>

        <asp:GridView ID="ViewData" runat="server" AutoGenerateColumns="False" BackColor="White"
            CssClass="gv"  Width="100%">
            <RowStyle CssClass="gvRow" />
            <HeaderStyle CssClass="gvHeader" />
            <AlternatingRowStyle CssClass="gvAlternatingRow" />
            <EmptyDataRowStyle  CssClass="gvEmpty"/>
            <Columns>
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <input id="cbselect" runat="server" type="checkbox" value='<%#Eval("et_id") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
        
                <asp:BoundField DataField="et_name"  HeaderText="考试类型" />
                <asp:BoundField DataField="et_sort"  HeaderText="排序" />
               <%-- <asp:TemplateField HeaderText="显示">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbChange" runat="server" OnClick="SetState_Click"  Font-Underline="true"  CommandArgument='<%#Eval("et_id") %>'>
                        <%# Convert.ToBoolean(Eval("et_show")) ? "<font color='green'>显示</font>" : "隐藏"%>
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>--%>
            </Columns>
            <EmptyDataTemplate>
   
                没有任何数据！
      
            </EmptyDataTemplate>
        </asp:GridView>
        <br />
        <%--<div class="panel">*提示 设置为“隐藏”的考试类型选项 将在学校端的考试类型选项中不显示</div>--%>
        <webdiyer:AspNetPager ID="PagerButtom" runat="server" AlwaysShow="True" 
            CssClass="paginator"  CustomInfoHTML="当前第%CurrentPageIndex%/%PageCount%页 共%RecordCount%条记录 每页%PageSize%条 "
            CustomInfoSectionWidth="" FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页"
            LayoutType="Table" MoreButtonsClass="" NextPageText="下一页" NumericButtonCount="5"
            OnPageChanged="Pager_PageChanged" PageIndexBoxClass="cpb"  PrevPageText="上一页"
            ShowCustomInfoSection="Right" ShowPageIndexBox="Always" SubmitButtonText="转到">
        </webdiyer:AspNetPager>
         
        <div id="insertPanel" style="display: none">
            <table border="0"  cellpadding="7px">
                <tr>
                    <td style="width: 75px;">
                       考试类型：
                    </td>
                    <td style="width: 307px;">
                        <asp:TextBox ID="txtName" runat="server" Width="259px" MaxLength="25"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="nrfv" runat="server" ControlToValidate="txtName" 
                        ErrorMessage="必填" ValidationGroup="insert"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                 <tr>
                    <td style="width: 75px;"> 
                        排序：
                    </td>
                    <td style="width: 307px;">
                        <asp:TextBox ID="txtSort" runat="server" Width="132px" MaxLength="8"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="revgr_sort" runat="server" ControlToValidate="txtSort"
                            ErrorMessage="无效" ValidationExpression="^\d*$$" ValidationGroup="insert"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="btnSaveEdit" runat="server" Text="保存"  OnClick="btnSaveEdit_Click" Width="69px" ValidationGroup="insert" />
                    </td>
                </tr>
            </table>
            <asp:HiddenField ID="hfEditID" runat="server" />
        </div>
        
    </form>
</body>
</html>
<!--powered by 25175-->
