<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="SiteManger.aspx.cs" Inherits="Admin_SiteManger" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
        <tr>
            <td>
                <img src="images/r_1.gif" alt="" /></td>
            <td width="100%" background="images/r_0.gif">
            </td>
            <td style="width: 7px">
                <img src="images/r_2.gif" alt="" /></td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <div>
                    <center>
                        <asp:Panel ID="P3" HorizontalAlign="Center" runat="server" Width="98%">
                            <table align="center" cellpadding="4" cellspacing="1" border="1" width="100%" class="toptable grid fixed">
                                <tr>
                                    <td height="25" class="category">
                                        <span style="color: #ff0000">网站列表</span></td>
                                </tr>
                            </table>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="height: 20px">
                                        &nbsp;</td>
                                </tr>
                            </table>
                            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                CellPadding="4" DataKeyNames="WebSiteId" Font-Names="Verdana" Font-Size="Small"
                                ForeColor="#333333" GridLines="None" OnPageIndexChanging="GridView1_OnPageIndexChanged"
                                OnRowCommand="GridView1_RowCommand" OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" ShowFooter="True" Width="98%">
                                <PagerSettings FirstPageText="第一页" LastPageText="最后一页" NextPageText="下一页" />
                                <Columns>
                                    <asp:BoundField DataField="WebSiteId" HeaderText="网站编号">
                                        <HeaderStyle HorizontalAlign="Center" Width="100px" VerticalAlign="Middle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="WebSiteName" HeaderText="网站名">
                                        <HeaderStyle HorizontalAlign="Center" Width="100px" VerticalAlign="Middle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="WebSiteTypeId" HeaderText="网站类型编号">
                                        <HeaderStyle HorizontalAlign="Center" Width="100px" VerticalAlign="Middle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="WebSiteTypeName" HeaderText="网站类型名">
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="150px" />
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="150px" />
                                    </asp:BoundField>
                                    <asp:ButtonField CommandName="Insert" HeaderText="添加" Text="添加" />
                                    <asp:ButtonField CommandName="Edit" HeaderText="编辑" Text="编辑" />
                                    <asp:TemplateField HeaderText="删除">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Delete" OnClientClick="return confirm('您真的要删除该记录吗？');">删除</asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <RowStyle BackColor="#EFF3FB" />
                                <EditRowStyle BackColor="#2461BF" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <AlternatingRowStyle BackColor="White" />
                            </asp:GridView>
                        </asp:Panel>
                        <asp:Panel ID="P2" HorizontalAlign="Center" runat="server" Height="430px" Width="98%">
                            <table align="center" cellpadding="4" cellspacing="1" border="1" width="100%" class="toptable grid fixed">
                                <tr>
                                    <td height="25" class="category">
                                        <span style="color: #ff0000">添加网站</span></td>
                                </tr>
                            </table>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="height: 20px">
                                        &nbsp;</td>
                                </tr>
                            </table>
                            <table align="center" border="0" cellpadding="1" cellspacing="1" class="tabn" width="95%">
                                <tr>
                                    <td align="center" bgcolor="#f6f6f6">
                                        网站名称：</td>
                                    <td align="left" bgcolor="#f6f6f6" width="80%">
                                        <asp:TextBox ID="txtTitle" runat="server" Width="390px"></asp:TextBox><span style="color: #ff0000">*</span><asp:RequiredFieldValidator ID="rfvTitle" runat="server" ControlToValidate="txtTitle"
                                            Display="Dynamic" ErrorMessage="必填项"></asp:RequiredFieldValidator></td>
                                </tr>
                                <tr style="color: #1a438e">
                                    <td align="center" bgcolor="#e7e7e7" valign="top">
                                        网站类型名：</td>
                                    <td align="left" bgcolor="#e7e7e7">
                                        <asp:DropDownList ID="DropDownList1" runat="server" Width="296px" AutoPostBack="True">
                                        </asp:DropDownList></td>
                                </tr>                                                                     
                                <tr>
                                    <td align="center" bgcolor="#f6f6f6" colspan="2" height="25">
                                        &nbsp;<asp:Button ID="btnAdd" runat="server" Text="添　　加" Width="103px" OnClick="btnAdd_Click"
                                            onmousemove='showBtnOver(this)' onmouseout='showBtnOut(this)' CssClass="submitMiniGreen" />
                                        <asp:Button ID="btnCancelAdd" runat="server" Text="取   消" onmousemove='showBtnOver(this)'
                                            onmouseout='showBtnOut(this)' CssClass="submitMiniGreen" CausesValidation="False"
                                            OnClick="btnCancelAdd_Click" />&nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center" bgcolor="#e7e7e7" style="width: 34px; height: 27px">
                                        &nbsp;</td>
                                    <td bgcolor="#e7e7e7" style="height: 27px;">
                                        &nbsp;</td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="P1" HorizontalAlign="Center" runat="server" Width="100%" Height="430px">
                            <table align="center" cellpadding="4" cellspacing="1" border="1" width="100%" class="toptable grid fixed">
                                <tr>
                                    <td height="25" class="category">
                                        <span style="color: #ff0000">修改网站</span></td>
                                </tr>
                            </table>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td>
                                        &nbsp;</td>
                                </tr>
                            </table>
                            <table align="center" border="0" cellpadding="1" cellspacing="1" class="tabn" width="95%">
                                <tr>
                                    <td align="center" bgcolor="#f6f6f6">
                                        网站名称：</td>
                                    <td align="left" bgcolor="#f6f6f6" width="80%">
                                        <asp:TextBox ID="txtTitleEdit" runat="server" Width="390px"></asp:TextBox><span style="color: #ff0000">*</span><a name="sub"></a></td>
                                </tr>
                                <tr style="color: #1a438e">
                                    <td align="center" bgcolor="#e7e7e7" valign="top">
                                        网站类型名：</td>
                                    <td align="left" bgcolor="#e7e7e7"><asp:DropDownList ID="DropDownList2" runat="server" Width="296px" AutoPostBack="True">
                                    </asp:DropDownList></td>
                                </tr>                                                          
                                <tr>
                                    <td align="center" bgcolor="#f6f6f6" colspan="2" height="25">
                                        &nbsp;&nbsp;<asp:Button ID="btnEdit" runat="server" CssClass="submitMiniGreen" OnClick="btnEdit_Click"
                                            onmousemove="showBtnOver(this)" onmouseout="showBtnOut(this)" Text="修　　改" />
                                        <asp:Button ID="btnCanelEdit" runat="server" CausesValidation="False" CssClass="submitMiniGreen"
                                            OnClick="btnCanelEdit_Click" onmousemove="showBtnOver(this)" onmouseout="showBtnOut(this)"
                                            Text="取   消" />&nbsp;</td>
                                </tr>
                                <tr>
                                    <td align="center" bgcolor="#e7e7e7" style="width: 34px; height: 27px">
                                        &nbsp;</td>
                                    <td bgcolor="#e7e7e7" style="height: 27px;">
                                        &nbsp;</td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </center>
                </div>
            </td>
            <td style="width: 7px">
            </td>
        </tr>
        <tr>
            <td>
                <img src="images/r_4.gif" alt="" /></td>
            <td>
            </td>
            <td style="width: 7px">
                <img src="images/r_3.gif" alt="" /></td>
        </tr>
    </table>
</asp:Content>

