<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StuPayment.aspx.cs" Inherits="MTCUN.Mobile.Register.StuPayment"
    Title="学员钱包-客服" %>

<%@ Import Namespace="MTCUN" %>
<%@ Register Src="../../UserCol/Remark.ascx" TagName="Remark" TagPrefix="uc2" %>
<%@ Register Src="../User_Col/col_StuControlPanel.ascx" TagName="col_StuControlPanel" TagPrefix="uc1" %>
<%@ Register Src="../User_Col/col_Header.ascx" TagName="col_Header" TagPrefix="uc3" %>
<%@ Register Src="../../UserCol/ReportServer.ascx" TagName="ReportServer" TagPrefix="uc4" %>
<!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">
    <title></title>
    <link id="mobileCss" runat="server" href="../themes/mobile.css" rel="stylesheet"
        type="text/css" />

    <script type="text/javascript">
        function OpenSearch() {
            if (setContent.style.display == 'none') {
                setContent.style.display = 'block';
                setControl.innerHTML = '▲充值';
                __mt__setSearchCookie(1);
            }
            else {
                setContent.style.display = 'none';
                setControl.innerHTML = '▼充值';
                __mt__setSearchCookie(0);
            }
        }

        function defaultSearchState() {
            var num = __mt__getSearchCookie();
            if (num == 1) {
                setContent.style.display = 'block';
                setControl.innerHTML = '▲充值';
            }
            else {
                setContent.style.display = 'none';
                setControl.innerHTML = '▼充值';
            }
        }
    </script>
