<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BlogType.aspx.cs" Inherits="Oykx.admin.BlogType" %>
<!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>日志类型管理 -
        <%=Resources.zhouxiang.adminTitle %></title>
    <link href="css/main.css" rel="stylesheet" type="text/css" />
    <link href="js/skins/ZCMS/asyncbox.css" rel="stylesheet" type="text/css" />

    <script src="js/jQuery.v1.4.2.js" type="text/javascript"></script>

    <script src="js/AsyncBox.v1.4.js" type="text/javascript"></script>

    <script src="js/File.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="td_title">
                    日志类型管理
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                    <asp:GridView ID="GridView_Type" runat="server" Width="100%" AutoGenerateColumns="False"
                        DataSourceID="ObjectDataType" Style="text-align: left" 
                        onrowcommand="GridView_Type_RowCommand" 
                        onrowdatabound="GridView_Type_RowDataBound" AllowPaging="True">
                        <Columns>
                            <asp:TemplateField HeaderText="类型ID" SortExpression="TID">
                                <ItemTemplate>
                                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label2" runat="server" Text='<%# Bind("TID") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="类型名称" SortExpression="TName">
                                <ItemTemplate>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label1" runat="server" Text='<%# Bind("TName") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("TName") %>'></asp:TextBox>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="编辑" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" 
                                        CommandName="Edit" ImageUrl="~/admin/image/edit.png" Text="Edit" />
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" 
                                        CommandName="Update" ImageUrl="~/admin/image/queding.png"  Text="Update" />
                                    &nbsp;<asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="False" 
                                        CommandName="Cancel" ImageUrl="~/admin/image/quxiao.png" Text="Cancel" />
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="删除" ShowHeader="False">
                                <ItemTemplate>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="false" CommandName="del"
                                        ImageUrl="~/admin/image/del.png" Text="删除" CommandArgument='<%# Bind("TID") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="td_title">
                    添加类型
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                    <table cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td style=" width:140px;">
                                <asp:TextBox ID="txtBlogTypeName" runat="server" Width="120"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                    ControlToValidate="txtBlogTypeName" ErrorMessage="*"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <asp:Button ID="btnTypeAdd" runat="server" Text="添加" 
                                    onclick="btnTypeAdd_Click" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="td_title">
                    友情提示
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                    &nbsp;
                    1.可以方便的点击编辑按钮,进行类型的名称更改.</td>
            </tr>
            <tr>
                <td class="tableTd">
                    &nbsp;
                    2.添加类型可以添加你需要添加的日志类型.</td>
            </tr>
            <tr>
                <td class="tableTd">
                    &nbsp;
                    3.删除请谨慎,删除类型后,该类型下的文章全部将会没有类型.</td>
            </tr>
        </table>
    </div>
    <asp:ObjectDataSource ID="ObjectDataType" runat="server" SelectMethod="get"
        TypeName="OykxBLL.BlogTypeManager" DataObjectTypeName="OykxModel.BlogType" 
        UpdateMethod="BlogTypeUpdate"></asp:ObjectDataSource>
    </form>
</body>
</html>