<%@ page language="C#" autoeventwireup="true" inherits="admin_adclass, Fm.Web" %>

<%@ Register Src="../controls/FormPaging.ascx" TagName="FormPaging" TagPrefix="uc1" %>

<!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="/admin/skin/css.css" rel="stylesheet" type="text/css" />
    <link href="/images/css/inbox.css" rel="stylesheet" type="text/css" />
    <script language=javascript>
    function PostCheck()
    {
        var acname=document.getElementById("acname").value;
        var acintro=document.getElementById("acintro").value;
        if(acname=="")
        {
            alert("请输入名称!");
            return false;
        }
        else if(acintro=="")
        {
            alert("请输入描述信息!");
            return false;
        }
        else
        {
            return true;
        }
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 100%" class=Ibx_gTable_Con>
            <tr>
                <td>
                广告分类
                </td>
            </tr>
            <tr>
                <td>
                    <asp:HiddenField ID="acid" runat="server" />
                    &nbsp;
                    名称:<asp:TextBox ID="acname" runat="server" Width="300px"></asp:TextBox>
                    <input id="actype_add" type="radio" name=actype checked="true" value="" runat=server />新增
                    <input id="actype_edit" type="radio" name=actype runat=server disabled=disabled />编辑</td>
            </tr>
            <tr>
                <td>
                    描述:<asp:TextBox ID="acintro" runat="server" Rows="3" TextMode="MultiLine" Width="400px"></asp:TextBox>
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/admin/skin/images/button_save.gif" OnClientClick="return PostCheck()" OnClick="ImageButton1_Click" /></td>
            </tr>
        </table>
    
    </div>
        <table style="width: 100%" class=Ibx_gTable_Con>
            <tr>
                <td align=center>
                分类管理
                </td>
            </tr>
            <tr>
                <td>
                    <asp:GridView ID="GVad" runat="server" AutoGenerateColumns="False" CellPadding="4"
                        ForeColor="#333333" GridLines="None" Width="100%" OnRowDeleting="GVad_RowDeleting" OnRowEditing="GVad_RowEditing">
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:BoundField DataField="acid" HeaderText="分类ID">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="acname" HeaderText="分类名称">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="acintro" HeaderText="分类描述">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:CommandField HeaderText="编辑" ShowEditButton="True" EditText="编辑">
                                <ItemStyle HorizontalAlign="Center" />
                                
                            </asp:CommandField>
                           <asp:TemplateField HeaderText="删除">
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" OnClientClick="return confirm('确认删除该分类吗,会同时删除该类下的所有广告?')" runat="server" CausesValidation="False" CommandName="Delete"
                                        Text="删除"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <uc1:FormPaging ID="FormPaging1" runat="server" />
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
