<%@ page language="C#" autoeventwireup="true" inherits="GroupFlyProduce_ProduceAdmin_ProduceNews_List, GroupTGWeb_deploy" %>
<%@ Register Assembly="GroupFly.Control" Namespace="GroupFly.Control" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="China315" %>
<%@ Register Src="UserControl/MessageShow.ascx" TagName="MessageShow" TagPrefix="China315" %>
<!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>Untitled Page</title>
    <link rel="stylesheet" type="text/css" href="style/index.css" />

    <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>

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

</head>
<body>
    <form id="form1" runat="server">
    <div class="main">
        <div class="table1">
            <div class="title">
                <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="True"
                    EnableScriptLocalization="true">
                </asp:ScriptManager>
                <asp:Label ID="LabelTitle" runat="server" Text="新闻列表"></asp:Label></div>
            <div class="query">
                <table width="100%">
                    <tr>
                        <td style="text-align: right">
                            <asp:Localize ID="LocalizeTitle" runat="server" Text="新闻标题："></asp:Localize>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxTitle" runat="server" CssClass="allinput1"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxTitle" runat="server"
                                ControlToValidate="TextBoxTitle" Display="Dynamic" ErrorMessage="最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                        </td>
                        <td style="text-align: right">
                            <asp:Localize ID="Localize2" runat="server" Text="新闻类别："></asp:Localize>
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownListType" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">
                            <asp:Localize ID="LocalizePublisher" runat="server" Text="作者/发布人："></asp:Localize>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxPublisher" runat="server" CssClass="allinput1"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxPublisher" runat="server"
                                ControlToValidate="TextBoxPublisher" Display="Dynamic" ErrorMessage="最多50个字符"
                                ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                        </td>
                        <td style="text-align: right">
                            <asp:Localize ID="LocalizeIsShow" runat="server" Text="是否前台显示："></asp:Localize>
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownListIsShow" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">
                            <asp:Localize ID="LocalizeSendTime" runat="server" Text="发布时间："></asp:Localize>
                        </td>
                        <td colspan="2">
                            <asp:TextBox ID="TextBoxTime1" runat="server" CssClass="allinput1"></asp:TextBox>
                            <img id="imgCalendarSReplyTime2" alt="" src="images/Calendar.png" style="width: 16px;
                                height:18px; position:relative; top:4px; left: 0px;" /><China315:CalendarExtender ID="CalendarExtender4" runat="server"
                                    TargetControlID="TextBoxTime1" PopupButtonID="imgCalendarSReplyTime2" CssClass="ajax__calendar" /><asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxTime1" runat="server"
                                ControlToValidate="TextBoxTime1" Display="Dynamic" ErrorMessage="时间格式不正确" ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                            -<asp:TextBox ID="TextBoxTime2" runat="server" CssClass="allinput1"></asp:TextBox>
                            <img id="imgCalendarSReplyTime3" alt="" src="images/Calendar.png" style="width: 16px;
                                height:18px; position:relative; top:4px" /><China315:CalendarExtender ID="CalendarExtender1" runat="server"
                                    TargetControlID="TextBoxTime2" PopupButtonID="imgCalendarSReplyTime3" CssClass="ajax__calendar" /><asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxTime2" runat="server"
                                ControlToValidate="TextBoxTime2" Display="Dynamic" ErrorMessage="时间格式不正确" ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                        </td>
                        <td>
                            <asp:Button ID="ButtonSearch" runat="server" Text="查询" CssClass="bnt1" />
                        </td>
                    </tr>
                </table> </div>
                <cc1:GroupFlyGridView ID="GroupFlyGridViewShow" runat="server" AddSequenceColumn="False"
                    AllowMultiColumnSorting="False" AutoGenerateColumns="False" BorderColor="#CCDDEF"
                    CellPadding="0" Del="False" DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False"
                    GridViewSortDirection="Ascending" PagingStyle="None" TableName="" Width="100%"
                    CellSpacing="1" GridLines="None" AllowSorting="True" DataSourceID="ObjectDataSourceData"
                    Style="margin-left: 0px;">
                    <HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="#FFFFFF">
                    </HeaderStyle>
                    <PagerStyle HorizontalAlign="Left" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <input id="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" type="checkbox" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <input id="checkboxItem" value='<%# Eval("Guid") %>' type="checkbox" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="标题" DataField="Title" />
                        <asp:BoundField HeaderText="作者/发布人" DataField="Publisher" />
                        <asp:BoundField HeaderText="所属类型" DataField="Name" />
                        <asp:BoundField HeaderText="来源" DataField="Source" />
                        <asp:BoundField HeaderText="发布时间" DataField="CreateTime" />
                        <asp:BoundField DataField="OrderID" HeaderText="排序号" />
                        <asp:TemplateField HeaderText="是否显示">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%#ChangeIsShow(DataBinder.Eval(Container, "DataItem(IsShow)","{0}"))%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </cc1:GroupFlyGridView>
           
        </div>
    </div>
    <div class="vote">
        <asp:Button ID="ButtonAdd" runat="server" CausesValidation="False" Text="添加" CssClass="bnt1 cancel"
            OnClientClick="return GetCheckedBoxValues()" OnClick="ButtonAdd_Click" />
        <asp:Button ID="ButtonEdite" runat="server" CausesValidation="False" Text="编辑" CssClass="bnt1 cancel"
            OnClientClick="return EditButton()" OnClick="ButtonEdite_Click" />
        <asp:Button ID="ButtonDelete" runat="server" Text="删除" OnClientClick="return DeleteButton()"
            CssClass="bnt1 cancel" OnClick="ButtonDelete_Click" />
        <China315:MessageShow ID="MessageShow" Visible="false" runat="server" />
        <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" SelectMethod="GetNewsAll"
            TypeName="GroupFly.ProduceBusinessLogic.GroupFlyProduce_News_Action" 
            OldValuesParameterFormatString="original_{0}">
            <SelectParameters>
                <asp:ControlParameter ControlID="TextBoxTitle" Name="title" PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="DropDownListType" Name="NewsCategoryID" PropertyName="SelectedValue"
                    Type="Int32" />
                <asp:ControlParameter ControlID="TextBoxPublisher" Name="publisher" PropertyName="Text"
                    Type="String" />
                <asp:ControlParameter ControlID="DropDownListIsShow" Name="IsShow" PropertyName="SelectedValue"
                    Type="Int32" />
                <asp:ControlParameter ControlID="TextBoxTime1" Name="time1" PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="TextBoxTime2" Name="time2" PropertyName="Text" Type="String" />
                <asp:Parameter DefaultValue="0" Name="isDeleted" Type="Int32" />
                <asp:ControlParameter ControlID="ProduceMemLoginID" Name="ProduceMemLoginID" 
                    PropertyName="Value" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
        <asp:HiddenField ID="ProduceMemLoginID" runat ="server" Value ="0" />
    </div>
    </form>
</body>
</html>
