<%@ Page Language="C#" MasterPageFile="~/Manage/main.Master" AutoEventWireup="true" CodeBehind="PicList.aspx.cs" Inherits="EasySion.ERP.Web.admin.PicList" Title="无标题页" %>
<%@ Register TagPrefix="uc" TagName="ContentChannel" Src="~/Manage/ContentChannel.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="LeftMenu" runat="Server">
  <uc:ContentChannel ID="ContentChannel" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MidContent" runat="Server">
  <div id="mainMenu">
    <ul>
      <li>
        <asp:HyperLink ID="PicLink" runat="server">添加图文</asp:HyperLink>
      </li>
      <li><a href="PicList.aspx<%=Request.Params["op"] == null ? "" : "?op=Hidden" %>">图文列表</a></li>
      <li> <a href="PicEdit.aspx<%=Request.Params["op"] == null ? "" : "?op=Hidden" %>">图文编辑</a></li>
      <li> <a href="PicClass.aspx<%=Request.Params["op"] == null ? "" : "?op=Hidden" %>">分类管理</a></li>
    </ul>
  </div>
  <div id="main">
    <asp:Label ID="Msg" runat="server" Text="" CssClass="msg" Visible="False"></asp:Label>
    <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7"
            id="mainTopTable">
      <tr>
        <td colspan="4" bgcolor="#FFFFFF" class="mainTitle">“<asp:Label ID="MenuName" runat="server" ForeColor="Black"></asp:Label>”图文检索</td>
      </tr>
      <tr>
        <td align="right" bgcolor="#FFFFFF">属于分类：</td>
        <td bgcolor="#ffffff"><asp:DropDownList ID="ClassList" runat="server"> </asp:DropDownList></td>
        <td bgcolor="#FFFFFF" align="right">图文标题/内容：</td>
        <td bgcolor="#FFFFFF">&nbsp;
          <asp:TextBox ID="PicTitle" runat="server" CssClass="inputText" style="width: 280px"></asp:TextBox>
          <asp:HiddenField ID="IsSearch" runat="server" Value="0" /><asp:Button ID="Search" runat="server" CssClass="inputBt" Text="图文检索" OnClick="Search_Click" ValidationGroup="PicSearch" /></td>
      </tr>
    </table>
    <asp:GridView ID="gvPicList" runat="server" AllowPaging="True" AutoGenerateColumns="False" OnPageIndexChanging="PicList_PageIndexChanging" DataKeyNames="PicId" OnRowCancelingEdit="PicList_RowCancelingEdit" OnRowEditing="PicList_RowEditing" OnRowUpdating="PicList_RowUpdating" PageSize="11" CellPadding="0" CssClass="gv" Width="100%" EmptyDataText="暂无任何图文">
      <Columns>
      <asp:BoundField DataField="PicId" HeaderText="ID">
        <ControlStyle CssClass="gvOrderId" />
      </asp:BoundField>
      <asp:BoundField DataField="ClassName" HeaderText="所属分类" ReadOnly="True" SortExpression="ClassName" />
      <asp:BoundField DataField="Title" HeaderText="图文标题" ReadOnly="True" SortExpression="Title" />
      <asp:HyperLinkField DataNavigateUrlFields="PicPathSmall" HeaderText="小图预览" Target="_blank" Text="预览" />
      <asp:HyperLinkField DataNavigateUrlFields="PicPathBig" HeaderText="大图预览" Text="预览" Target="_blank" />
      <asp:BoundField DataField="AddTime" HeaderText="添加时间" ReadOnly="True" SortExpression="AddTime" />
      <asp:TemplateField HeaderText="操作">
        <ItemStyle CssClass="gvBtAField" />
        <ItemTemplate>
          <%--<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="<%# Eval("PicId", "PicEdit.aspx?PicId={0}") %>" Text="编辑图文"></asp:HyperLink>--%>
          <a href='PicEdit.aspx?PicId=<%# Eval("PicId") %><%# Request.Params["op"] == null ? "" : "&op=Hidden" %>'> 编辑图文</a> </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="删除">
        <EditItemTemplate>
          <asp:CheckBox ID="chkDelete" runat="server" />
        </EditItemTemplate>
        <ItemTemplate>
          <asp:CheckBox ID="chkDelete" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      </Columns>
      <RowStyle CssClass="gvRow" />
      <EditRowStyle CssClass="gvEditRow" />
      <PagerStyle CssClass="gvPage" />
      <HeaderStyle CssClass="gvHeader" />
      <AlternatingRowStyle CssClass="gvAlternatingRow" />
    </asp:GridView>
    <br />
    <asp:Button ID="btnAll" runat="server" Text="全选" OnClick="btnAll_Click" />
    <asp:Button ID="btnReverse" runat="server" Text="反选" OnClick="btnReverse_Click" />
    <asp:Button ID="btnCancell" runat="server" Text="取消" OnClick="btnCancell_Click" />
    <asp:Button ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click" />
    <script language="JavaScript" type="text/javascript">
	var op=location.search;
	if(op.toLowerCase().indexOf("hidden")>-1)
	{
	topMenuThisPage(2);
	}
	else
	{
	topMenuThisPage(1);
	}
	contentSubMenuThisPage();
	mainMenuThisPage(2);
    </script>
  </div>
</asp:Content>