<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Dialog/DialogMaster.Master"
    Theme="Default" EnableViewState="true" CodeBehind="PrePaidList.aspx.cs" Inherits="OAWeb.crm.Agent.PrePaidList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="width: 700px; height: 470px; padding: 10px">
        <table class="data_title" style="margin-top: 10px;">
            <tr>
                <td class="data_caption">
                    <asp:Label ID="lblTitle" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="data-field">
                    <table width="90%">
                        <tr>
                            <td class="tb-editor" nowrap="nowrap">
                                <asp:Button ID="btnAdd" runat="server" Text="录款" CssClass="btn_77px" />
                                <input type="button" value="返 回" class="btn_77px" onclick="CloseReload();" />
                            </td>
                            <td style="text-align: right">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <div class="buttons-bar" style="margin-bottom: 10px;">
            <table class="w100p" style="width: 100%">
                <tr>
                    <td align="left">
                        <a href="PrePaidList.aspx?state=1" id="LinkAudit1" runat="server">已审核</a> <a href="PrePaidList.aspx?state=0"
                            style="margin-left: 15px;" id="LinkAudit2" runat="server">未审核</a>
                    </td>
                </tr>
            </table>
        </div>
        <div class="list">
            <asp:GridView ID="gvData" runat="server" AutoGenerateColumns="False" DataKeyNames=""
                GridLines="None" CellPadding="0" CssClass="table_list" EnableModelValidation="True"
                OnRowDataBound="gvData_RowDataBound" OnRowCommand="gvData_RowCommand">
                <RowStyle HorizontalAlign="Left" />
                <Columns>
                    <asp:BoundField DataField="paid_time" HeaderText="发生时间"></asp:BoundField>
                    <asp:BoundField DataField="Income" HeaderText="录入"></asp:BoundField>
                    <asp:BoundField DataField="Expenses" HeaderText="支出"></asp:BoundField>
                    <asp:TemplateField HeaderText="方式">
                        <ItemTemplate>
                            <asp:Label ID="lblPayWay" runat="server" Text=""></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="当期余额">
                        <ItemTemplate>
                            <asp:Label ID="lblBalance" runat="server" Text=""></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="备注">
                        <ItemTemplate>
                            <%# base.getStr1(ObjToStr( Eval("Remark")),20) %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="状态">
                        <ItemTemplate>
                            <asp:Label ID="lblState" runat="server" Text=""></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="业务员">
                        <ItemTemplate>
                            <%# OACore.Caches.UsersCache.Instance.GetNickName(ObjToInt( Eval("TrackUserId"))) %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnPaid" CommandName="Paid" 
                                CommandArgument='<%# Eval("Id") %>' runat="server">审核</asp:LinkButton>
                            <asp:LinkButton ID="lbtnView" CommandName="View" CommandArgument='<%# Eval("Id") %>'
                                runat="server">查看</asp:LinkButton>
                            <asp:LinkButton ID="lbtnEdit" CommandName="Edit" CommandArgument='<%# Eval("Id") %>'
                                runat="server">编辑</asp:LinkButton>
                            <asp:LinkButton ID="lbtnDel" OnClientClick="return confirm('确定要删除？')" CommandName="Del"
                                CommandArgument='<%# Eval("Id") %>' runat="server">删除</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <div class="pager-bar">
                <webdiyer:AspNetPager ID="plCustomer" runat="server" OnPageChanged="plCustomer_PageChanged"
                    PageSize="10">
                </webdiyer:AspNetPager>
            </div>
        </div>
    </div>
</asp:Content>
