<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_Bank, HoWaveVGO" title="社区银行管理" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
 <script type="text/javascript">
function AddBank(ctlName,action){
  var recdata=false;
  switch (action){
      case "Add":
      var recdata=showModalDialog('Admin_AddBank.aspx?Action=Add','','dialogWidth:600px; dialogHeight:500px; help: no; scroll: yes; status: no');
      break;
      case "Modify":
      var recdata=showModalDialog('Admin_AddBank.aspx?Action=Modify&BankID='+document.getElementById(ctlName).value,'','dialogWidth:600px; dialogHeight:600px; help: no; scroll: yes; status: no');      
      break;    
  }
   //判断对应的返回值
   if(recdata==true)
   {
    // 刷新当前窗口
    window.location.reload();       
   } 
   
}
</script>


    <table class="adminheading">
    <tr>
       <th class="frontpage">
       社区银行管理</th>
       <td align="right">
       <div style="width:100px">
         <a href="javascript:void(0)" onclick="AddBank('','Add')">增加新转换货币</a></div>
       </td>
       <td class="rtdw"></td>
     </tr>
 </table>

               <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetBanks" TypeName="BankBLL"  DeleteMethod="DeleteBank" >
                     <DeleteParameters>
                         <asp:Parameter Name="BankID" Type="Int32" />
                     </DeleteParameters>
                 </asp:ObjectDataSource>                 
                  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                       <ContentTemplate>
                           <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="adminlist" AllowPaging="True" DataSourceID="ObjectDataSource1" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="BankID" RowStyle-HorizontalAlign="Center" EnableViewState="false">
                               <Columns>
                                   <asp:BoundField DataField="BankID" HeaderText="编号ID" />
                                   <asp:BoundField DataField="BankTargetName" HeaderText="转换系统名称" />
                                   <asp:BoundField DataField="BankFrontName" HeaderText="前台显示名称" />
                                   <asp:BoundField DataField="TransferField" HeaderText="转换字段名" />
                                   <asp:BoundField DataField="ExchangeRate" HeaderText="转换汇率" />
                                   <asp:BoundField DataField="Charge" HeaderText="转换手续费" />
                                   <asp:TemplateField HeaderText="是否启用">
                                       <ItemTemplate>
                                          <asp:Label ID="EnableBank" runat="server"  Text='<%# (Convert.ToString(Eval("EnableBank"))=="1")?"启用":"不启用" %>' />
                                       </ItemTemplate>
                                   </asp:TemplateField>
                                   <asp:TemplateField HeaderText="操作">
                                       <ItemTemplate>
                                          <a href="#" runat="server" id="ModifyBank">修改</a>|
                                            <asp:HiddenField ID="HiddenBankID" runat="server" Value='<%# Eval("BankID") %>' />
                                            <asp:LinkButton ID="btnDelete" runat="server" OnClientClick ="return confirm('确定要删除此银行转换设置吗?')" CommandName="Delete" Text="删除"/>               
                            
                                       </ItemTemplate>
                                   </asp:TemplateField>
                               </Columns>
                               <EmptyDataTemplate>
                               <tr>
                                <th scope="col">编号ID</th><th scope="col">公告标题</th><th scope="col">公告类型</th><th scope="col">公告等级</th><th scope="col">发布人</th><th scope="col">公告发布日期</th><th scope="col">公告结束日期</th><th scope="col">内容</th><th scope="col">浏览量</th><th scope="col">修改</th><th scope="col">删除</th>
                               </tr>
                               <tr>
                                <td colspan="11">暂无转换货币！</td>
                               </tr>
                               </EmptyDataTemplate>
                           </asp:GridView>
                        
                      </ContentTemplate>
                    
                  </asp:UpdatePanel>                
  
  <asp:UpdateProgress ID="UpdateProgress1" runat="server">
   <ProgressTemplate>
       <div class="wait">
         <img src="../IMS_Img/wait.gif" align="middle"/>请稍等...
        </div>
     </ProgressTemplate>
  </asp:UpdateProgress>    
</asp:Content>

