<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_OnLinePaySeting, WebApp_deploy" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="GridView1" CssClass="adminlist" runat="server" AutoGenerateColumns="False" DataKeyNames="ID">
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="ID" HeaderStyle-Width="60px" />
            <asp:BoundField DataField="PayTitle" HeaderText="通道名称" />
            <asp:TemplateField HeaderText="状态"  HeaderStyle-Width="100px">
                <ItemTemplate>
                    <asp:LinkButton ID="isOpen" runat="server" Text='<%# (Eval("isOpen").ToString()=="1")?"开启":"关闭" %>' CommandArgument='<%# Eval("isOpen") %>' CommandName='<%# Eval("ID") %>' OnCommand="SetActive" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作" HeaderStyle-Width="100px">
                <ItemTemplate>
                    <asp:HyperLink ID="ed" runat="server" NavigateUrl='<%# "?pID=" + Eval("ID") %>' Text="修改" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
       <EmptyDataTemplate>
       无数据！
       </EmptyDataTemplate>
       <RowStyle HorizontalAlign="Center" />
 </asp:GridView>
 
    <asp:FormView ID="FormView1" Visible="false" DataKeyNames="ID" DefaultMode="Edit" runat="server" Width="100%">
        <EditItemTemplate>
            <table width="100%" class="nick">
                <tr>
                <td colspan="2" class="tit">设置接口参数
                </td>
                </tr>
                <tr class="tdbg">
                    <td class="ltd">通道名称：</td>
                    <td class="rtd"><asp:TextBox ID="a" Text='<%# Bind("PayTitle") %>' runat="server" Width="150" /></td>
                </tr>
                <tr class="tdbg">
                    <td class="ltd">商户号：</td>
                    <td class="rtd"><asp:TextBox ID="Literal1" Text='<%# Bind("MerID") %>' runat="server" Width="200" /></td>
                </tr>
                <tr class="tdbg">
                    <td class="ltd">商户密钥：</td>
                    <td class="rtd"><asp:TextBox ID="Literal2" Text='<%# Bind("MerKey") %>' runat="server" Width="300" /></td>
                </tr>
                <tr class="tdbg">
                    <td class="ltd"><%# (Eval("SysStr").ToString().ToLower()=="alipay")?"支付宝帐号":"商户名" %>：</td>
                    <td class="rtd"><asp:TextBox ID="Literal3" Text='<%# Bind("MerName") %>' runat="server" /></td>
                </tr>
                <tr>
                <td>&nbsp;</td>
                <td>
                <asp:Button id="UpdateButton" runat="server" Text=" 更 新 " CommandName="Update" CausesValidation="True"></asp:Button> 
                 <input type="button" id="UpdateCancelButton" onclick="history.back()"  value=" 取 消 " />
                </td>
            </tr>
            </table>
        </EditItemTemplate>
    </asp:FormView>
    
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="Getall" TypeName="HoWave.Web.OnlinePaySeting"></asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetPaySetingByID" TypeName="HoWave.Web.OnlinePaySeting" UpdateMethod="Update" OnUpdated="OnSubmit">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="pID" Type="Int32" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="PayTitle" Type="String" />
            <asp:Parameter Name="MerID" Type="String" />
            <asp:Parameter Name="MerKey" Type="String" />
            <asp:Parameter Name="MerName" Type="String" />
        </UpdateParameters>
    </asp:ObjectDataSource>
</asp:Content>

