<%@ Page Language="c#" CodeBehind="StuBill.aspx.cs" AutoEventWireup="True" Inherits="MTCUN.Affairs.StuBill"
    Title="消费列表-教务" %>

<%@ Register Src="../UserCol/Progress.ascx" TagName="Progress" TagPrefix="uc2" %>
<%@ Import Namespace="MTCUN" %>
<!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" />
    <script src="../Jscript/CreateSubMenu.js" type="text/javascript"></script>
</head>
<body>
    <script type="text/javascript">
        var IsPrint = false;
    </script>
    <div class="printWeb">
        <iframe id="PrintWeb" width="0" height="0"></iframe>
    </div>
    <form id="Form1" runat="server">
        <div class="divpanel">
            <asp:GridView ID="GridView1" runat="server" CssClass="gridview" AutoGenerateColumns="False"
                DataKeyNames="BillID" OnRowEditing="GridView1_RowEditing" OnRowDataBound="GridView1_RowDataBound"
                OnSelectedIndexChanging="GridView1_SelectedIndexChanging">
                <SelectedRowStyle CssClass="selected" />
                <Columns>
                    <asp:TemplateField InsertVisible="False" HeaderText="单号" SortExpression="BillID">
                        <ItemTemplate>
                            <asp:ImageButton ID="ibnSelect" CommandName="Select" ImageUrl='<%# accTheme("node_close.gif") %>'
                                runat="server" />
                            <asp:LinkButton ID="lbnSelect" runat="server" Text='<%# Eval("BillID") %>' CommandName="Select" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="日期">
                        <ItemTemplate>
                            <asp:Label ID="labDateAndTime" runat="server" Text='<%#Eval("DateAndTime")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="类型">
                        <ItemTemplate>
                            <asp:Label ID="labBillTypeID" runat="server" Text='<%#(int)Eval("BillTypeID") == 1 ? "购买" : "退货"%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="应交金额">
                        <ItemTemplate>
                            <asp:Label ID="labPay" runat="server" Text='<%# Eval("Pay","{0:c2}") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="优惠">
                        <ItemTemplate>
                            <asp:Label ID="labFavourable" runat="server" Text='<%# Eval("Favourable","{0:c2}") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="实收金额">
                        <ItemTemplate>
                            <asp:Label ID="labPayed" runat="server" Text='<%# Eval("Payed","{0:c2}") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="备注">
                        <ItemTemplate>
                            <asp:Literal runat="server" ID="litRemark" Text='<%# Eval("Remark") %>' Mode="Encode"></asp:Literal>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="PostSchoolName" HeaderText="交费点" ReadOnly="true" />
                    <asp:TemplateField HeaderText="录入员">
                        <ItemTemplate>
                            <%#Eval("TrueName")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
        <div class="backpanel">
            <label class="lab_button" id="__mt_labBack" runat="server">
<input id="Button1" causesvalidation="false" runat="server" type="button" onclick="back(this)" value="返回" />
</label>
        </div>
    </div>
    <div id="divItems" style="visibility: hidden">
        <div style="width: 50%">
            <asp:GridView ID="gvItems" runat="server" AutoGenerateColumns="false" CssClass="smallgridview">
                <Columns>
                    <asp:BoundField DataField="ProductID" HeaderText="编号" ReadOnly="True" />
                    <asp:BoundField DataField="ProductName" HeaderText="项目" ReadOnly="True" />
                    <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='<%# Eval("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:Label ID="labStoreroomName" runat="server" Text='<%# Bind("StoreroomName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </form>
    <div class="divremark">
        <b>注意事项：</b><br />
        1、如果您想寻找“增加消费单”按钮，请到客服模块：学员控制面板-消费单-增加消费单，因为消费录入工作由客服负责。<br />
        2、如果您想编辑或删除消费单，请到财务模块：学员控制面板-消费单-编辑或删除，因为消费信息的管理工作由财务负责。<br />
    </div>
</body>
</html>
