<%@ page language="C#" autoeventwireup="true" inherits="ShopShelve, LebiMall" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title><%=model.Title %>-上下架商品</title>
    <meta name="description" content=<%=model.Description %> />
    <meta name="keywords" content=<%=model.Keywords %> />
    <meta name="generator" content="LBMall 3.0.0" />
    <link href="images/css/css3.css" rel="stylesheet" type="text/css" />
    <link href="images/css/css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="images/js/shopjs.js"></script>
    <link href="images/css/shopcss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript"> 
        function SelectAllCheckBox()
        {
            var form =document.forms[0];
            for(i=0;i<form.elements.length;i++)
            {
                if(form.elements[i].type=="checkbox")
                {
                    form.elements[i].checked=true;
                }
            }
        }
        
        function ReSelectCheckBox()
        {
            var form =document.forms[0];
            for(i=0;i<form.elements.length;i++)
            {
                if(form.elements[i].type=="checkbox")
                {
                    if(form.elements[i].checked)
                        form.elements[i].checked=false;
                    else
                        form.elements[i].checked=true;
                }
             }
        }
         function search2(){
            var texts2=document.getElementById("ser2").value;
            var select_v2=document.getElementById("Select3").value;
            window.location="list.aspx?tid="+select_v2+"&titlec="+escape(texts2);
        }
    </script>

</head>
<body>

    <div id="top-menu02">
        <div id="top-menu">
            <div class="right">
                <script type="text/javascript">indexhead();</script>
            </div>
        </div>
    </div>
    <div id="top">
        <div id="logo">
            <a href="http://<%=Request.Url.Host %><%=model.WebPath %>/">
                <img src="Upload/WebAdminImages/<%=model.Logoimg %>" border="0" /></a></div>
    </div>
    <div id="sp-menu">
        <ul>
            <li><a href="http://<%=Request.Url.Host %><%=model.WebPath %>/">首页</a></li>
            <%for (int i = 0; i < ds_tab.Tables[0].Rows.Count; i++){ %>
            <li><%if (model.Tab == "1") { %>
                <a href="<%= ds_tab.Tables[0].Rows[i]["tdirname"]%>/" target="_blank"><%= ds_tab.Tables[0].Rows[i]["tname"]%></a>
                <%}else{%>
                <a href="TopTab.aspx?type=<%= ds_tab.Tables[0].Rows[i]["tdirname"]%>" target="_blank"><%= ds_tab.Tables[0].Rows[i]["tname"]%></a>
                <%} %></li>
            <%} %>
            <li><a href="http://<%=Request.Url.Host %><%=model.WebPath %>/News/" target="_blank">资讯</a></li>
        </ul>
        <p>
            <span><a href="ShopCoupon.aspx">优惠券</a></span></p>
    </div>

    <div id="contenter2">
        <div id="contenter">

            <script type="text/javascript">
            shopLeft();
            </script>

            <div id="right">
                <div class="page-title">
                    <a class="back" href="#" onclick="javascript:window.history.back();"><span>返回上一页</span></a>
                    <h2 class="shop clearfix">
                        <%=title %>
                    </h2>
                </div>
                <div class="contenter">
                    <form id="Form1" runat="server">
                        <div class="rtitle">
                            <div class="rtitle-l">
                                <a class="Link2" onclick="SelectAllCheckBox()" href="javascript:;">全选</a> |<a class="Link2"
                                    onclick="ReSelectCheckBox()" href="javascript:;">反选</a></div>
                            <div class="rtitle-r">
                                <asp:Button runat="server" ID="btnShelve" OnClick="btnShelve_Click" CssClass="btn_submit" />
                                <asp:Button runat="server" ID="Button1" CssClass="btn_submit" Text="删除" OnClientClick="return confirm('确认是否要删除吗?');"
                                    OnClick="Button1_Click" />
                                <asp:Button runat="server" ID="Button2" CssClass="btn_submit" Text="修改数量" OnClick="Button2_Click" />
                            </div>
                            <div style="clear: both;">
                            </div>
                        </div>
                        <div class="shelve_rebg">
                            <ul>
                                <asp:Repeater runat="server" ID="rpShleve" OnItemDataBound="rpShleve_ItemDataBound"
                                    OnItemCommand="rpShleve_ItemCommand">
                                    <ItemTemplate>
                                        <input type="hidden" runat="server" id="hiddenId" value='<%#Eval("Id") %>' />
                                        <li class="shelve_bg">
                                            <div class="shelve_img_pa">
                                                <a href="detail.aspx?cid=<%#Eval("id") %>">
                                                    <img src="Upload/commodity/<%#Eval("Cmin_img") %>" class="shelve_img" /></a></div>
                                            <div class="shelve_content_bg">
                                                编号：<%#Eval("Cno").ToString().Length > 7 ? Eval("Cno").ToString().Substring(0, 7) : Eval("Cno").ToString()%></div>
                                            <div class="shelve_content_bg">
                                                名称：<a href="#"><%#Eval("Cname").ToString().Length > 7 ? Eval("Cname").ToString().Substring(0, 6)+"..." : Eval("Cname").ToString()%></a></div>
                                            <div class="shelve_content_bg">
                                                ￥<%#Eval("Cprice") %><br />
                                                数量：<input type="text" runat="server" id="txt_num" value='<%#Eval("Cnum") %>' class="txt_num" /></div>
                                            <div class="shelve_manage">
                                                <div style="float: left;">
                                                    <input type="checkbox" runat="server" id="chkItem" /></div>
                                                <div style="float: right;">
                                                    <asp:LinkButton runat="server" ID="lbtnShelve" Text="放入仓库" CommandName="Shelve" CommandArgument='<%#Eval("Id") %>'></asp:LinkButton>
                                                    <a href='Update_c.aspx?cid=<%#Eval("id") %>'>编辑</a>
                                                </div>
                                            </div>
                                            <div style="clear: both;">
                                            </div>
                                        </li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                        </div>
                        <div style="clear: left;">
                            <webdiyer:AspNetPager CssClass="pages" CurrentPageButtonClass="cpb" ID="AspNetPager1"
                                runat="server" RecordCount="228" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
                                PrevPageText="上一页" PageSize="10" UrlPaging="True" NumericButtonCount="5">
                            </webdiyer:AspNetPager>
                        </div>
                        <div id="divmgs" runat="server" visible="false">
                            <em>此档没有宝贝</em></div>
                    </form>
                </div>
            </div>
        </div>
        <div class="both">
            </div>
    </div>

         <div id="footer">
                    <div id="copyright">
                        <div class="search">
                            <div class="search-left">
                                <div class="search-left-title">
                                    搜索：</div>
                                <div class="search-left-form">
                                    <input type="text" runat="server" id="ser2" size="30" /></div>
                                <div class="search-left-list">
                                    <select id="Select3" runat="server">
                                    </select>
                                </div>
                                <div class="search-left-button">
                                    <img src="images/search-buttom.gif" width="60" height="20" onclick="search2()" /></div>
                            </div>
                            <div class="search-right">
                                <div runat=server id="div_s2"></div>
                            </div>
                        </div>
                    </div>
                </div>
        <div class="copyright" runat="server" id="copr"></div>
</body>
</html>
