<%@ Page Language="C#" MasterPageFile="Admin.Master" AutoEventWireup="true" CodeBehind="Yearmanage.aspx.cs" Inherits="Mvcb2b.admin.Yearmanage" Title="管理员管理" %>
<%@ MasterType VirtualPath="Admin.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript" src="../Comja/val_num.js"></script>
   
<div class="path">当前位置： 系统管理 >>  初始年份列表</div>
<h3>初始年份列表</h3>
        <asp:GridView ID="GridView1"  HorizontalAlign="Center" Width="98%" EnableViewState="False" 
                                runat="server" AllowPaging="True" AutoGenerateColumns="False" 
                                OnPageIndexChanging="haopage" AllowSorting="True" OnRowDeleting="Haodel" 
                                OnRowEditing="haoedit" GridLines="None" 
        DataKeyNames="years" CellPadding="4" 
                                ForeColor="#333333" PageSize="30" >
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" HorizontalAlign="Center" />
                <Columns >
                <asp:BoundField DataField="years" HeaderText="年份" />
                    <asp:CommandField HeaderText="编辑" ShowEditButton="True" ShowHeader="True" 
                        UpdateText="edit" />
                    <asp:CommandField HeaderText="删除" ShowDeleteButton="True"  ShowHeader="True" 
                        DeleteText="&lt;div onclick=&quot;return confirm('确实要删除吗?');&quot;&gt;删除&lt;/div&gt;" />
            </Columns>        
                <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
        </asp:GridView>  
        <div class="pagemsg"><asp:label id="Message" runat="server" ></asp:label>
				 &nbsp; 直接进入 <asp:textbox  id="gopage" Width="30px" runat="server" > </asp:textbox> 
            页 <asp:button id ="Submithao"  Text="Go" runat="server" OnClick="Submithao_Click"></asp:button>  </div>
				 <br />
				 <br />
	<table border="0" class="tableadd3"  align="center" >
    <tr>
        <td colspan="2" valign="middle" style="text-align:center;"><Label ID="Label1" runat="server">
            添加年份</Label><Label ID="Label2" runat="server" >年份修改</Label></td>
    </tr>
     <tr>
        <td width="215" align="right">年份：</td><td ><asp:TextBox ID="years_txt" runat="server"  Width="80px" ></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="年份不能为空" Display="None" ControlToValidate="years_txt"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator7" runat="server"  ControlToValidate="years_txt" ErrorMessage="只能为4位数字"  ValidationExpression="^\d{4}$" Display="None"></asp:RegularExpressionValidator>
            </td>
    </tr>
 
    <tr>
        <td  colspan="2"  style="text-align:center;">
            <asp:Button ID="Add" runat="server" Text="添加"  Width="80px" OnClick="Add_Click"></asp:Button>
            <asp:Button ID="Edit" runat="server"  Text="修改" Width="80px" onclick="Edit_Click"   /> 	  
            <asp:validationsummary id="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False"></asp:validationsummary>  
        </td>
    </tr>
</table>
</asp:Content>
