<%
    //-----------------------------------------------------------
    // 文件名称: Order_Order_Add_User.aspx
    // 页面名称: 订单添加(会员选择)
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-07-15
    //-----------------------------------------------------------
%>

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

<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>

<!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 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">
//重置按钮按下时
function iptReset_onclick() {
    getobj('tdList').innerHTML = "&nbsp;";
}

//查询会回弹
function SearchBack(strResponse) {
    getobj('tdList').innerHTML = strResponse;
}
//查询会员信息
function btnSearch_onclick()
{
    var uid = getobj('txtUser');
    var ids = getobj('CheckedIDS');

    if(uid==null || ids==null)
    {
        alert("你的浏览器，不支持该功能！");
    }
    else
    {
        var url = "Order_Order_Add_User.aspx";
        var PostData = "_OP=btnSearch"
                + "&_User=" + uid.value + " ";
        AjaxSubmit(url, PostData, SearchBack);
        getobj('tdList').innerHTML = "<div>查询中...</div>";
    }
}
//[匿名用户|注册用户]选择
//value:0 匿名用户
//value:1 注册用户
function optSelect(value)
{
    if(value == 0)
    {
        getobj('txtGuest').disabled = false;
        getobj('txtUser').disabled = true;
        getobj('btnSearch').disabled = true;
        getobj('CheckedIDS').value = "";
    }
    else
    {
        getobj('txtUser').disabled = false;
        getobj('btnSearch').disabled = false;
        getobj('txtGuest').disabled = true;
    }
    getobj('tdList').innerHTML = "&nbsp;";
}
//用户名被选择
//id        用户ID
//name      用户名
//truename  真实姓名
function rdoUid_onSelected(id, name, truename)
{
    getobj('rdoUid_' + id).checked = true;
    getobj('CheckedIDS').value = name;
}
    </script>

    <style type="text/css">
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <input type="hidden" id="_OP" name="_OP" value="Main"/>
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="【订单添加 (会员选择)】" /></div>
        </div>
        <div style="text-align:center;">
            <asp:Panel runat="server" ID="PanelShow" Width="100%">
                <div>
                    <table id="OperateTable" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                            <td style="width:20%;height:30px;text-align:right">
                                <asp:RadioButton ID="rboGuest" runat="server" Text="匿名用户" GroupName="IsUser" 
                                    onclick="return optSelect(0);" CssClass="input3" Checked="True" />&nbsp;
                          </td>
                            <td style="width:80%;text-align:left">
                          <asp:TextBox ID="txtGuest" runat="server" MaxLength="50"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td style="width:20%;height:30px;text-align:right">
                          <asp:RadioButton ID="rboUser" runat="server" Text="注册用户" GroupName="IsUser" onclick="return optSelect(1);" 
                            CssClass="input3" />&nbsp;</td>
                            <td style="width:80%;text-align:left">
                          <asp:TextBox ID="txtUser" runat="server" MaxLength="50"></asp:TextBox><input id="btnSearch" class="button" name="btnSearch" type="button" value="查询" onclick="return btnSearch_onclick()" /></td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td id="tdList">&nbsp;</td>
                        </tr>
                        <tr>
                            <td align="center" style="text-align: center;" colspan="2">
                                <br />
                                <asp:Button ID="btnNext" runat="server" meta:resourcekey="btnAddResource1" OnClick="btnNext_Click" Text="下一步" CssClass="button" />
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <input id="iptReset" type="reset" value="重置" class="button" onclick="return iptReset_onclick()" />
                                <br />
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:Panel>
            <uc2:PageBottom ID="PageBottom1" runat="server" />
        </div>
        <div id="hiddenfield">
            <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
            <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
            <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
            <uc1:HiddenField ID="Alert" runat="server" />
        </div>
    </form>  
	<script type="text/javascript">
    //加TABLE样式
    InitTrClass();
	</script>
</body>
</html>
