<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Product_MultiEditProduct_Operate, V5Shop.Shop.Payment" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register TagPrefix="V5Shop" Namespace="V5Shop.Control" Assembly="V5Shop.Control" %>
<!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></title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>

    <script type="text/javascript" language="javascript" src="js/Control_Calendar.js"></script>

    <style type="text/css">
#dhtmltooltip {
font-size: 9pt;
BORDER-RIGHT: gray 1px solid; 
PADDING-RIGHT: 4px; 
BORDER-TOP: gray 1px solid; 
PADDING-LEFT: 4px; Z-INDEX: 100; 
FILTER: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=120); 
VISIBILITY: hidden; 
PADDING-BOTTOM: 4px; 
BORDER-LEFT: gray 1px solid; 
WIDTH: 150px; PADDING-TOP: 4px; 
BORDER-BOTTOM: gray 1px solid; 
POSITION: absolute; 
BACKGROUND-COLOR: #cccccc
}
</style>
    <div id='dhtmltooltip'>
        <img src="" /></div>

    <script language="javascript" src="js/showimg.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="【 商品批量编辑 】"></asp:Label>&nbsp; <a href="Product_MultiEditProduct_List.aspx"
                    title="返回商品分类列表">返回列表</a>
            </div>
        </div>
        <div>
            <div id="divMultiMode" runat="server">
                <div class="div1mad" style="width: 800px;">
                    <div class="div1madl" style="float: left; margin-top: 100px;">
                        <img id="leftbutton" src="images/index/key_pre0.gif" style="cursor: pointer;" alt="点击左移"
                            onclick="MoveRight()" width="15" />
                    </div>
                    <div style="width: 770px; float: left; overflow: hidden;">
                        <div id="movepart" class="listborder">
                            <table border="0" align="center" cellpadding="0" cellspacing="0" id="table1"
                                runat="server">
                                <tr>
                                    <td align="left" bgcolor="#ffffff" style="height: 30px" colspan="2">
                                        <V5Shop:V5ShopGridView ID="GridViewProduct" runat="server" CacheName="Product" TableName="Product"
                                            AutoGenerateColumns="true" AllowSorting="false" PagerSettings-Visible="false" Width="600px"
                                            HorizontalAlign="Justify" PageSize="50">
                                            <PagerSettings Mode="NumericFirstLast" Visible="False" />
                                            <HeaderStyle CssClass="category" />
                                        </V5Shop:V5ShopGridView>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="div1madr" style="float: left; margin-top: 100px;">
                        <img id="rightbutton" src="images/index/key_next.gif" style="cursor: pointer;" alt="点击右移"
                            onclick="MoveLeft()" width="15" /></div>
                    &nbsp;</div>

                <script language="javascript" type="text/javascript">
		var left = 0;
		var start = 0;
		var end = 0;
		var obj = document.getElementById("movepart");
		var speed = 20;
		var maxindex = 10;
		var index = 10;
		function MoveLeft(){
			if(CheckStatus("left")){
				speed = 40;
				start = left;
				end = left - 320;
				Movel();
				left = left - 320;
			}
		}
		
		function MoveRight(){
			if(CheckStatus("right")){
				speed = 40;
				start = left;
				end = left + 320;
				Mover();
				left = left + 320;
			}
		}
		
		function CheckStatus(dir){
			if(dir == "left"){
				if(index > 0){
					index--;
					if(index == 0){
						document.getElementById("rightbutton").src = "images/index/key_next0.gif";
					}else{
						document.getElementById("leftbutton").src = "images/index/key_pre.gif";
					}
					return true;
				}else
					return false;
			}else if(dir == "right"){
				if(index < maxindex){
					index++;
					if(index == maxindex){
						document.getElementById("leftbutton").src = "images/index/key_pre0.gif";
					}else{
						document.getElementById("rightbutton").src = "images/index/key_next.gif";
					}
					return true;
				}else
					return false;
			}
		}
		
		function Movel(){
			start = start - speed
			speed--;
			obj.style.marginLeft = start + "px";
			if(start > end)
				setTimeout("Movel()",6);
		}
		function Mover(){
			start = start + speed
			speed--;
			obj.style.marginLeft = start + "px";
			if(start < end)
				setTimeout("Mover()",6);
		}
                </script>

            </div>
            <div id="divSingleMode" runat="server" visible="false">
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="table2"
                    runat="server">
                    <tr>
                        <td align="left" bgcolor="#ffffff" style="height: 30px" colspan="2">
                            <asp:Label ID="lblProduct" runat="server" Text="当前商品："></asp:Label>
                            <asp:Label ID="lblProductList" runat="server" ForeColor="Red" Width="80%"></asp:Label>
                            <asp:Label ID="lblIdList" runat="server" Visible="False"></asp:Label></td>
                    </tr>
                    <tr>
                        <td align="left" bgcolor="#ffffff" style="height: 30px" colspan="2">
                            <asp:Repeater ID="rptProduct" runat="server" OnItemDataBound="rptProduct_ItemDataBound">
                                <HeaderTemplate>
                                    <table width="600">
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td align="right" width="40%">
                                            <asp:Label ID="Name" runat="server" Visible="false" Text='<%#Eval("Name") %>'></asp:Label>
                                            <asp:Label ID="lbValueID" runat="server" Visible="true" Text='<%#Eval("TxtName") %>'></asp:Label>：
                                        </td>
                                        <td align="left" runat="server" id="tdColumn">
                                        </td>
                                        <td>
                                            <input type="button" value="选择图片" onclick="MultiSelectPic(this)" class="button" id="btnSelectSrcDetail"
                                                runat="server" visible="false" />
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    </table>
                                </FooterTemplate>
                            </asp:Repeater>
                        </td>
                    </tr>
                </table>
            </div>
            <div style="padding-left: 20%; padding-top: 20px;">
                <asp:Button ID="btnEdit" runat="server" Text="更新" CssClass="button" OnClick="btnEdit_Click" />
            </div>
        </div>
        <input type="hidden" value="<%=ids%>" name="ids" />
        <input type="hidden" value="<%=numbers%>" name="number" />
        <input type="hidden" value="<%=edittype%>" name="edittype" />
        <input type="hidden" value="<%=nameFileds%>" name="filed" />
        <input type="hidden" value="<%=dataFileds%>" name="datafiled" />
    </form>

    <script language="javascript" type="text/javascript">
        function MultiSelectPic(obj){
            var newid = obj.id.replace("btnSelectSrcDetail","SrcDetail");
            OpenDialog(newid);
        }
    </script>

</body>
</html>
