<%@ page language="C#" masterpagefile="~/Shop/ShopMasterPage/ShopMasterPage.master" autoeventwireup="true" inherits="Shop_Browse_ShopLevel, HoWaveVGO" title="品牌店铺" enableEventValidation="false" %>
<%@ Register Src="../UserControls/ShopDetailSearch.ascx" TagName="ShopDetailSearch"  TagPrefix="uc2" %>
<%@ Register Src="../UserControls/ClassMapPath.ascx" TagName="ClassMapPath" TagPrefix="uc3" %>
<%@ OutputCache Duration="600"  VaryByControl="ShopLevel"%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link type="text/css" href="../../skin/css/browse/ShopCategory.css" rel="stylesheet" />
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True"/>
<script language="javascript" type="text/javascript" src="../Js/howave_time.js"></script> 
<script language="javascript" type="text/javascript" src="../Js/f_function.js"></script> 
<div id="Category_Content" style="left: 0px; top: -5px">
   <!--导航栏--->
   <div id="Navigator_Bar"></div>    
   <!--分类导航条-->
   <div id="Catergor_Navgitor">
      <uc3:ClassMapPath id="ClassMapPath1" runat="server"/>
   </div>
   <!--子分类列表-->
   <%--<div id="ChildClass_List">
   </div>--%>
   <!--主栏目-->
   <div id="Main_Frame">

      <!--商品展示主栏-->
      <div id="Product_List">
      <div id="mainSarR">
         <!--商品显示按钮栏-->
         <div id="MainMenu">
	     <div class="TabMenu">
		        <!--一级导航-->				
                <ul id="M1" > 
                <li class="active"><a href="?shoplevel=-1">所有品牌店铺</a></li>
                <li class="active"><a href="?shoplevel=1">高级店铺</a></li>
               </ul>
         </div>
         <!--商品显示方式选择栏-->
         <div id="Prodcut_Show_Type">           
            <div class="show_num">每页显示数量：</div>
            <div class="show_page">
                &nbsp;</div>         
            <div class="show_place">
                &nbsp;</div>
         </div>       
         <!--店铺列表栏-->
         <div id="Porduct_List_Main">