</head>
<body onload="defaultSearchState();">

    <form id="form1" runat="server">
        <uc3:col_Header ID="col_Header1" runat="server" />

        <div id="web_page_contents">
            <div class="search biao_zhun_suo_jin">
                <uc4:ReportServer ID="ReportServer1" runat="server" />
                <uc1:col_StuControlPanel ID="col_StuControlPanel1" runat="server" />
                <div class="setandsearch">
                    <ul class="searchtool">

                        <li>
                            <div id="setControl" onclick="OpenSearch()">
                                ▼充值
                            </div>
                        </li>
                    </ul>

                    <div id="setContent" style="display: none">
                        <h1>学员账户管理
                        </h1>
                        <table class="table" cellspacing="0" style="width: 100%">
                            <tr>
                                <td>学号：
                                </td>
                                <td>
                                    <asp:Label ID="labStudentID" runat="server"></asp:Label>
                                </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:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>金额：
                                </td>
                                <td>
                                    <asp:TextBox ID="tbxPayMoney" runat="server"></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"></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 colspan="3">
                                    <label class="lab_button">
                                        <asp:Button ID="btnPost" runat="server" Text="确定" OnClick="btnPost_Click" />
                                    </label>
                                </td>
                            </tr>
                        </table>
                    </div>



                </div>

                <div class="striking" runat="server" id="divSellInfo" visible="false" style="margin-top: 5px">
                    <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="kuai_show">
                    <asp:FormView ID="fvStudent" runat="server" Width="100%">
                        <ItemTemplate>

                            <h1 style="text-align: center">账户信息
                            </h1>

                            <table class="inline_block" cellspacing="0">
                                <tr>
                                    <td>学号：
                                    </td>
                                    <td>
                                        <%#Eval("StudentID")%>
                                    </td>

                                </tr>
                                <tr>
                                    <td>姓名：
                                    </td>
                                    <td>
                                        <%#Eval("StudentName")%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>可用余额：
                                    </td>
                                    <td>
                                        <span style="color: Red">
                                            <%#Eval("AvailableMoney", "{0:c2}")%></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td>消费总额：
                                    </td>
                                    <td>
                                        <%#Eval("ConsumedMoney","{0:c2}")%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>借款金额：
                                    </td>
                                    <td>
                                        <%#Eval("CreditMoney", "{0:c2}")%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>积分：
                                    </td>
                                    <td>
                                        <%#Eval("Points")%>分
                                    </td>
                                </tr>
                            </table>

                            <div class="inline_block">
                                <asp:Image ID="imgPhoto" runat="server" Width="120" /></div>
                        </ItemTemplate>
                    </asp:FormView>
                </div>

                <div class="divpanel">
                    <asp:Repeater ID="repBlock" runat="server" OnItemCommand="repBlock_ItemCommand"
                        OnItemDataBound="repBlock_ItemDataBound">
                        <ItemTemplate>

                            <asp:Panel ID="plItem" runat="server" CssClass="kuai">

                                <h1 class="auto_length_title">单号：<%#Eval("PaymentID")%></h1>

                                <table class="table" cellspacing="0" border="0" style="table-layout: fixed; word-break: break-all; word-wrap: break-word">
                                    <tr>
                                        <td style="width: 75px">类型：</td>
                                        <td style="width: auto"><%#Eval("PaymentTypeName") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">金额：</td>
                                        <td style="width: auto"><%#Eval("PayMoney", "{0:c2}") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">收款方式：</td>
                                        <td style="width: auto"><%#Eval("PayMethod")%></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">日期：</td>
                                        <td style="width: auto"><%#Eval("DateAndTime")%></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">备注：</td>
                                        <td style="width: auto"><%#Eval("Remark")%></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">借款到期：</td>
                                        <td style="width: auto"><%#Eval("CreditExpiration")%></td>
                                    </tr>
                                    <tr>
                                        <td>办理点：</td>
                                        <td><%#Eval("PostSchoolName") %></td>
                                    </tr>
                                    <tr>
                                        <td>录入员：</td>
                                        <td><%#Eval("TrueName")%></td>
                                    </tr>
                                    <tr>
                                        <td style="height: 25px">打印：</td>
                                        <td>
                                            <asp:HyperLink ID="hlkPrint" runat="server" NavigateUrl='<%#string.Format("javascript:Print({0});void(0);",Eval("PaymentID")) %>'
                                                ImageUrl='<%# accTheme("print.gif")%>' CssClass="inline_block"></asp:HyperLink>
                                            <span class="inline_block">次数：<%# (int)Eval("PrintCount")%></span> </td>
                                    </tr>
                                </table>

                                <table style="width: 100%;" cellpadding="0" cellspacing="2">
                                    <tr>
                                        <td>
                                            <div class="lab_button" id="divDelete" runat="server">
                                                <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="Delete" CommandArgument='<%#Eval("PaymentID")%>'
                                                    OnClientClick="<%# Rs.Messages.确定删除%>"></asp:LinkButton>
                                            </div>
                                        </td>
                                        <td>
                                            <div class="lab_button" id="divEdit" runat="server">
                                                <asp:LinkButton runat="server" ID="lbnEdit" CommandArgument='<%# Eval("PaymentID")%>'
                                                    CommandName="Edit" Text="编辑"></asp:LinkButton>
                                            </div>
                                        </td>
                                    </tr>
                                </table>


                            </asp:Panel>
                            <asp:Panel ID="plEdit" runat="server" CssClass="kuai edit_kuai">
                                <h1 class="auto_length_title">单号：<%#Eval("PaymentID")%></h1>

                                <table class="table" cellspacing="0" border="0">
                                    <tr>
                                        <td style="width: 75px">类型：</td>
                                        <td style="width: auto"><%#Eval("PaymentTypeName") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">金额：</td>
                                        <td style="width: auto">
                                            <asp:TextBox ID="tbxPayMoney" runat="server" Text='<%# Eval("PayMoney") %>'></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">收款方式：</td>
                                        <td style="width: auto">
                                            <asp:DropDownList ID="ddlPayMethod" runat="server" DataTextField="PayMethodName" DataValueField="PayMethodName">
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">日期：</td>
                                        <td style="width: auto">
                                            <asp:TextBox ID="tbxDateAndTime" runat="server" Text='<%# Eval("DateAndTime") %>'></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">备注：</td>
                                        <td style="width: auto">
                                            <asp:TextBox ID="tbxRemark" runat="server" Text='<%# Eval("Remark") %>'></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">借款到期：</td>
                                        <td style="width: auto">
                                            <asp:TextBox ID="tbxCreditExpiration" runat="server" Text='<%# Eval("CreditExpiration") %>'></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td>办理点：</td>
                                        <td>
                                            <asp:DropDownList ID="ddlPostSchool" runat="server" DataTextField="SchoolName" DataValueField="SchoolID">
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr>
                                        <td>录入员：</td>
                                        <td><%#Eval("TrueName")%></td>
                                    </tr>
                                    <tr>
                                        <td style="height: 25px"></td>
                                        <td></td>
                                    </tr>
                                </table>


                                <table style="width: 100%;" cellpadding="0" cellspacing="2">
                                    <tr>
                                        <td>
                                            <div class="lab_button">
                                                <asp:LinkButton runat="server" ID="lbnUpdate" CommandArgument='<%# Eval("PaymentID")%>'
                                                    CommandName="Update" Text="更新"></asp:LinkButton>
                                            </div>
                                        </td>
                                        <td>
                                            <div class="lab_button">
                                                <asp:LinkButton runat="server" ID="lbnCancel" CommandArgument='<%# Eval("PaymentID")%>'
                                                    CommandName="Cancel" Text="取消"></asp:LinkButton>
                                            </div>
                                        </td>
                                    </tr>
                                </table>

                            </asp:Panel>

                        </ItemTemplate>
                    </asp:Repeater>
                </div>

                <div class="pager_button">
                    <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
                </div>

                <div class="backpanel">
                    <label class="lab_button_kuan" 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>
            </div>
    </form>
</body>
</html>
