<%@ page language="C#" autoeventwireup="true" inherits="Shop_Browse_ShopList, WebApp_deploy" title="商城店铺列表" enableviewstate="false" %>
<html xmlns="http://www.w3.org/1999/xhtml" runat="server" visible="false">
<head>
<link type="text/css" href="/skin/css/browse/ShopCategory.css" rel="stylesheet" />
</head>

<body>
<form id="form_1" runat="server">
<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">
      <hl:ClassMapPath id="ClassMapPath1" runat="server"/>
   </div>

   <!--主栏目-->
   <div id="Main_Frame">

      <!--商品展示主栏-->
      <div id="Product_List">
          <div id="mainSarR">
             <!--商品显示按钮栏-->
             <div id="MainMenu">
	             <div class="TabMenu">
		                <!--一级导航-->
                        <ul id="M1" >
                            <li class="active"><asp:HyperLink ID="alllink" runat="server" Text="所有店铺" /></li>
                            <li><asp:HyperLink ID="bandshoplink" runat="server" Text="品牌店铺" /></li>
                            <li><asp:HyperLink ID="highshoplink" runat="server" Text="高级店铺" /></li>                         
                        </ul>
                 </div>
                 <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="";
                         //alert(ulObj.childNodes.length);
                         _flag=_flag+ulObj.childNodes.length-5;
                         ulObj.childNodes[_flag].className="active";  

                    }
                    setButtonActive(<asp:literal id="ButtonIndex" runat="server"/>);
                </script>
                 <!--商品显示方式选择栏-->
                 <div id="Prodcut_Show_Type">           
                    <div class="show_num">每页显示数量：</div>
                    <div class="show_page">
                           <asp:HyperLink ID="Page20Link" runat="server"><asp:Image ImageUrl="../Images/page_20.gif" runat="server" ID="Page_20" /></asp:HyperLink>
                           <asp:HyperLink ID="Page40Link" runat="server"><asp:Image ImageUrl="../Images/page_40.gif" runat="server" ID="Page_40"/></asp:HyperLink>
                           <asp:HyperLink ID="Page80Link" runat="server"><asp:Image ImageUrl="../Images/page_80.gif" runat="server" ID="Page_80"/></asp:HyperLink>
                    </div>         
                    <div class="show_place">
                       <asp:DropDownList ID="F_ProductPlace" runat="server"  DataSourceID="ObjectDataSource5" 
                         DataTextField="City" DataValueField="City" AppendDataBoundItems="True"  AutoPostBack="true" OnSelectedIndexChanged="SortAndPlaceSelectIndexChange">
                                   <asp:ListItem Text="所在地" Value="-1" />
                       </asp:DropDownList>
                       排序方式：
                       <asp:DropDownList ID="Sort_Type" runat="server" Width="150px"  AutoPostBack="true" OnSelectedIndexChanged="SortAndPlaceSelectIndexChange">                             
                              <asp:ListItem Text="商品数量从多到少" Value="12" />
                              <asp:ListItem Text="卖家信用从高到低" Value="10" /> 
                       </asp:DropDownList>
                    </div>
                 </div> 
             </div>          
             <!--店铺列表栏-->
             <div id="Porduct_List_Main"  style="width:100%"> 
                  <asp:GridView id="GridView1" runat="server" BorderWidth="0" CssClass="ProductList" EnableViewState="False" 
                   AllowSorting="True" AllowPaging="True" DataKeyNames="ShopID"  OnRowDataBound="GridView1_RowDataBound"
                   AutoGenerateColumns="False" PageSize="80"  OnPageIndexChanging="GridView1_OnPageIndexChanging" EmptyDataText="暂无店铺！">
                     <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:Literal ID="BandShop" runat="server"  Text='2'/>
                                 <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>                   
                             <%-- <asp:Literal ID="Literal1" runat="server"  Text='<%#Eval("ShopLevel") %>'/><asp:HyperLink ID="HyperLink1" 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="Literal2" 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 HeaderText="所在地">                         
                           <HeaderStyle Width="10%"></HeaderStyle>
                           <ItemTemplate>
                               <asp:Literal ID="ProductPlace" Text='<%#Eval("ShopAddress") %>' 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("SalerCrediet")+")</script>" %>' NavigateUrl='<%#"../Shop1/Shop_Review.aspx?UserID="+Eval("ShopOwnerID") %>'/>
                          </ItemTemplate>
                      </asp:TemplateField>
                      </Columns>
                      <EmptyDataTemplate>很抱歉!没有你查找的店铺,缩减你的关键字查找的机率会高些!</EmptyDataTemplate>
                      <AlternatingRowStyle CssClass="AltrowStyle" />
                  </asp:GridView>
                   <div class="productPageStyle" >
                    <asp:Literal ID="CurrentPage" runat="server" />页
                     &nbsp;&nbsp;
                  
                     <asp:LinkButton ID="Pre_Page" runat="server"  Text="<img src='../Images/pre_page_1.gif' style='border:0; vertical-align:middle;height:18px' />"  ToolTip="上一页" CommandName="Pre" OnCommand="PagerButton_Click"/>
                     <asp:LinkButton ID="FirstPage" runat="server" Text="1" CommandName="First" OnCommand="PagerButton_Click" />&nbsp;
                    
                     <asp:PlaceHolder ID="NumberPageHolder" runat="server" />
                     <asp:LinkButton ID="LastPage" runat="server" Text="尾页" CommandName="Last" OnCommand="PagerButton_Click"/>
                     <asp:LinkButton ID="Next_Page" runat="server"  Text="<img src='../Images/next_page_1.gif' style='border:0; vertical-align:middle;height:18px' />" ToolTip="下一页" CommandName="Next" OnCommand="PagerButton_Click"/>
                     到 第
                     <asp:TextBox ID="GoPageNum" runat="server" Width="30px" /><asp:Button ID="GoPageButton" runat="server" CommandName="GoPage" OnCommand="PagerButton_Click" Text="查看"  OnClientClick="return CheckGoPage();"/>
                 </div> 
             </div>
             </div> 
          </div>
      <!--侧栏-->
      </div>
 <div id="Side_Bar">        
 <div  class="SideBox">
 <div class="title"><b>搜索店铺</b></div>              
 <hl:ShopDetailSearch  ID="ShopDetailSearch1" runat="server"
  />
