<%@Page Language="C#" Inherits="IWMS.Admin.ChargeMan" MasterPageFile="admin.master"%>
<asp:Content ContentPlaceHolderId="cphHead" runat="server">
	<script type="text/javascript">
	<!--
	var ajPosting = false;
	function ajClear(ele){
		if(ajPosting){
			return;
		}
		ajPosting=true;
		$.post('admin_charge.aspx',{act:'ajax',cmd:'clear'},function(r){
			iwms.popMsg('clear',ele,"成功清理 "+r.num+" 个未付款记录！");
			iwms.hideMsg('clear',3000);
			ajPosting=false;
		},'json');
	}
	-->
	</script>
</asp:Content>
<asp:Content ContentPlaceHolderId="cphMain" runat="server">
	
	<div class="mframe">
	<div class="tl"></div>
	<div class="rt"></div>
	<div class="tm">
		<table width="98%" cellpadding="0" cellspacing="0">
			<tr><td>
				<span class="tt">管理充值</span>
				&nbsp; <asp:Literal id="dropGroup" runat="server"/>
			</td><td align="right">
				<form action="" method="get">
				<input type="text" size="15" name="keyword"/>
				<select name="where" >
					<option value="name">会员名</option>
				</select>
				<input type="submit" value="搜索"/>
				<button type="button" onclick="ajClear(this)">清理1周前未完成充值</button>
				</form>
			</td></tr>
		</table>
	</div>
	<div class="wrapper">
	<div class="ml"></div>
	<div class="mr"></div>
	<div class="mm">
		<asp:Label id="myLabel" class="msgBar" EnableViewState="false" runat="server"/>
		<form id="myForm" runat="server">
		<ASP:DataGrid id="MyDataGrid" runat="server"
				Width="100%"
				align="center"
				ShowHeader="true"
				ShowFooter="false"
				AutoGenerateColumns="false"
				AllowPaging="false"
				HeaderStyle-CssClass="gridHead"
				ItemStyle-CssClass="tdbg"
				PageSize="15"
				CssClass="grid"
				BorderColor="#cccccc"
				CellPadding="6"
				CellSpacing="0" >
			<EditItemStyle CssClass="tdbg-dark" />
			
			<Columns>
				<asp:BoundColumn
					HeaderText="ID"
					DataField="id">
					<ItemStyle HorizontalAlign="center"/>
					<HeaderStyle Width="50"/>
				</asp:BoundColumn>
				<asp:TemplateColumn
					HeaderText="会员名">
					<ItemTemplate>
						<a href="admin_memberAdd.aspx?id=<%#Eval("memberid")%>"><%#Eval("name")%></a>
					</ItemTemplate>
					<ItemStyle HorizontalAlign="center" />
				</asp:TemplateColumn>
				<asp:BoundColumn
					HeaderText="充值金额"
					DataField="chargeSum"
					DataFormatString="{0:f2}元">
					<ItemStyle HorizontalAlign="center" />
					<HeaderStyle Width="120"/>
				</asp:BoundColumn>
				<asp:BoundColumn
					HeaderText="充值日期"
					DataField="chargeDate"
					DataFormatString="{0:yyyy-MM-dd HH:mm}">
					<ItemStyle HorizontalAlign="center" />
					<HeaderStyle Width="150"/>
				</asp:BoundColumn>
				<asp:TemplateColumn
					HeaderText="是否付款">
					<ItemTemplate>
						<%#(bool)Eval("received") ? "是" : "否"%>
					</ItemTemplate>
					<ItemStyle HorizontalAlign="center" />
					<HeaderStyle Width="70"/>
				</asp:TemplateColumn>
			</Columns>
		</ASP:DataGrid>	
		<asp:Literal id="pageList" runat="server"/>
			
		</form>
	
	</div>
	</div>
	<div class="bl"></div>
	<div class="br"></div>
	<div class="bm"></div>
	</div>
	
</asp:Content>