<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PointsExchange.aspx.cs"
    Inherits="SWTraining.Student.PointsExchange" Title="积分兑换" %>

<!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 id="Head1" runat="server">
    <title></title>
    <link id="linkStyle" runat="server" href="../Themes/Orange/css.css" rel="stylesheet"
        type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="divpanel" runat="server">
        <table class="table" cellspacing="0">
            <tr>
                <th>
                    提示信息
                </th>
            </tr>
            <tr>
                <td>
                    学员：<asp:Label ID="labStudentName" runat="server"></asp:Label>
                    &nbsp;拥有积分：<asp:Label ID="labPoints" runat="server" ForeColor="Red"></asp:Label>
                    </span>
                </td>
            </tr>
        </table>
    </div>
    <div class="divpanel">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" CssClass="gridview"
            DataKeyNames="PointsExchangeID" OnRowDataBound="GridView1_RowDataBound">
            <Columns>
                <asp:BoundField DataField="CommodityID" HeaderText="编号" ReadOnly="True" />
                <asp:BoundField DataField="CommodityName" HeaderText="商品" ReadOnly="True" />
                <asp:TemplateField HeaderText="积分">
                    <ItemTemplate>
                        <asp:Label ID="labPoints" runat="server" Text='<%# Bind("Points") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="数量">
                    <ItemTemplate>
                        <asp:Label ID="labAmount" runat="server" Text='<%# Bind("Amount") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="tbxAmount" runat="server" Width="40px" Text='<%# Bind("Amount") %>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="合计(积分)">
                    <ItemTemplate>
                        <asp:Label ID="labTotalPoints" runat="server" Text='<%# (int)Eval("Points") * (int)Eval("Amount") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="仓库">
                    <ItemTemplate>
                        <asp:Label ID="labStoreroomName" runat="server" Text='<%# Bind("StoreroomName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="DateAndTime" HeaderText="日期" ReadOnly="True" />
                <asp:BoundField DataField="TrueName" HeaderText="经办人" ReadOnly="True" />
            </Columns>
        </asp:GridView>
    </div>
    <div class="divpanel">
        <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
    </div>
    </form>
</body>
</html>
