<%@ Page Language="c#" CodeBehind="StuProduct.aspx.cs" AutoEventWireup="True" Inherits="SWTraining.Affairs.StuProduct"
    Title="教务管理-查看学员已购产品" %>

<%@ Import Namespace="SWTraining" %>
<%@ Register Src="../UserCol/Progress.ascx" TagName="Progress" TagPrefix="uc2" %>
<%@ Import Namespace="SWTraining" %>
<!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 runat="server">
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />
</head>
<body>
    <form id="Form1" runat="server">
    <div class="divpanel">
        <asp:GridView ID="GridView1" runat="server" CssClass="gridview" AutoGenerateColumns="False"
            DataKeyNames="BillItemID" OnRowDataBound="GridView1_RowDataBound" OnRowEditing="GridView1_RowEditing"
            OnRowUpdating="GridView1_RowUpdating" onrowcommand="GridView1_RowCommand">
            <SelectedRowStyle CssClass="selected" />
            <Columns>
                <asp:TemplateField HeaderText="项目">
                    <ItemTemplate>
                        <asp:Label ID="labProductName" runat="server" Text='<%# Bind("ProductName") %>'></asp:Label>
                        <asp:LinkButton ID="lbnEdit" runat="server" CommandName="edit" Text='<%# "(" + Rs.Items.GetStuClassType(Eval("ContinueReg")) + ")" %>'></asp:LinkButton>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:Label ID="labProductName" runat="server" Text='<%# Bind("ProductName") %>'></asp:Label>
                        <asp:DropDownList ID="ddlContinueReg" runat="server">
                            <asp:ListItem Value="0">试听</asp:ListItem>
                            <asp:ListItem Value="1" Selected="True">新增</asp:ListItem>
                            <asp:ListItem Value="2">续报</asp:ListItem>
                        </asp:DropDownList>
                        <asp:LinkButton ID="lbnSave" runat="server" CommandName="update">保存</asp:LinkButton>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="日期">
                    <ItemTemplate>
                        <asp:Label ID="labDateAndTime" runat="server" Text='<%# Bind("DateAndTime") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="单号">
                    <ItemTemplate>
                        <asp:Label ID="labBillID" runat="server" Text='<%# Bind("BillID") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="单价">
                    <ItemTemplate>
                        <asp:Label ID="labUnitPrice" runat="server" Text='<%# Bind("UnitPrice","{0:c2}") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="数量">
                    <ItemTemplate>
                        <asp:Label ID="labAmount" runat="server" Text='<%# Bind("Amount") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="单位">
                    <ItemTemplate>
                        <asp:Label ID="labUnitName" runat="server" Text='<%# Bind("UnitName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="优惠">
                    <ItemTemplate>
                        <asp:Label ID="labFavorable" runat="server" Text='<%# Eval("Favorable","{0:c2}") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="合计">
                    <ItemTemplate>
                        <asp:Label ID="labTotalPrice" runat="server" Text='<%# Bind("TotalPrice","{0:c2}") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="状态">
                    <ItemTemplate>
                        <asp:HyperLink runat="server" ID="hlkState"></asp:HyperLink>
                        <asp:LinkButton ID="lbnState" runat="server" CommandName="ChangeState" CommandArgument='<%#Eval("BillItemID") %>'></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div class="backpanel">
        <label class="lab_buttom">
<input id="Button1" causesvalidation="false" type="button" runat="server" onclick="back()"
            value="返回" />
</label>
    </div>
    </form>
</body>
</html>
