<%@ Page Language="C#" AutoEventWireup="true" debug="true" Inherits="WinLibClass.Form.Admin.PointSettingLog.List"  CodePage="65001" PathLevel="1" PageFileFlag="PointSetting_List" PageFileTitle="购买/赠送点日志" DataBindingType="1" PageFlagId="1"%>

<%@ Register TagPrefix="Site" TagName="Menu" Src="../WUC/Site_Menu.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<Site:Menu id="menu_headtitle" runat="server" Flag="HeadTitle" CurrentPageTitle = "后台管理 - 购买/赠送点管理" />
<Site:Menu id="menu_headjs" runat="server" Flag="HeadJs" PathLevel="1" />
<Site:Menu id="menu_headcss" runat="server" Flag="HeadCss" PathLevel="1" />

<script type="text/javascript" charset="utf-8" src="/paipaijs/dialoguser.js"></script>
<script type="text/javascript" src="../js/PointSettingLog.js?t=2010"></script>


<script>

//增加
function Edit_Info(id,IsReserve)
{	
//访问类型,AJAX路径,数据JSON,弹出框ID,弹出框标题,等执行的函数名;
var _url="update.aspx?IsAdd=0&RuleType=<%=RuleType%>";
var _data = {"id":id};	
Common.EditFunction("POST",_url,_data,"<%=PageFileFlag%>","<%=PageFileTitle%>:编辑",  (IsReserve>0?"UpdateData":""));	
//将本行设置为选中颜色
SetActive(id);	
}

//删除
function Del_Info(id,isSave){
if(isSave==1){alert("系统保留项，禁止删除。");return false;}	
//弹出框ID,标题，内容，删除程序执行路径，参数表
var _url =  "Update.aspx?IsAdd=3&RuleType=<%=RuleType%>";
var _data ={"id":id};
var _msg = '<div class="FS14  LH30 FWB BdBoutset ">请注意：删除将会从会员帐户中扣除相关的点和积分的额度!</div>';
Common.ConfirmDelete2 ("POST",_url,_data,"<%=PageFileFlag%>","删除确认",_msg);
SetActive(id);		
}
//17:31 2011-11-24 以后不再用了，暂留存
function PayToUserOrderForm(id){
		
	if(confirm("该操作不可逆，您确定要提交吗？")==false)
	{
		return false;
	}	
	
	$.ajax({async:false,
		type: "POST",
		url: "update.aspx?IsAdd=10",
		data:{"id":id},
		cache: false,
		success: function(msg){
						if(msg>0){ //先保留msg这个值以备以后使用
							Alert('处理成功完成!',1,function(){Common.Refresh();});//Common.Refresh();
			
						}else{
							msg = "处理操作失败,请检查各项输入是否正确或网络连接状态.代码("+ msg +")";
							AlertErr(msg ,1 );
						}			
		}
	});
	return false;

}

</script>



</head>
<body>

<Site:Menu id="menu_topmenu" runat="server" Flag="TopMenu"  />
<div class1="wrap" id="wrap">
	<Site:Menu id="Wuc_LeftMenu" runat="server" Flag="LeftMenu" PageFileFlag="Menu_A_300_306" PathLevel="1" />	
	<div class1="mainbox" class="MainBox W1100 ">

		<div class="PGTitle LH30 ">
			<div class="W200 FL MGL10 FWB FS12"><%=PageFileTitle%></div>
			<div class="ChileMenu1 FL FS12">

			</div>
			<div class="Clear"></div>
		</div>

		<div class="ContBox MGT10 " >

<table class="Table FS12 ">


<tr style="height:30px;	font-weight: bold;">
<TH style="width:30px">序号</TH>
<TH style="width:150px">会员</TH>

<TH style="width:150px"><%=WinLibClass.Config.Global.WebSiteConfig.PointName_1%> / 购点金额</TH>
<TH style="width:80px"><%=WinLibClass.Config.Global.WebSiteConfig.PointName_2%></TH>
<TH style="width:80px"><%=WinLibClass.Config.Global.WebSiteConfig.PointName_3%></TH>
<TH style="width:150px">积分 / 购积分金额</TH>
<TH style="width:120px">信息产生类型</TH>
<TH >赠送/返还状态</TH>
<TH style="width:80px">操作</TH>
</tr>

<asp:Repeater id="rpList" runat="server">
<ItemTemplate>

<tr id="tr_<%#Eval("id")%>">
		<td><%#Eval("id")%></TD>
		<td><%# GetUserNickName(Eval("UserId"))%></td>
		<TD ><%# (Eval("Point1"))%> / <%# WinLibClass.Common.Utils.StrToInt( Eval("PointPrice").ToString(),0)/100f %></td>
		<TD ><%# (Eval("Point2"))%></td>
		<TD ><%# (Eval("Point3"))%></td>
		<TD ><%# (Eval("Credits"))%> / <%# WinLibClass.Common.Utils.StrToInt( Eval("CreditsPrice").ToString(),0)/100f %> </td>
		<td >
		<%#Eval("IsReserve").Equals(1)?"<font color='green'>后台手工赠送/返还</font>":"<font color='red'>系统生成</font>"%>
		</td>		
		<td >
		<%#Eval("IsChecked").Equals(1)?"<font color='green'>已处理</font>":"<font color='red'>未处理 <a href='#' onclick='PayToUserOrderForm("+Eval("id")+")' style='font-weight:bold;'>处理</a></font>"%>
		</td>
		<td>
			<a onclick="Edit_Info(<%#Eval("id")%>,<%#Eval("IsReserve")%>);" >编辑</a>
			<a onclick="Del_Info(<%#Eval("id")%>);" >删除</a>
		</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
		</div>
		<div class="ContBox" >
		<div class="page" style="margin-left:-13px;"><%=strPageInfo%>  -  <a onclick="Edit_Info(0,1);return false;"  class="A_Add">添加</a> 
			</div>
		</div>
	</div>
</div>


<div class="clear"></div>
<Site:Menu id="menu_foot" runat="server" Flag="Foot"   />
</body>
</html>

