<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login_class.aspx.cs" Inherits="Web.sy.admin.login_class" %>

<!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>OA标题页</title>
<link href="../../css/admincss/skin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../css/popcalendar.js"></script>
</head>
<body>
    <form id="form1" runat="server" >
<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
        <td   class ="top_bg_left "></td>
    <td  class ="top_bg_center " >
    <table style ="width :100%; height :31px"  border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
<!--这里写页标题 -->
        <td style ="height :31px"><div class="titlebt">系统设置</div></td>
      </tr>
    </table>
    </td> 
    <td class ="top_bg_right "></td>
  </tr>
  <tr>
    <td style ="background :url(../../css/admincss/images/mail_leftbg.gif); vertical-align :middle " >&nbsp;</td>
    <td style ="background-color :#F7F8F9; vertical-align :top " >

   <!--  一组内容模块开始   --> 
    <table class ="tablezong"   border="0"  cellpadding="0" cellspacing="0">
      <tr>
        <td style ="height :40px" >
        <table class="tablebiaoti"  border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><div class ="biaotileft ">  
                年级班级设置</div> </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td>
        <div>
               <asp:Label ID="lbSemester" runat="server"></asp:Label>
    ，<asp:TextBox ID="tbGrade" runat="server" Width ="60px"></asp:TextBox> 
                  年级共有<asp:TextBox ID="tbClass" runat="server" 
        Width ="60px"></asp:TextBox> 
                  个班&nbsp;<asp:Button ID="btAddclass" runat="server" Text="添加" 
                        onclick="btAddclass_Click" ValidationGroup="add" />
              <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                  ControlToValidate="tbGrade" Display="Dynamic" ErrorMessage="请填写年级名称。" 
                          ValidationGroup="add" ForeColor="Red"></asp:RequiredFieldValidator>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                  ControlToValidate="tbClass" Display="Dynamic" ErrorMessage="请填写班级数。" 
                          ValidationGroup="add" ForeColor="Red"></asp:RequiredFieldValidator>
               <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                   ControlToValidate="tbClass" Display="Dynamic" ErrorMessage="请在班级数中输入大于0的整数。" 
                   ForeColor="Red" ValidationExpression="^\+?[1-9][0-9]*$" ValidationGroup="add"></asp:RegularExpressionValidator>
                    </div>     

<asp:GridView ID="GridView1" runat="server" Width="100%" CssClass="gv" 
            cellspacing="1" BorderWidth="1px" 
                AutoGenerateColumns="False" 
                onrowdeleting="GridView1_RowDeleting" 
        onrowdatabound="gv_RowDataBound" onrowcreated="GridView1_RowCreated1" 
        onrowcancelingedit="GridView1_RowCancelingEdit" 
        onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" >
            <RowStyle  CssClass="gvrow" BorderWidth="1px" />
                <Columns>
                       <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" />
                           <asp:BoundField DataField="semestername" HeaderText="学期" ReadOnly="True" />
                    <asp:BoundField DataField="grade" HeaderText="年级" ReadOnly="True" />
                        <asp:TemplateField HeaderText="班级">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("classname") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox  ID="gv_tbEditclass" runat="server"   Text='<%# Eval("classname") %>' Width ="90%"></asp:TextBox>
<div>                             <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                                ControlToValidate="gv_tbEditclass" Display="Dynamic" ErrorMessage="请输入大于0的整数，并用“、”间隔。" 
                                                ValidationExpression="^\+?[1-9][0-9;、]*$" ValidationGroup="btMove" ForeColor="Red"></asp:RegularExpressionValidator></div>    
                            </EditItemTemplate>
                       </asp:TemplateField>
                                                  <asp:TemplateField HeaderText="排序">
                               <ItemTemplate>
                                   <asp:Label ID="Label2" runat="server" Text='<%# Bind("paixu") %>'></asp:Label>
                               </ItemTemplate>
                               <EditItemTemplate>
                                      <asp:TextBox  ID="gv_tbEditpaixu" runat="server"   Text='<%# Eval("paixu") %>'  Width ="40px"></asp:TextBox> 
                                      
                                      <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                  ControlToValidate="gv_tbEditpaixu" Display="Dynamic" ErrorMessage="请填写序号。" 
                          ValidationGroup="btMove" ForeColor="Red"></asp:RequiredFieldValidator>
                                      <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                                ControlToValidate="gv_tbEditpaixu" Display="Dynamic" ErrorMessage="请输入大于0的整数。" 
                                                ValidationExpression="^\+?[1-9][0-9]*$" ValidationGroup="btMove" ForeColor="Red"></asp:RegularExpressionValidator>
                               </EditItemTemplate>
                       </asp:TemplateField>
                       <asp:TemplateField HeaderText="修改" ShowHeader="False">
                           <ItemTemplate>
                               <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                   CommandName="Edit" Text="修改"></asp:LinkButton>
                           </ItemTemplate>
                           <EditItemTemplate>
                               <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" ValidationGroup="btMove"
                                   CommandName="Update" Text="更新"></asp:LinkButton>
                               &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                   CommandName="Cancel" Text="取消"></asp:LinkButton>
                           </EditItemTemplate>
                       </asp:TemplateField>
                          <asp:CommandField HeaderText="删除" ShowDeleteButton="True" />
                    
                </Columns>
            <HeaderStyle  CssClass="gvhead"  />
        </asp:GridView>       
        </td>
      </tr>
    </table>
<!-- 一组内容模块结束 -->
    </td>
    <td  style =" background-image:url(../../css/admincss/images/mail_rightbg.gif )" >
    </td>
  </tr>
  <tr>
<td  class ="buttom_bg_left "></td>
  <td   class ="buttom_bg_center " ></td>
    <td  class ="buttom_bg_right " ></td>
  </tr>
</table>
    </div>
    </form>
</body>
</html>
