<%@ page language="C#" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_MyFavourite, mallz" title="我的收藏" enableEventValidation="false" %>
<%@ Register tagPrefix="MZ" TagName="TextFormat" Src="../UserControls/ProductTextFormat.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script language="javascript">
function setButtonActive(flags)
{
    if(flags=="")
        flags = 1;
    var _flag=parseInt(flags);
    var ulObj=document.getElementById("M1");
    if(_flag==1)
    {
        ulObj.childNodes[0].className="active";
        ulObj.childNodes[1].className="";
    }
    else if(_flag==2){
        ulObj.childNodes[0].className="";
        ulObj.childNodes[1].className="active";
    }
    else{
        ulObj.childNodes[0].className="";
        ulObj.childNodes[1].className="";
    }
}
</script>
<div class="pageTitle">我的收藏</div>

<div id="MainMenu" style="height:100%">
	<div class="TabMenu">
		<!--一级导航-->
       <ul id="M1">
          <li class="active"><a href="?type=1">商品</a></li>
          <li><a href="?type=2">店铺</a></li>
       </ul>      
</div>

    <div class="TabText">
    <br />
    <asp:PlaceHolder ID="ProductPanel" runat="server" Visible="False">
            <table class="SearchTableStyle" style="display:none;"><tr>
                <td class="tdbg5">您现在查看的是：
                    <asp:DropDownList ID="DropF_Class" runat="server" DataSourceID="ObjectDataSource1" AppendDataBoundItems="true" AutoPostBack="True" >
                        <asp:ListItem Value="0">所有分类</asp:ListItem>
                    </asp:DropDownList>
                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetFProductClassByUserID" TypeName="MallZ.Data.Shop_FProductClass">
                        <SelectParameters><asp:Parameter Name="UserID" Type="int32" /></SelectParameters>
                    </asp:ObjectDataSource>
                 </td>
                 <td class="tdbg5">
                    <asp:Button ID="Button3" runat="server" Text="类别管理"  />
                 </td>
             </tr>
            </table>
             
            <asp:GridView ID="GridViewProduct" runat="server" AutoGenerateColumns="False"  AllowPaging="True" DataKeyNames="F_ID" CssClass="tableHead" >                  
                 <Columns>
                   <asp:TemplateField HeaderStyle-Width="4%">
                     <HeaderTemplate>
                        <input id="chkAll" onclick="SelectAllCheckboxes(this,'ids');" type="checkbox" />
                     </HeaderTemplate>
                     <ItemTemplate>                        
                        <input type="checkbox" name="ids" id="ids" value='<%# Eval("ProductID") %>' />
                     </ItemTemplate>       
                   </asp:TemplateField>   
                   <asp:TemplateField  HeaderText="基本信息" ItemStyle-HorizontalAlign="Left">
                        <ItemTemplate>
                        <asp:HyperLink ID="ProductName" runat="server" Text='<%# Eval("ProductName") %>' NavigateUrl='<%# "../ShowProduct.aspx?ProductID="+Eval("ProductID") %>'  Target="_blank"/><br />
                            备注：<asp:Literal ID="Label3" runat="server" Text='<%# Eval("F_Remark") %>'/>
                        </ItemTemplate>
                   </asp:TemplateField> 
                   <asp:TemplateField HeaderText="剩余时间" HeaderStyle-Width="12%">
                    <ItemTemplate>
                        <MZ:TextFormat runat="server" ID="TextFormat0" Text="LeftTime" Value='<%# Eval("EndDate")+"|"+Eval("NoLimitDate") %>' /><br />
                    </ItemTemplate>
                   </asp:TemplateField> 
                   <asp:TemplateField HeaderText="价格" HeaderStyle-Width="10%">
                       <ItemTemplate >
                           <asp:Literal ID="LabShopType" runat="server" Text='<%# MallZ.Web.Shop.TextFormat.GetProductType(Eval("ProductType").ToString()) %>' /><br />
                           <asp:Literal ID="LabProductPrice" runat="server" Text='<%# Eval("CurrentPrice") %>' />
                       </ItemTemplate>
                   </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作"  HeaderStyle-Width="80px">
                        <ItemTemplate>
                           <asp:LinkButton runat="server" ID="del" Text="删除" OnCommand="Delete_F" CommandArgument='<%#Eval("F_ID") %>' OnClientClick="return confirm('确定删除吗？')" />
                        </ItemTemplate>
                   </asp:TemplateField>
                 </Columns>
                 <EmptyDataTemplate>
                     <table class="tableHeader" style="width:98%">
                         <tr>
                             <th>ID</th>
                             <th>基本信息</th>
                             <th>价格</th>
                             <th>操作</th>
                         <tr>
                            <td colspan="4">没有符合查询条件的记录！</td>
                         </tr>
                     </table>
                 </EmptyDataTemplate>               
             </asp:GridView>
     </asp:PlaceHolder>
     
     <asp:PlaceHolder ID="ShopPanel" runat="server" Visible="False"  >
           <table class="SearchTableStyle" style="display:none;"><tr>
                  <td class="tdbg5">您现在查看的是：
                        <asp:DropDownList ID="DropF_ShopClassID" runat="server" DataSourceID="ObjectDataSource2" AppendDataBoundItems="true" AutoPostBack="True" >
                            <asp:ListItem Text="所有分类" Value="0" />
                        </asp:DropDownList>
                        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetFShopClassByUserID" TypeName="MallZ.Data.Shop_FShopClass">
                        <SelectParameters><asp:Parameter Name="UserID" Type="int32" /></SelectParameters>
                    </asp:ObjectDataSource>
                   </td>
                   <td class="tdbg5">
                        <asp:Button ID="Button7" runat="server" Text="类别管理"  />
                 </td>
               </tr>
           </table>
           
         <asp:GridView ID="GridViewShop" DataKeyNames="F_ID" runat="server" AutoGenerateColumns="False" CssClass="tableHead">
           <Columns>
                <asp:TemplateField HeaderStyle-Width="4%">
                    <HeaderTemplate>
                       <input id="chkAll" onclick="SelectAllCheckboxes(this,'ids');" type="checkbox" />
                    </HeaderTemplate>
                     <ItemTemplate>
                       <input type="checkbox" name="ids" id="ids" value='<%# Eval("F_ID") %>' />
                     </ItemTemplate>
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="店标">
                     <ItemTemplate>
                       <a href="../../Shop/Shop1/MyShop.aspx?ShopID=<%#Eval("ShopID") %>"  target="_blank"><img src='<%# Eval("ShopImageUrl") %>' onload="ResizeImage(this,100,100)"/></a>
                     </ItemTemplate>
                </asp:TemplateField> 
                 <asp:TemplateField HeaderText="基本信息">
                     <ItemTemplate>
                       <div class="fav">
                       <asp:HyperLink ID="shopname" runat="server" Text='<%# Eval("ShopName") %>' NavigateUrl='<%#"../Shop/Index.aspx?ShopID="+Eval("ShopID") %>'  Target="_blank"/><br />
                       备注：<asp:Label runat="server" ID="LabFremark1" Text='<%# Eval("F_Remark") %>' />
                       </div>
                     </ItemTemplate> 
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="操作" HeaderStyle-Width="10%">
                     <ItemTemplate>
                        <asp:LinkButton runat="server" ID="delbut" Text="删除" OnClientClick="return confirm('确定删除吗？')" OnCommand="Delete_F" CommandArgument='<%#Eval("F_ID") %>' />
                     </ItemTemplate>
                </asp:TemplateField>                      
           </Columns>
           <EmptyDataTemplate>
                    <table class="tableHeader" style="width:98%">
                         <tr>
                             <th>ID</th>
                             <th>基本信息</th>
                             <th>价格</th>
                             <th>操作</th>
                         <tr>
                            <td colspan="4">没有符合查询条件的记录！</td>
                         </tr>
                     </table>
           </EmptyDataTemplate>
       </asp:GridView>
     </asp:PlaceHolder>
     </div>  
    <div style="clear:both; height:3px"></div>
</div>


<script type="text/javascript">setButtonActive('<%=m_type %>');</script>

</asp:Content>

