<%@ Page Title="配置邮件订阅项" Language="C#" MasterPageFile="~/Admin/MasterPage.master" ValidateRequest="false" AutoEventWireup="true" CodeBehind="MailSubscriptionConfig.aspx.cs" Inherits="PowerEasy.Module.General.WebSite.Admin.Accessories.MailSubscriptionConfig" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CphNavigation" runat="server">
    <pe:ExtendedSiteMapPath ID="SmpNavigator" SiteMapProvider="AdminMapProvider" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphContent" runat="server">
              
                <pe:ExtendedGridView ID="EgvSubscriptionItems" AllowPaging="True" DataSourceID="OdsMailSubscriptionItem"
                    AutoGenerateColumns="False"
                    runat="server" AutoGenerateCheckBoxColumn="True" DataKeyNames="ID" 
                    Width="100%" PageSize="20" 
                    onpageindexchanging="EgvSubscriptionItems_PageIndexChanging" 
                    onrowcancelingedit="EgvSubscriptionItems_RowCancelingEdit" 
                    onrowdeleting="EgvSubscriptionItems_RowDeleting" 
                    CheckBoxFieldHeaderWidth="3%" IsHoldState="True" SerialText="" 
                    onrowcommand="EgvSubscriptionItems_RowCommand" 
                    onrowdatabound="EgvSubscriptionItems_RowDataBound" >
                    <Columns>
                         <asp:TemplateField HeaderText="订阅项目名" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                               <asp:Label ID="LblName" Text='<%#Eval("Name") %>' runat="server"></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox runat="server" ID="txtEditSubscriptionName" 
                                    Text='<%# Eval("Name")%>' ValidationGroup="edit"></asp:TextBox><br />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                    ControlToValidate="txtEditSubscriptionName" Display="Dynamic" 
                                    ErrorMessage="订阅项目名不能为空" ValidationGroup="edit"></asp:RequiredFieldValidator>
                            </EditItemTemplate>

<HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>

<ItemStyle HorizontalAlign="Left"></ItemStyle>
                         </asp:TemplateField>
                         <asp:TemplateField HeaderText="订阅项描述">
                             <ItemTemplate>
                                 <asp:Label ID="LblContent" runat="server"></asp:Label>
                             </ItemTemplate>
                             <ItemStyle HorizontalAlign="Left" />
                         </asp:TemplateField>
                         <asp:BoundField DataField="Inputer" HeaderText="录入者" >
                         <HeaderStyle Width="8%" />
                         </asp:BoundField>
                         <asp:BoundField DataField="CreateTime" 
                             DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HeaderText="创建时间" 
                             HtmlEncode="False" >
                         <HeaderStyle Width="15%" />
                         </asp:BoundField>
<asp:TemplateField HeaderText="常规管理操作">
<ItemTemplate>
                               <asp:LinkButton ID="LnkDel" 
                                    OnClientClick="return window.confirm('你确定要删除该订阅项么？删除后订阅了该订阅项的用户将会自动移除对该订阅项的订阅。');" 
                                    CommandArgument='<%# Eval("Id")%>' CommandName="Delete"
                                    runat="server">删除</asp:LinkButton>
                                <asp:LinkButton ID="LnkEdit" CommandArgument='<%# Eval("Id")%>' CommandName="EditItem"
                                    runat="server">编辑</font></asp:LinkButton>
                            
</ItemTemplate>

<HeaderStyle HorizontalAlign="Center" Width="11%"></HeaderStyle>
</asp:TemplateField>
                    </Columns>
                </pe:ExtendedGridView>
                <p style="text-align:center">
                     <asp:Button ID="BtnDelAll" runat="server" Text="删除选中的订阅项" OnClientClick="return confirm('你确定删除选中的订阅项目吗？如果确定删除，则订阅了该订阅项的用户将会自动移除对该订阅项的订阅。');"
                    onclick="BtnDelAll_Click" /></p>
    <asp:ObjectDataSource ID="OdsMailSubscriptionItem" runat="server" TypeName="PowerEasy.Module.General.BusinessLogic.Accessories.MailSubscriptionItem"
        SelectCountMethod="GetTotalSubscriptionItems" SelectMethod="GetSubscriptionItems" StartRowIndexParameterName="startRowIndexId" MaximumRowsParameterName="maxNumberRows">
    </asp:ObjectDataSource>
           
                
            </asp:Content>
