<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StuPayment.aspx.cs" Inherits="MTCUN.Register.StuPayment"
    Title="账户管理-客服" %>

<%@ Import Namespace="MTCUN" %>
<%@ Register src="../UserCol/ReportServer.ascx" tagname="ReportServer" tagprefix="uc1" %>
<!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 type="text/javascript">
        function StudentBox() {
            window.showModelessDialog('../Tools/StudentBox.aspx', window, 'dialogWidth=750px;dialogHeight=500px');
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <uc1:ReportServer ID="ReportServer1" runat="server" />
        <div class="divpanel" runat="server" id="divSellInfo" visible="false">
            <table class="table" cellspacing="0">
                <tr>
                    <th>订单提示
                    </th>
                </tr>
                <tr>
                    <td>本次需支付：<asp:Label ID="labPayed" runat="server" ForeColor="#000099"></asp:Label>
                        元&nbsp;&nbsp; <span runat="server" id="spanMissing" visible="false">帐户缺少：<asp:Label
                            ID="labMissing" runat="server" ForeColor="Red"></asp:Label>
                            元</span>
                    </td>
                </tr>
            </table>
        </div>
        <div class="divpanel">
            <table class="table" cellspacing="0">
                <tr>
                    <th colspan="3">&nbsp; 学员账户管理
                    </th>
                </tr>
                <tr>
                    <td>学号：
                    </td>
                    <td>
                        <asp:Label ID="labStudentID" runat="server"></asp:Label>
                    </td>
                    <td rowspan="7" style="width: 350px">
                        <asp:FormView ID="fvStudent" runat="server" Width="100%">
                            <ItemTemplate>
                                <table class="smallgridview" cellspacing="0">
                                    <thead>
                                        <tr>
                                            <th colspan="3" style="text-align: center">账户信息
                                            </th>
                                        </tr>
                                    </thead>
                                    <tr>
                                        <td style="width: 30%">学号：
                                        </td>
                                        <td>
                                            <%#Eval("StudentID")%>
                                        </td>
                                        <td rowspan="2"></td>
                                    </tr>
                                    <tr>
                                        <td>姓名：
                                        </td>
                                        <td>
                                            <%#Eval("StudentName")%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>可用余额：
                                        </td>
                                        <td colspan="2">
                                            <span style="color: Red">
                                                <%#Eval("AvailableMoney", "{0:c2}")%></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>消费总额：
                                        </td>
                                        <td colspan="2">
                                            <%#Eval("ConsumedMoney","{0:c2}")%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>借款金额：
                                        </td>
                                        <td colspan="2">
                                            <%#Eval("CreditMoney", "{0:c2}")%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>积分：
                                        </td>
                                        <td colspan="2">
                                            <%#Eval("Points")%>分
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:FormView>
                    </td>
                </tr>
                <tr>
                    <td>姓名：
                    </td>
                    <td>
                        <asp:Label ID="labStudentName" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>交费类型：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlPaymentType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlPaymentType_SelectedIndexChanged">
                            <asp:ListItem Value="1">交费</asp:ListItem>
                            <asp:ListItem Value="2">退费</asp:ListItem>
                            <asp:ListItem Value="3">借款</asp:ListItem>
                            <asp:ListItem Value="4">扣除借款</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>收款方式：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlPayMethod" DataTextField="PayMethodName" DataValueField="PayMethodName" runat="server">
                            <%--                        <asp:ListItem Value="">--</asp:ListItem>
                        <asp:ListItem Value="现金">现金</asp:ListItem>
                        <asp:ListItem Value="刷卡">刷卡</asp:ListItem>
                        <asp:ListItem Value="转账">转账</asp:ListItem>
                        <asp:ListItem Value="支票">支票</asp:ListItem>
                        <asp:ListItem Value="网银">网银</asp:ListItem>
                        <asp:ListItem Value="支付宝">支付宝</asp:ListItem>
                        <asp:ListItem Value="其它">其它</asp:ListItem>--%>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>金额：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxPayMoney" runat="server" Width="58px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>日期：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxDateAndTime" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>备注：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxRemark" runat="server" Width="209px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="trCredit" visible="false">
                    <td>借款到期：
                    </td>
                    <td colspan="2">
                        <asp:TextBox ID="tbxCreditExpiration" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>交费点：
                    </td>
                    <td colspan="2">
                        <asp:DropDownList ID="ddlPostSchool" runat="server" DataTextField="SchoolName" DataValueField="SchoolID">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>收费文员：
                    </td>
                    <td colspan="2">
                        <asp:DropDownList ID="ddlUser" runat="server" DataTextField="TrueName" DataValueField="UserID">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>短信通知：
                    </td>
                    <td colspan="2">
                        <asp:CheckBox ID="cbxSMS" runat="server" Checked="True" />
                    </td>
                </tr>
                <tr>
                    <td>&nbsp;
                    </td>
                    <td colspan="2">
                        <label class="lab_button">
                            <asp:Button ID="btnPost" runat="server" Text="确定" OnClick="btnPost_Click" />
                        </label>
                    </td>
                </tr>
            </table>
        </div>
        <div class="divpanel">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="gridview"
                OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting"
                OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" DataKeyNames="PaymentID"
                OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand">
                <Columns>
                    <asp:BoundField DataField="PaymentID" HeaderText="编号" ReadOnly="true" />
                    <asp:TemplateField HeaderText="类型">
                        <ItemTemplate>
                            <asp:Label ID="labPaymentType" runat="server" Text='<%#Eval("PaymentTypeName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="金额">
                        <EditItemTemplate>
                            <asp:TextBox ID="tbxPayMoney" runat="server" Text='<%# Bind("PayMoney") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="labPayMoney" runat="server" Text='<%# Bind("PayMoney", "{0:c2}") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="收款方式">
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddlPayMethod" runat="server" DataTextField="PayMethodName" DataValueField="PayMethodName">
                                <%--                            <asp:ListItem Value="">--</asp:ListItem>
                            <asp:ListItem Value="现金">现金</asp:ListItem>
                            <asp:ListItem Value="刷卡">刷卡</asp:ListItem>
                            <asp:ListItem Value="转账">转账</asp:ListItem>
                            <asp:ListItem Value="支票">支票</asp:ListItem>
                            <asp:ListItem Value="网银">网银</asp:ListItem>
                            <asp:ListItem Value="支付宝">支付宝</asp:ListItem>
                            <asp:ListItem Value="其它">其它</asp:ListItem>--%>
                            </asp:DropDownList>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="labPayMethod" runat="server" Text='<%# Bind("PayMethod") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="日期">
                        <EditItemTemplate>
                            <asp:TextBox ID="tbxDateAndTime" runat="server" Text='<%# Bind("DateAndTime") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="labDateAndTime" runat="server" Text='<%# Bind("DateAndTime") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="备注">
                        <EditItemTemplate>
                            <asp:TextBox ID="tbxRemark" runat="server" Text='<%# Bind("Remark") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="labRemark" runat="server" Text='<%# Bind("Remark") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="借款到期">
                        <EditItemTemplate>
                            <asp:TextBox ID="tbxCreditExpiration" runat="server" Text='<%# Bind("CreditExpiration") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="labCreditExpiration" runat="server" Text='<%# Bind("CreditExpiration") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="办理点">
                        <ItemTemplate>
                            <asp:Label ID="labPostSchoolName" runat="server" Text='<%# Bind("PostSchoolName") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddlPostSchool" runat="server" DataTextField="SchoolName" DataValueField="SchoolID">
                            </asp:DropDownList>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="收费文员">
                        <ItemTemplate>
                            <asp:Label ID="labTrueName" runat="server" Text='<%# Bind("TrueName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <%--                    <asp:TemplateField HeaderText="已打">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbnPrint" runat="server" CommandName="Print" CommandArgument='<%#Eval("PaymentID") %>'
                                Text='<%# (int)Eval("PrintCount") > 0 ? "已" : "未" %>' Font-Size="9pt"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>--%>
                    <asp:TemplateField HeaderText="打印">
                        <ItemTemplate>
                            <div class=" lab_button_sub">
                                <asp:HyperLink ID="hlkPrint" runat="server" NavigateUrl='<%#string.Format("javascript:Print({0});void(0);",Eval("PaymentID")) %>'><div class="inline_block">打印</div>
                                <div class="inline_block orgnum"><%#Eval("PrintCount") %></div></asp:HyperLink>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="编辑">
                        <ItemTemplate>
                            <div class="lab_button_sub" id="divEdit" runat="server">
                                <asp:LinkButton ID="lbnEdit" runat="server" Text="编辑" CommandName="Edit"></asp:LinkButton>
                            </div>
                        </ItemTemplate>
                        <EditItemTemplate>

                            <div class="lab_button_sub">
                                <asp:LinkButton ID="lbnUpdate" runat="server" Text="更新" CommandName="Update"></asp:LinkButton>
                            </div>
                            <div class="lab_button_sub">
                                <asp:LinkButton ID="lbnCancel" runat="server" Text="取消" CommandName="Cancel"></asp:LinkButton>
                            </div>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="删除">
                        <ItemTemplate>
                            <div class="lab_button_sub" id="divDelete" runat="server">
                                <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="Delete" OnClientClick="<%# Rs.Messages.确定删除%>"></asp:LinkButton>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
        <div class="divpanel">
            <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
        </div>

        <div class="backpanel">
            <label class="lab_button" id="__mt_labBack" runat="server">
                <input id="Button1" causesvalidation="false" type="button" runat="server" onclick="back(this)"
                    value="返回" />
            </label>
        </div>
        <div class="divremark">
            <b>注意事项：</b><br />
            1、退费、扣除借款请使用负数。<br />
            2、如果您发现充值信息无法编辑或删除，请到财务模块：学员控制面板-账户信息-编辑或删除，因为交费信息的管理工作由财务负责。<br />
        </div>
    </form>
</body>
</html>
