<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="NewsManger.aspx.cs" Inherits="Admin_NewsManger" 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" Font-Names="Verdana" Font-Size="Small" ForeColor="#333333" GridLines="None"
                                     OnPageIndexChanging="GridView1_OnPageIndexChanged" PageSize="4" ShowFooter="True"
                                     Width="98%" OnRowCommand="GridView1_RowCommand" DataKeyNames="newsId" OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing">
                                     <PagerSettings FirstPageText="第一页" LastPageText="最后一页" NextPageText="下一页" />
                                     <RowStyle BackColor="#EFF3FB" />
                                     <Columns>
                                         <asp:BoundField DataField="newsId" HeaderText="新闻编号">
                                             <HeaderStyle HorizontalAlign="Left" Width="100px" />
                                         </asp:BoundField>
                                         <asp:BoundField DataField="newsTitleCut" HeaderText="新闻标题">
                                             <HeaderStyle HorizontalAlign="Left" Width="100px" />
                                         </asp:BoundField>
                                         <asp:BoundField DataField="newsTime" HeaderText="创建时间">
                                             <HeaderStyle Width="100px" />
                                         </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>
                                     <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                     <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                     <EditRowStyle BackColor="#2461BF" />
                                     <AlternatingRowStyle BackColor="White" />
                                 </asp:GridView>
                            </asp:Panel>
                            <asp:Panel ID="P2" HorizontalAlign="Center" runat="server" Height="350px" 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 width="90%" border="0" align="center" cellpadding="1" cellspacing="1" class="tabn">
                                    <tr>
                                        <td width="132" align="right" bgcolor="#F6F6F6">
                                            新闻标题：</td>
                                        <td height="25" bgcolor="#F6F6F6" style="width: 268px" align="left">
                                            <asp:TextBox ID="txtNewsTitle" runat="server" Width="214px"></asp:TextBox><span style="color: Red"">*</span>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="必填项"
                                                ControlToValidate="txtNewsTitle"></asp:RequiredFieldValidator></td>
                                    </tr>
                                    <tr>
                                        <td align="right" bgcolor="#E7E7E7" style="height: 27px" valign="top">
                                            详细内容：</td>
                                        <td align="left" bgcolor="#E7E7E7" style="width: 268px; height: 27px;">
                                            <asp:TextBox ID="txtNewsDetails" runat="server" TextMode="MultiLine" Width="419px" Height="204px" Rows="20"></asp:TextBox><span style="color: Red"">*</span>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtNewsDetails"
                                                ErrorMessage="必填项" Display="Dynamic"></asp:RequiredFieldValidator></td>
                                    </tr>                                    
                                    <tr>
                                        <td align="center" bgcolor="#F6F6F6" colspan="2" height="25">
                                            &nbsp;<asp:Button ID="btnAddNews" runat="server" Text="添　　加" Width="103px" OnClick="btnAddNews_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" /></td>
                                    </tr>
                                    <tr>
                                        <td align="center" bgcolor="#E7E7E7">
                                            &nbsp;</td>
                                        <td height="25" bgcolor="#E7E7E7" style="width: 268px">
                                            &nbsp;</td>
                                    </tr>
                                </table>
                            </asp:Panel>
                            <asp:Panel ID="P1" HorizontalAlign="Center" runat="server" Width="100%">
                                <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 width="90%" border="0" align="center" cellpadding="1" cellspacing="1" class="tabn">
                                    <tr>
                                        <td width="132" align="right" bgcolor="#F6F6F6">
                                            新闻标题：</td>
                                        <td height="25" bgcolor="#F6F6F6" style="width: 268px" align="left">
                                            <asp:TextBox ID="txtEditTitle" runat="server" Width="214px"></asp:TextBox><span style="color: Red"">*</span>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="必填项"
                                                ControlToValidate="txtEditTitle"></asp:RequiredFieldValidator></td>
                                    </tr>
                                    <tr>
                                        <td align="right" bgcolor="#E7E7E7" style="height: 27px" valign="top">
                                            详细内容：</td>
                                        <td align="left" bgcolor="#E7E7E7" style="width: 268px; height: 27px;">
                                            <asp:TextBox ID="txtEditDetails" runat="server" TextMode="MultiLine" Width="419px" Height="204px" Rows="20"></asp:TextBox><span style="color: Red"">*</span>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtEditDetails"
                                                ErrorMessage="必填项" Display="Dynamic"></asp:RequiredFieldValidator></td>
                                    </tr>       
                                    <tr>
                                        <td align="center" bgcolor="#F6F6F6" colspan="2" height="25">
                                            &nbsp;<asp:Button ID="btnEditNews" runat="server" Text="修　　改"
                                                onmousemove='showBtnOver(this)' onmouseout='showBtnOut(this)' CssClass="submitMiniGreen" OnClick="btnEditNews_Click" />
                                            <asp:Button ID="btnCanelEdit" runat="server" Text="取   消"
                                                onmousemove='showBtnOver(this)' onmouseout='showBtnOut(this)' CssClass="submitMiniGreen" CausesValidation="False" OnClick="btnCanelEdit_Click" />&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td align="center" bgcolor="#E7E7E7">
                                            &nbsp;</td>
                                        <td height="25" bgcolor="#E7E7E7" style="width: 268px">
                                            &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>

