<%
    //-----------------------------------------------------------
    // 文件名称: Order_Order_Add_GreetingCard.aspx
    // 页面名称: 订单编辑 (贺卡选择)
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-07-21
    //-----------------------------------------------------------
%>
<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Order_Order_Add_GreetingCard, V5Shop.Shop.Order" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="V5" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="hdMain" runat="server">
    <title></title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar-system.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript" src="js/Common.js"></script>
    <script type="text/javascript" language="javascript">
    //<!--
    function RadioBoxID_OnSelect(id, obj, col)
    {
        try
        {
            //剥离<TBODY>标签
            var DataGridView = childs(document.getElementById(id).childNodes)[0];
            
            document.getElementById('CheckedIDS').value = "";

            //从1开始，直接排除掉表头
            for(var i=1; i < childs(DataGridView.childNodes).length; i++)
            {
                //剥离<TR>标签
                var objTR = childs(DataGridView.childNodes)[i];
                
                //剥离<TD>标签
                var objCol = childs(objTR.childNodes)[col];
                
                //剥离<INPUT>标签
                var radiobox = childs(objCol.childNodes)[0];

                if(radiobox != obj) radiobox.checked = false;
            }
            document.getElementById('CheckedIDS').value = obj.value;
        }
        catch(e)
        {
        }
    }
    //-->
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <!-- 图片显示用 -->
        <div id='dhtmltooltip'><img src="" alt=""/></div>
        <script language="javascript" type="text/javascript" src="js/showimg.js"></script>
        <div>
            <div class="OperateTitle">
                <div>
                    <asp:Label ID="lblAdd" runat="server" Text="【订单添加 (贺卡选择)】" /></div>
            </div>
            <div id="content">
                <div class="listborder">
                    <V5:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="datalist" PageSize="5" HeaderStyle-ForeColor="#000000" EmptyDataText="没有任何可用信息！" CacheName="Delivery" OnRowDataBound="GridViewShow_RowDataBound">
                        <PagerSettings Mode="NumericFirstLast" />
                        <Columns>
                            <asp:TemplateField meta:resourcekey="DetilData">
                                <itemtemplate>
                            <input runat="server" value='<%# Eval("ID") %>' id="RadioBoxID" name="RadioBoxID" type="radio" class="checkbox"
                                onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" onclick="return RadioBoxID_OnSelect('GridViewShow', this, 0);" />
                            </itemtemplate>
                                <itemstyle horizontalalign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" ItemStyle-Width="5%" />
                            <asp:TemplateField HeaderText="图片预览" ItemStyle-Width="10%">
                                <headertemplate>图片预览 </headertemplate>
                                <itemtemplate>
                                    <img src="images/icon-viewpic.gif" onmouseover="javascript:ddrivetip('<img src=../<%# Eval("SrcList") %>>','#ffffff')" 
                                        onmouseout="hideddrivetip()" alt=""/>
                                </itemtemplate>
                                <itemstyle horizontalalign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="Name" HeaderText="贺卡名称" SortExpression="Name" ItemStyle-Width="20%" />
                            <asp:BoundField DataField="Price" HeaderText="费用" SortExpression="Price" ItemStyle-Width="10%" />
                            <asp:BoundField DataField="FreePrice" HeaderText="免费额度" SortExpression="FreePrice" ItemStyle-Width="10%" />
                            <asp:BoundField DataField="Description" HeaderText="贺卡描述" SortExpression="Description" ItemStyle-Width="40%" />
                        </Columns>
                        <HeaderStyle CssClass="category" ForeColor="Black" />
                    </V5:V5ShopGridView>
                </div>
                <div style="text-align: center; width: 100%; background-color: #EEEEEE;line-height:20px">
                    <table style="border:0px">
                        <tr>
                            <td style="text-align:right;"><asp:Label ID="lblContent" runat="server" Text="贺卡内容："/></td>
                            <td style="text-align:left;"><asp:TextBox ID="txtContent"  runat="server" TextMode="MultiLine" Width="450px" Height="120px" /></td>
                        </tr>
                    </table>
                </div>
                <div style="text-align: center;">
                    <asp:Button ID="btnPrevPage" runat="server" CssClass="button" Text="上一步" OnClick="btnPrevPage_Click" UseSubmitBehavior="False" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnNextPage" runat="server" CssClass="button" Text="下一步" OnClick="btnNextPage_Click" UseSubmitBehavior="False" />
                    &nbsp;&nbsp;
                    <input type="reset" class="button" value="重  置" />
                </div>
            </div>
            <uc2:PageBottom ID="PageBottom" runat="server" />
            <div id="hiddenfield">
                <asp:HiddenField ID="CheckedIDS" runat="server" Value="" />
                <asp:HiddenField ID="AlertInfo" runat="server" Value="请先选择一个包装！" />
                <uc1:HiddenField ID="Alert" runat="server" />
            </div>
        </div>
    </form>
</body>
</html>