</div >
          <div  class="SideBox">
             <div class="title"><b>店铺类目</b></div>
               <asp:literal ID="ShopClassListLiteral" runat="server" />
          </div> 
      </div> 
   </div>
<script type="text/javascript">

     
function CheckGoPage()
{
   var flag=false;
   var _Gopage=document.getElementById("ctl00_ContentPlaceHolder1_GoPageNum").value;
   if(_Gopage!="")
   {
      if(isNaN(_Gopage))
      {
           alert("你输入的页码包含其它字符，请重新输入！");
           
      }
      else if(parseInt(_Gopage)<1)
      {
         alert("输入页码过小，请输入正确页面！");
      }
      else
      {
         flag=true;
      }      
      
   }
   else
   {
      alert("输入页码过小，请输入正确页面！");
   }
   return flag;
}
</script>
    <asp:HiddenField ID="H_pageIndex" runat="server" Value="1" />
      <asp:HiddenField ID="H_pageSize" runat="server" Value="20" />
      <asp:HiddenField ID="H_productPlace" runat="server" Value="-1" />
      <asp:HiddenField ID="H_sortType" runat="server" Value="-1" />     
      <asp:HiddenField ID="H_parentid" runat="server" Value="0" />
      <asp:HiddenField ID="H_OtherType" runat="server" Value="all" />
      <asp:HiddenField ID="H_PageCount" runat="server" Value="1" />
    <asp:ObjectDataSource ID="ObjectDataSource5" runat="server" SelectMethod="GetImportantCityByFlag" 
    TypeName="HoWave.Web.Shop_City"/> 
</form>
</body>
</html>