<%--           <asp:UpdatePanel ID="UpdatePanel1" runat="server">
               <ContentTemplate>--%>
              <asp:GridView id="GridView1" runat="server" BorderWidth="0px" CssClass="ProductList" EnableViewState="False"  AllowSorting="True" AllowPaging="True" DataKeyNames="ShopID" OnRowDataBound="GridView_ItemDataBound" AutoGenerateColumns="False" PageSize="5">
                 <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>店标</HeaderTemplate>
                        <HeaderStyle Width="15%"></HeaderStyle>
                        <ItemTemplate>
                            <asp:HyperLink id="HyperLink2" runat="server" NavigateUrl='<%#"../Shop1/MyShop.aspx?ShopID="+ Eval("ShopID") %>'   Target="_blank">
                               <asp:Image ID="ShopImage" runat="server"  ImageUrl='<%#"../Shop/"+Eval("ShopImageUrl") %>'  Width="100px"/>
                            </asp:HyperLink> 
                        </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>店名</HeaderTemplate>
                        <ItemStyle HorizontalAlign="Left"></ItemStyle>
                        <HeaderStyle Width="35%"></HeaderStyle>
                        <ItemTemplate>
                             <asp:HyperLink ID="ShopName" Text='<%#Eval("ShopName") %>' NavigateUrl='<%#"../Shop1/MyShop.aspx?ShopID="+ Eval("ShopID") %>' runat="server" Target="_blank"/><br />
                             <span class="shop_main_item"><asp:Literal runat="server" ID="MainItem" Text='<%#"主营：" +Eval("ShopOperatorItem") %>' /></span>
                                                   
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>店长</HeaderTemplate>
                        <HeaderStyle Width="10%"></HeaderStyle>
                        <ItemTemplate>
                             <asp:HyperLink ID="HyperLink3" Text='<%#Eval("ShopOwnerName") %>' NavigateUrl='<%#"../Shop1/Shop_Review.aspx?UserID="+ Eval("ShopOwnerID") %>' runat="server" Target="_blank"/>
                             <br/><br/>
                             <asp:HyperLink ID="QQLink" runat="server" NavigateUrl='<%# "http://wpa.qq.com/msgrd?V=1&Uin="+Eval("OICQ")+"&amp;Site="+Eval("ShopOwnerName")+"&amp;Menu=yes" %>' Target="_blank">
                              <asp:Image  ID="QQImage" ImageUrl='<%# Eval("OICQ")%>' runat="server" />
                              </asp:HyperLink>&nbsp;
                             <asp:HyperLink ID="TaobaoLink" runat="server" NavigateUrl='<%# Eval("Taobaowangwang") %>' Target="_blank">
                                <asp:Image ID="TaobaoImage" ImageUrl='<%# Eval("Taobaowangwang") %>' runat="server"  AlternateText="点击此可以直接和对方交流"/>
                             </asp:HyperLink>
                        </ItemTemplate>
                   </asp:TemplateField>
                   <asp:TemplateField>
                       <HeaderTemplate>商品数量</HeaderTemplate>
                       <HeaderStyle Width="10%"></HeaderStyle>
                       <ItemTemplate>
                            <asp:Literal ID="ProductType" Text='<%#Eval("ShopProductNum") %>' runat="server" />
                       </ItemTemplate>
                   </asp:TemplateField>
                   <asp:TemplateField>
                       <HeaderTemplate> 
                       </HeaderTemplate>
                       <HeaderStyle Width="10%"></HeaderStyle>
                       <ItemTemplate>
                           <asp:Literal ID="ProductPlace" Text='<%#Eval("ShopAddress") %>' runat="server" />
                           <asp:HiddenField ID="F_ShopID" Value='<%#Eval("ShopID") %>' runat="server" />
                       </ItemTemplate>
                  </asp:TemplateField>
                  <asp:TemplateField>
                      <HeaderTemplate>卖家信用等级</HeaderTemplate>
                      <HeaderStyle Width="15%"></HeaderStyle>
                      <ItemTemplate>
                         <asp:HyperLink ID="shop_saler_credit" runat="server"  Text='<%#"<script>displayStar("+ Eval("SaleCrediet")+")</script>" %>' NavigateUrl='<%#"../Shop1/Shop_Review.aspx?UserID="+Eval("ShopOwnerID") %>'/>
                      </ItemTemplate>
                  </asp:TemplateField>
                  </Columns>
                  <EmptyDataTemplate>很抱歉!没有你查找的店铺,缩减你的关键字查找的机率会高些!</EmptyDataTemplate>
       </asp:GridView> 
<%--</ContentTemplate>    
               <Triggers>
                   <asp:AsyncPostBackTrigger ControlID="Sort_Type" EventName="SelectedIndexChanged" />
               </Triggers>
           </asp:UpdatePanel>--%>
         
         <!--商品比较下栏-->
         <div id="Product_Compare_Bottom"></div>
         <!--商品分页栏栏-->
         <div id="Product_Page"></div>
         </div>
      </div></div>
      </div>
      <!--侧栏-->
      <div id="Side_Bar">        
          <div  class="SideBox">
              <div class="title"><b>搜索店铺</b></div>              
                    <uc2:ShopDetailSearch id="ShopDetailSearch1" runat="server"/>
          </div >
          <div  class="SideBox">
             <div class="title"><b>店铺类目</b></div>
             <%ShowShopClassList(); %>
          </div> 
      </div>
      </div> 
   </div>

    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetCategoryListByParentID" TypeName="Shop_Class">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="ParentID" QueryStringField="ParentID"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
  
    <asp:ObjectDataSource ID="ObjectDataSource5" runat="server" SelectMethod="GetImportantCityByFlag" TypeName="Shop_City"></asp:ObjectDataSource> 
    
    <script type="text/javascript">
                    function setButtonActive(flags)
                    {
                       var _flag=parseInt(flags);
                       var ulObj=document.getElementById("M1");
                       
                       for(var i=0;i<ulObj.childNodes.length;i++)
                         ulObj.childNodes[i].className="";
                       if(ulObj.childNodes.length>4)
                            {_flag=_flag*2+1;}
                         ulObj.childNodes[_flag].className="active";
                       
                    }
                    setButtonActive(<%=m_buttonIndex %>);
                </script>
</asp:Content>

