<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="member_detail.aspx.cs" Inherits="VA.Modules.JDingMember.member.member_detail" %>

<!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>
    <title></title>
    <!--#include virtual="/include/css/edit.aspx"-->
    <link href="/uicontrols/jtongui/themes/<% = webSiteConfig.ThemeName %>/tabs.css" type="text/css" rel="Stylesheet" />
    <!--#include virtual="/include/js/edit.aspx"-->     
    <script type="text/javascript" src="/uicontrols/jtongui/plugins/jtong.tabs.js"></script>
    <script type="text/javascript">

        var $div_BasicInfo = null;
        var $div_WalletChargeList = null;
        var $div_WalletWithdrawList = null;
        var $div_PointCardChargeList = null;
        var $div_PointCardList = null;
        var $div_ChargeItemList = null;
        var $div_ConsumeList = null;
        var $div_PointCardConsumeList = null;
        var $div_VoucherList = null;
        var $div_AccountBookList = null;
        var $div_PointBookList = null;

        //会员信息加载成功时调用的方法；            
        function doWhenMemberInfoLoadSuc(memberInfo) {            
            loadMemberDetailInfo(memberInfo.memberID);
        }

        //会员信息加载失败时调用的方法；
        function doWhenMemberInfoLoadFail() {
            $div_BasicInfo.html("");
            $div_WalletChargeList.html("");
            $div_WalletWithdrawList.html("");
            //$div_PointCardChargeList.html("");
            $div_PointCardList.html("");
            $div_ChargeItemList.html("");
            $div_ConsumeList.html("");
            //$div_PointCardConsumeList.html("");
            $div_VoucherList.html("");
            $div_AccountBookList.html("");
            $div_PointBookList.html("");
        }

        //加载会员详细信息；
        function loadMemberDetailInfo(memberID) {
            if (memberID != "") {                
                $div_BasicInfo.html("<iframe src='memberinfo/member_basicinfo.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
                $div_WalletChargeList.html("<iframe src='memberinfo/member_walletcharge_list.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
                $div_WalletWithdrawList.html("<iframe src='memberinfo/member_walletwithdraw_list.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
                //$div_PointCardChargeList.html("<iframe src='memberinfo/member_pointcardcharge_list.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
                //$div_PointCardList.html("<iframe src='memberinfo/member_pointcard_list.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
                $div_PointCardList.html("<iframe src='memberinfo/member_pointcard_nav.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
                $div_ChargeItemList.html("<iframe src='memberinfo/member_chargeitem_bedonated_nav.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
                $div_ConsumeList.html("<iframe src='memberinfo/member_consume_nav.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
                //$div_PointCardConsumeList.html("<iframe src='memberinfo/member_pointcard_consume_list.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
                $div_VoucherList.html("<iframe src='memberinfo/member_voucher_list.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
                $div_AccountBookList.html("<iframe src='memberinfo/member_accountbook_list.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
                $div_PointBookList.html("<iframe src='memberinfo/member_pointbook_list.aspx?memberid=" + memberID + "' style='width:100%;height:100%;border:0px;margin:0px;padding:0px;'  ></iframe>");
            }
        }

        function setLayout() {
            var windowHeight = $(window).outerHeight();
            var titleHeight = $(".centerFormTitle").outerHeight();
            var tbKeyEnterHeight = $("#tbKeyEnter").outerHeight();
            var tbMemberInfoHeight = $("#tbMemberInfo").outerHeight();
            var mainHeight = windowHeight - titleHeight - tbKeyEnterHeight - tbMemberInfoHeight - 27;
            
            $("#divMemberInfoContaienr").height(mainHeight);
        }

        //鼠标选中选项卡后触发该事件；
        function JTongTabs_tabHeadeMouseover($header, $content, index) {
           
        }        
    </script>

</head>
<body>
<form id="Form1" method="post" runat="server">

<div class="editPageWrapper" style="width:750px;">

<div class="centerFormTitle">
   <h1>会员详情</h1>
</div>

<!--#include file="../include/memberinfo.aspx"--> 

<div id="divMemberInfoContaienr" style="margin-top:-1px;">
<div class="jtongui-tabs" fill="true">
	<ul class="header">
		<li class="tabheader-item-selected"><a>基本信息</a></li>        
		<li>充值记录</li>		        
        <li>提现记录</li>		        
<%--		<li>计次卡购买记录</li>	--%>			
        <li>充次记录</li>		
        <li>受赠项目</li>		
        <li>消费记录</li>				
   <%--     <li>计次卡划次记录</li>	--%>			
        <li>代金券</li>				
        <li>账户流水</li>			
        <li>积分流水</li>			
	</ul>
	<div id="div_BasicInfo" class="tabcontent tabcontent-selected">
	    
	</div>
	<div id="div_WalletChargeList" class="tabcontent">
	    
	</div>
    <div id="div_WalletWithdrawList" class="tabcontent">
	    
	</div>
<%--	<div id="div_PointCardChargeList" class="tabcontent">
	    
	</div>--%>
    <div id="div_PointCardList" class="tabcontent">
	    
	</div>
    <div id="div_ChargeItemList" class="tabcontent">
	    
	</div>
    <div id="div_ConsumeList" class="tabcontent">
	    
	</div> 
  <%--  <div id="div_PointCardConsumeList" class="tabcontent">
	    
	</div>    --%>
    <div id="div_VoucherList" class="tabcontent">
	    
	</div> 
    <div id="div_AccountBookList" class="tabcontent">
	    
	</div>
    <div id="div_PointBookList" class="tabcontent">
	    
	</div>
</div>    
</div><!--divMemberInfoContaienr.END-->

</div><!--editPageWrapper.END-->


<script type="text/javascript">

    $(function () {
        setLayout();
        JTongTabs_init();

        $div_BasicInfo = $("#div_BasicInfo");
        $div_WalletChargeList = $("#div_WalletChargeList");
        $div_WalletWithdrawList = $("#div_WalletWithdrawList");
        //$div_PointCardChargeList = $("#div_PointCardChargeList");
        $div_PointCardList = $("#div_PointCardList");
        $div_ChargeItemList = $("#div_ChargeItemList");
        $div_ConsumeList = $("#div_ConsumeList");
        //$div_PointCardConsumeList = $("#div_PointCardConsumeList");
        $div_VoucherList = $("#div_VoucherList");
        $div_AccountBookList = $("#div_AccountBookList");
        $div_PointBookList = $("#div_PointBookList");

        //因为要包含服务端代码，所以这块代码不能放到页面的head部分。
        loadMemberDetailInfo('<% = Request.QueryString["memberid"] %>');
    });    
</script>
<%
    string canEdit = Request.QueryString["canedit"];
    if (!String.IsNullOrEmpty(canEdit) && canEdit == "0") 
    {
        Response.Write("<script text=\"text/javascript\">$('#txtKey').attr('disabled','disabled');$('#btnQueryMemberInfo').attr('disabled','disabled');$('#btnBrowseMembers').attr('disabled','disabled');</script>");
    }
%>

</form>
</body>
</html>

