<%@ Page Language="c#" Inherits="WebApp.Wpdcc.PublicNewsList" CodeBehind="PublicNewsList.aspx.cs" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>共享信息列表</title>
    <meta name="description" content="共享信息列表" />
 
	<!--#include file = "../assets/head.htm" -->

    
</head>
<body class="no-skin">
    <form id="Form1" method="post" runat="server">
		<div class="main-content-inner">
			<!-- #section:basics/content.breadcrumbs -->
			<div class="breadcrumbs" id="breadcrumbs">
				<script type="text/javascript">
					try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
				</script>

				<ul class="breadcrumb">
					<li>
						<i class="ace-icon fa fa-home home-icon"></i>
						主页
					</li>
					<li>站点运行监控</li>
					<li class="active">共享信息列表</li>
				</ul><!-- /.breadcrumb -->

				<!-- /section:basics/content.searchbox -->
			</div>
			<!-- /section:basics/content.breadcrumbs -->
			
			<div class="page-content">
			<!-- PAGE CONTENT BEGINS -->
			    <div class="page-header">
                    <asp:Button ID="btnSave" class="btn btn-sm btn-primary" runat="server" Text="保 存" OnClick="Btn_Click"></asp:Button>
                    &nbsp;
                    <asp:Button ID="btnAdd" class="btn btn-sm btn-primary" runat="server" Text="添 加" OnClick="Btn_Click"></asp:Button>
                    &nbsp;
                    <asp:Button ID="btnDel" class="btn btn-sm btn-primary" runat="server" Text="删 除" OnClick="Btn_Click"></asp:Button>
                </div>
            <div class="row">
		    <div class="col-xs-12">
            <!--[if lte IE 7]><div style="zoom:1"><![endif]-->
            <asp:HiddenField ID="hfidstr" runat="server" />
            <asp:HiddenField ID="hftitlestr" runat="server" />
            <asp:DataGrid ID="newsGrid" runat="server" class="table table-striped table-bordered" AllowSorting="True" AutoGenerateColumns="False" Width="100%" OnItemCommand="newsGrid_ItemCommand">
                <Columns>
                    <asp:TemplateColumn HeaderStyle-CssClass="title text-center" ItemStyle-CssClass="text-center" ItemStyle-Width="36px">
                        <HeaderTemplate>
                            <asp:CheckBox ID="cbAll" Text=" " runat="server" onclick="GridSelectAll('newsGrid',this.checked)" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="cbthis" runat="server" Text=" "></asp:CheckBox>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn DataField="pkId" HeaderText="ID号" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" FooterStyle-CssClass="hidden"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="标题" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:HyperLink ID="intactTitle" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.intactTitle") %>'
                                Target="_blank" NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.pkId", "newsInfo.aspx?pkId={0}") %>'>
                            </asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="发布人" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:Label ID="info" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.editor") %>' >
                            </asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="发布时间" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:Label ID="uptime" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.updateTime") %>'>
                            </asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="固顶" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:DropDownList ID="isTop" runat="server" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.isTop") %>'>
                                <asp:ListItem Value="0" Selected="True">取消</asp:ListItem>
                                <asp:ListItem Value="1">固顶</asp:ListItem>
                            </asp:DropDownList>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="审核" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:DropDownList ID="pass" runat="server" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.passed") %>'>
                                <asp:ListItem Value="0" Selected="True">待审</asp:ListItem>
                                <asp:ListItem Value="1">通过</asp:ListItem>
                            </asp:DropDownList>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="执行" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <div class="action-buttons">
                            <asp:LinkButton ID="edit" runat="server" CommandName="edit"><i class="ace-icon fa fa-pencil bigger-120 blue" ></i></asp:LinkButton>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn Visible="False" DataField="useListTitle" HeaderText="useListTitle" HeaderStyle-CssClass="title">
                    </asp:BoundColumn>
                </Columns>
            </asp:DataGrid>
            <div class="clearfix">
	            <div class="col-xs-12">
                    <asp:Label ID="lblPage" runat="server"></asp:Label>
                </div>
            </div>
            <!--/action-field-->
            </div>
            </div>
            <!-- PAGE CONTENT ENDS -->
            </div>
    </div>
    </form>
    <script src="../assets/js/wpcms.js" type="text/javascript"></script>
	<script type="text/javascript">

	    jQuery(function ($) {

	        $("input[type='checkbox']").addClass("ace");
	        $("input[type='checkbox']").next().addClass("lbl");

	        $("#btnSave").click(function () {
	            if (GridSelectCheck('newsGrid', true)) {
	                return true;
	            }
	            else {
	                return false;
	            }
	        });

	        $("#btnDel").click(function () {
	            return GridSelectCheck('newsGrid', true);
	        });

	    });

    </script>
</body>
</html>
