<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_OrderList.aspx.cs" Inherits="TW.UI.Admin.Admin_OrderList" %>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../js/public.js"></script>
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/artDialog/artDialog.js?skin=default"></script>
<script type="text/javascript" src="../js/artDialog/plugins/iframeTools.js"></script>

</head>
<body>
<form id="form1" runat="server">
<div class="nav"><h1>订单列表</h1></div>

<div class="cont">
    <div class="opera">
        <table class="seletable">
            <tr>
                <td>
                    <img src="images/fdj.gif" class="fdj" />
                </td>
                <td>
                    商品标题：<asp:TextBox ID="txtTitleKey" runat="server"></asp:TextBox>
                    购买会员：<asp:TextBox ID="txtBuyUserKey" runat="server"></asp:TextBox>
                    订单号：<asp:TextBox ID="txtOrderNumberKey" runat="server"></asp:TextBox>
                    状态：<asp:DropDownList ID="ddlStatus" runat="server"></asp:DropDownList>
                    客服：<asp:DropDownList ID="ddlCustomServerId" runat="server"></asp:DropDownList>
                    <asp:Button ID="btnSearch" runat="server" Text="搜索" CssClass="btn1" onclick="btnSearch_Click" />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    <asp:Button ID="Button7" runat="server" Text="删除?" 
                        OnClientClick="return (CheckLen()&&confirm('确定删除?'));" CssClass="btn1 btn111" 
                        onclick="btnDel_Click" />
                </td>
            </tr>

        </table>
    </div>

<table class="table1">
<tr>
    <td width="5%"><input id="chkall" onclick="CheckAll('chkBox')" type="checkbox" title="全选/全不选"/></td>
    <td>订单号</td>
    <td>商品</td>
    <td>面值</td>
    <td>单价(元)</td>
    <td>数量</td>
    <td>手续费(元)</td>
    <td>总金额(元)</td>
    <td>充值类型</td>
    <td>收货人信息</td>
    <td>状态</td>
    <td>发货时间</td>
    <td>购买会员</td>
    <td>客服</td>
    <td>下单时间</td>
    <td>操作</td>
</tr>
    <asp:Repeater ID="Repeater1" runat="server" 
        onitemcommand="Repeater1_ItemCommand" onitemdatabound="Repeater1_ItemDataBound">
    <ItemTemplate>
        <asp:HiddenField ID="hidItemId" Value='<%#Eval("OrderNumber") %>' runat="server" />
<tr>
    <td><asp:CheckBox ID="chkBox" runat="server" /></td>
    <td><%#Eval("OrderNumber")%></td>
    <td><%#Eval("GoodsTitle")%></td>
    <td><%#Eval("ParValue")%></td>
    <td><%#Eval("Price")%></td>
    <td><%#Eval("Num")%></td>
    <td><%#Eval("Fee")%></td>
    <td><%#Convert.ToDecimal(Eval("Amount")) + Convert.ToDecimal(Eval("Fee"))%></td>
    <td><%#GetGoodsRecharType(Eval("RecharType"))%></td>
    <td><asp:Literal ID="litGetPerInfo" runat="server"></asp:Literal></td>
    <td><%#GetOrderStatus(Eval("Status"))%></td>
    <td><%#Convert.ToDateTime(Eval("SendTime")) > DateTime.Parse("1900-9-9") ? Convert.ToDateTime(Eval("SendTime")).ToString("yyyy-MM-dd HH:mm") : ""%></td>
    <td><%#GetUserName(Eval("UserId"))%></td>
    <td><%#GetUserName(Eval("CustomServerId"))%></td>
    <td><%#Convert.ToDateTime(Eval("AddTime")).ToString("yyyy-MM-dd HH:mm")%></td>
    <td>            
        <asp:LinkButton ID="btnDel" runat="server" CommandName="del" OnClientClick="return confirm('确定删除?')">删除?</asp:LinkButton>
        <a href="Admin_Order.aspx?ord=<%#Eval("OrderNumber") %>">发货</a>  
    </td>
</tr>
    </ItemTemplate>
    </asp:Repeater>
</table>
<TW:Pager ID="Pager1" runat="server" CssClass="page" 
        onchangepageclick="Pager1_ChangePageClick" />
</div>

</form>

<script type="text/javascript">
    var oTab = $('.table1')[0];
    var oldBgColor = '';
    var i = 0;
    for (i = 0; i < oTab.tBodies[0].rows.length; i++) {
        oTab.tBodies[0].rows[i].style.background = i % 2 ? '#ffffff' : 'url(images/line2.png) repeat-x';
        oTab.tBodies[0].rows[i].onmouseover = function () {
            oldBgColor = this.style.background;
            this.style.background = '#ffffd4 url(images/line.png) repeat-x';
        };
        oTab.tBodies[0].rows[i].onmouseout = function () {
            this.style.background = oldBgColor;
        };
    }
</script>
</body>
</html>
