<%@ Page Language="C#" AutoEventWireup="true" CodeFile="XinZhang.aspx.cs" Inherits="Admin_YongHu_XinZhang" %>

<!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 runat="server">
    <title>无标题页</title>
    <link href="../Images/Admin.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript">
        function SheZhiWenJian(BiaoShi,TuBiao)
        {
            if(BiaoShi=="TuBiao")
                document.getElementById("TuBiaoDiZhi").value=TuBiao;
        }
        function YanZheng()
        {
            if(document.getElementById("MingChen").value=="")
            {
                alert('勋章名称不能为空');
                return false;
            }
            if(document.getElementById("TuBiaoDiZhi").value=="")
            {
                alert('勋章图标不能为空');
                return false;
            }
        }
    </script>
</head>
<body>
<div>
    <div style="height:18px">
    位置：用户管理 &gt; 勋章管理
    </div>
    <div style="height:5px"></div>
    <form method="post" action="XinZhang_ZengJia.aspx" enctype="multipart/form-data" onsubmit="return YanZheng();">
        <table class="tab1" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <table class="tab2" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td class="tab2_bt">
                                增加勋章
                            </td>
                        </tr>
                        <tr>
                            <td><br />
                    名称：<input type="text" id="MingChen" name="MingChen" maxlength="50" class="text" />
                    &nbsp;&nbsp;图标地址：<input type="file" name="f1" />
                    &nbsp;&nbsp;<input type="submit" value="增加" />&nbsp;
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</div>
<div style="height:5px"></div>
    <form id="form1" runat="server">
    <table class="tab1" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <table class="tab2" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="tab2_bt">
                            勋章列表
                        </td>
                    </tr>
                    <tr>
                        <td>
                <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                    CellSpacing="1" CssClass="tab3" GridLines="None" Width="100%" OnSorting="GridView1_Sorting">
                    <Columns>
                        <asp:BoundField DataField="ID" DataFormatString="{0}" HeaderText="ID" SortExpression="ID">
                            <HeaderStyle Width="10%" />
                            <ItemStyle Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="勋章名称" DataFormatString="{0}" HeaderText="勋章名称">
                            <HeaderStyle Width="30%" />
                            <ItemStyle Width="30%" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="勋章图标">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("勋章图标") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <img src="<%# Eval("勋章图标") %>" alt="" />
                            </ItemTemplate>
                            <HeaderStyle Width="20%" />
                            <ItemStyle Width="20%" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="创建时间" DataFormatString="{0}" HeaderText="创建时间">
                            <HeaderStyle Width="20%" />
                            <ItemStyle Width="20%" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="删除">
                            <HeaderStyle Width="20%" />
                            <ItemStyle Width="20%" />
                            <ItemTemplate>
                                <a href="XinZhang_ShanChu.aspx?ID=<%# Eval("ID") %>" onclick="if(!confirm('真的要删除吗？')){return false;}">删除</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="tab3_bt" />
                </asp:GridView>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div>
        
    </div>
        <asp:HiddenField ID="PaiXuZiDuan" runat="server" Value="ID" />
        <asp:HiddenField ID="PaiXuFangXiang" runat="server" Value="true" />
    </form>
    <div style="height:5px"></div>
        <form method="get" action="XinZhang.aspx">
        <asp:Panel ID="Panel1" runat="server" Style="text-align: right" Width="100%">
            <asp:Label ID="FenYeDaiMa" runat="server" Text="Label"></asp:Label></asp:Panel></form>
</body>
</html>
