<%@ page language="C#" autoeventwireup="true" inherits="HL_Admin_Admin_AddBank, HoWaveVGO" enableEventValidation="false" %>

<!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 href="Css/template_css.css" type="text/css" rel="stylesheet" />
    <base target="_self"></base>
    <script type="text/javascript" src="Js/getdate.js"></script>
    <script type="text/javascript">
       function show_db_select(ctlname)
       {
         var obj1=document.getElementById(ctlname+"_0");
         var obj2=document.getElementById(ctlname+"_1");        
         if(obj1.checked)
         {
           document.getElementById("ShowAccess").style.display="";
           document.getElementById("ShowSQL").style.display="none";
         }
         else if(obj2.checked)
         {
           document.getElementById("ShowAccess").style.display="none";
           document.getElementById("ShowSQL").style.display="";
         }
         
       }
function showHelp(id)
{ 
  var obj=document.getElementById(id);
  obj.style.display="";
  obj.style.left=event.x;
  obj.style.top=event.y;
  
  
}
function hidenHelp(id)
{
  var obj=document.getElementById(id);
  obj.style.display="none";
}
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <asp:FormView ID="FormView1" runat="server" DataKeyNames="BankID"  DataSourceID="ObjectDataSource1" Width="100%"  DefaultMode="Edit" OnItemUpdated="FormView1_ItemUpdated"  OnItemInserted="FormView1_ItemInserted" OnDataBound="FormView1_DataBound" OnItemInserting="FormView1_ItemInserting" OnItemUpdating="FormView1_ItemUpdating" >
          <HeaderTemplate>                        
             <table class="tableadd"> 
               <tr>
                  <th colspan="2" style="font-weight:bold;">积分转换</th>
               </tr>
         </HeaderTemplate>  
         
         <EditItemTemplate>
            <tr>
                <td width="20%" align="right" class="tdbg1"> 系统编号:</td>
                <td width="80%" class="tdbg2"><asp:Label ID="Label1" runat="server" Text='<%# Eval("BankID") %>'/></td>
            </tr>
            <tr>
                <td align="right" class="tdbg1">转换目标系统:</td>
                <td class="tdbg2"> <asp:Label ID="Label2" runat="server" Text='<%# Bind("BankTargetName") %>'/></td>
            </tr>
             <tr>
                 <td align="right" class="tdbg1">前台频道名称</td>
                 <td class="tdbg2"><asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("BankFrontName") %>'/><a href="#"  onmouseover="showHelp('help3');" onmouseout="hidenHelp('help3');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
            </tr>
            <tr>
                <td align="right" class="tdbg1">转换积分字段名:</td>
                <td class="tdbg2"><asp:TextBox ID="TransferField" runat="server" Text='<%# Bind("TransferField") %>'/><a href="#"  onmouseover="showHelp('help1');" onmouseout="hidenHelp('help1');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a>
               
                </td>
            </tr>
            <tr>
                <td align="right" class="tdbg1">转换比率:</td>
                <td><asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("ExchangeRate") %>'/>转换成1个通行币</td>
            </tr>
            <tr>
                <td align="right" class="tdbg1">会员每次转换收费:</td>
                <td class="tdbg2"><asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Charge") %>'/>%</td>
            </tr>
            <tr>
                 <td align="right" class="tdbg1">设置权限</td>
                 <td><asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("BankAccess") %>'/></td>
            </tr>
            <tr>
                <td align="right" class="tdbg1">  在客户中心显示:</td>
                <td class="tdbg2"><asp:RadioButtonList ID="EnableBankRadio" runat="server" 
                         SelectedValue='<%# Bind("EnableBank") %>' RepeatDirection="Horizontal">
                           <asp:ListItem Value="0">不显示</asp:ListItem>
                           <asp:ListItem Value="1">显示</asp:ListItem>
                    </asp:RadioButtonList> 
               </td>
            </tr>
            <tr>
               <td align="right" class="tdbg1">数据库类型</td>
               <td  class="tdbg2"><asp:RadioButtonList ID="DBType" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Bind("DBType") %>'>
                     <asp:ListItem Text="Access" Value="Access" />
                     <asp:ListItem Text="SQL" Value="SQL"  Selected="True"/>
                  </asp:RadioButtonList><br />
                   <div id="ShowAccess">
                      Access数据库路径：<asp:TextBox  ID="AccessPath" runat="server" Text='<%# Bind("AccessPath") %>' />
                   
                   </div>
                    <div id="ShowSQL">
                      SQL数据源：<asp:TextBox  ID="Sql_Source" runat="server" Text='<%# Bind("Sql_Source") %>' /><br />
                      SQL用户名：<asp:TextBox  ID="Sql_User" runat="server" Text='<%# Bind("Sql_User") %>' /><br />
                      SQL密&nbsp;&nbsp;&nbsp;码：<asp:TextBox  ID="Sql_Pass" runat="server" Text='<%# Bind("Sql_Pass") %>' TextMode="Password" />请不要忘记填写密码<br />
                      SQL数据库：<asp:TextBox  ID="Sql_Dbname" runat="server" Text='<%# Bind("Sql_Dbname") %>' />
                   </div>
               </td>
            </tr>
           
            <tr>
                 <td align="right" class="tdbg1">转换字段所在数据表</td>
                 <td  class="tdbg2"><asp:TextBox ID="TableName" runat="server" Text='<%# Bind("TableName") %>'/><a href="#"  onmouseover="showHelp('help2');" onmouseout="hidenHelp('help2');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
            </tr>
            <tr>
                 <td align="right" class="tdbg1">所在数据表用户名字段</td>
                 <td  class="tdbg2"><asp:TextBox ID="TableUserName" runat="server" Text='<%# Bind("TableUserName") %>'/><a href="#"  onmouseover="showHelp('help4');" onmouseout="hidenHelp('help4');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
            </tr>
            <tr><td colspan="2" align="center">
                    <asp:Button ID="testConnect" runat="server"  OnClick="testConnect_ButtonClick" Text="测试连接"/>
                   <asp:Button ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update" 
                    Text="修改"/>
                    <asp:Button ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                 Text="取消"/>
            </td></tr>
         </EditItemTemplate>
         <InsertItemTemplate>
             <tr >
                 <td width="20%" align="right" class="tdbg1">转换目标系统:</td>
                 <td width="80%" class="tdbg2">                             
                    <asp:DropDownList ID="BankTargetNamelist" DataSourceID="ObjectDataSource2" 
                         DataTextField="InterfaceName" DataValueField="InterfaceName"  
                         runat="server"  Width="130px"
                         SelectedValue='<%# Bind("BankTargetName") %>' >
                    </asp:DropDownList>
                 </td>
             </tr>
             <tr>
                 <td align="right" class="tdbg1">前台频道名称</td>
                 <td class="tdbg2"><asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("BankFrontName") %>'/><a href="#"  onmouseover="showHelp('help3');" onmouseout="hidenHelp('help3');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
            </tr>
             <tr>
                <td align="right" class="tdbg1">转换积分字段名:</td>
                <td class="tdbg2"><asp:TextBox ID="TransferField" runat="server" Text='<%# Bind("TransferField") %>'/><a href="#"  onmouseover="showHelp('help1');" onmouseout="hidenHelp('help1');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
            </tr>
             <tr>
                 <td align="right" class="tdbg1">转换比率:</td>
                 <td class="tdbg2">
                    <asp:TextBox ID="ExchangeRateTextBox" runat="server" Text='<%# Bind("ExchangeRate") %>'/>转换成1个通行币                                
                 </td>
             </tr>
             <tr>
                  <td align="right" class="tdbg1">会员每次转换收费:</td>
                  <td class="tdbg2"> 
                     <asp:TextBox ID="ChargeTextBox" runat="server" Text='<%# Bind("Charge") %>'/> %                                
                  </td>
             </tr>
             <tr>
                 <td align="right" class="tdbg1">设置权限:</td>
                 <td class="tdbg2"> 
                    <asp:TextBox ID="BankAccessTextBox" runat="server" Text='<%# Bind("BankAccess") %>'/>                                 
                 </td>
             </tr>
             <tr>
                 <td align="right" class="tdbg1">在客户中心显示:</td>
                 <td class="tdbg2"><asp:RadioButtonList ID="EnableBankRadio" runat="server" 
                         SelectedValue='<%# Bind("EnableBank") %>' RepeatDirection="Horizontal">
                           <asp:ListItem Value="0">不显示</asp:ListItem>
                           <asp:ListItem Value="1">显示</asp:ListItem>
                      </asp:RadioButtonList>                                 
                 </td>
             </tr>
             <tr>
               <td align="right" valign="top" class="tdbg1">数据库类型</td>
               <td class="tdbg2">
                  <asp:RadioButtonList ID="DBType" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Bind("DBType") %>'>
                     <asp:ListItem Text="Access" Value="Access" />
                     <asp:ListItem Text="SQL" Value="SQL"  Selected="True"/>
                  </asp:RadioButtonList><br />
                   <div id="ShowAccess" style="display:none;">
                      Access数据库路径：<asp:TextBox  ID="AccessPath" runat="server" Text='<%# Bind("AccessPath") %>' />
                   
                   </div>
                    <div id="ShowSQL">
                      SQL数据源：<asp:TextBox  ID="Sql_Source" runat="server" Text='<%# Bind("Sql_Source") %>' />默认localhost<br />
                      SQL用户名：<asp:TextBox  ID="Sql_User" runat="server" Text='<%# Bind("Sql_User") %>' /><br />
                      SQL密&nbsp;&nbsp;&nbsp;码：<asp:TextBox  ID="Sql_Pass" runat="server" Text='<%# Bind("Sql_Pass") %>' /><br />
                      SQL数据库：<asp:TextBox  ID="Sql_Dbname" runat="server" Text='<%# Bind("Sql_Dbname") %>' />
                   </div>
               </td>
            </tr>
            <tr>
                 <td align="right" class="tdbg1">转换字段所在数据表：</td>
                 <td class="tdbg2"><asp:TextBox ID="TableName" runat="server" Text='<%# Bind("TableName") %>'/><a href="#"  onmouseover="showHelp('help2');" onmouseout="hidenHelp('help2');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
            </tr>
            <tr>
                 <td align="right" class="tdbg1">所在数据表用户名字段</td>
                 <td  class="tdbg2"><asp:TextBox ID="TableUserName" runat="server" Text='<%# Bind("TableUserName") %>'/><a href="#"  onmouseover="showHelp('help4');" onmouseout="hidenHelp('help4');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
            </tr>
             <tr>                           
                <td colspan="2" align="center">
                    <asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                     Text="插入"/>
                    <asp:Button ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                     Text="取消"/>
               </td>
            </tr>  
         </InsertItemTemplate> 
         <FooterTemplate></table></FooterTemplate>
   </asp:FormView>
   <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" InsertMethod="AddBank" SelectMethod="GetBankByBankID" TypeName="BankBLL" UpdateMethod="UpdateBank" DeleteMethod="DeleteBank"   OnInit="ObjectDataSource1_Init"  OnUpdating="ObjectDataSource1_Updating" >
         <UpdateParameters>
             <asp:Parameter Name="BankTargetName" Type="String" />
             <asp:Parameter Name="ExchangeRate" Type="Int32" />
             <asp:Parameter Name="Charge" Type="Int32" />
             <asp:Parameter Name="BankAccess" Type="Int32" />
             <asp:Parameter Name="EnableBank" Type="Int32" />
             <asp:Parameter Name="BankID" Type="Int32" />
             <asp:Parameter Name="TransferField" Type="String" />
             <asp:Parameter Name="BankFrontName" Type="String" />
             <asp:Parameter Name="InterfaceID" Type="Int32" />
             <asp:Parameter Name="DBType" Type="String" />
             <asp:Parameter Name="AccessPath" Type="String" />
             <asp:Parameter Name="Sql_User" Type="String" />
             <asp:Parameter Name="Sql_Pass" Type="String" />
             <asp:Parameter Name="Sql_Source" Type="String" />
             <asp:Parameter Name="TableName" Type="String" />
             <asp:Parameter Name="TableUserName" Type="String" />
             <asp:Parameter Name="Sql_Dbname" Type="String" />
         </UpdateParameters>
         <SelectParameters>
             <asp:QueryStringParameter DefaultValue="" Name="BankID" QueryStringField="BankID"
                 Type="Int32" />
         </SelectParameters>
         <InsertParameters>
             <asp:Parameter Name="BankTargetName" Type="String" />
             <asp:Parameter Name="ExchangeRate" Type="Int32" />
             <asp:Parameter Name="Charge" Type="Int32" />
             <asp:Parameter Name="BankAccess" Type="Int32" />
             <asp:Parameter Name="EnableBank" Type="Int32" />
             <asp:Parameter Name="TransferField" Type="String" />
             <asp:Parameter Name="BankFrontName" Type="String" />
             <asp:Parameter Name="InterfaceID" Type="Int32"  DefaultValue="0"/>
             <asp:Parameter Name="DBType" Type="String" />
             <asp:Parameter Name="AccessPath" Type="String" />
             <asp:Parameter Name="Sql_User" Type="String" />
             <asp:Parameter Name="Sql_Pass" Type="String" />
             <asp:Parameter Name="Sql_Source" Type="String" />
             <asp:Parameter Name="TableName" Type="String" />
             <asp:Parameter Name="TableUserName" Type="String" />
             <asp:Parameter Name="Sql_Dbname" Type="String" />
         </InsertParameters>
         <DeleteParameters>
             <asp:Parameter Name="BankID" Type="Int32" />
         </DeleteParameters>
   </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetInterfaceNameID"  TypeName="InterfaceBLL"/>
  </div>
   <div id="help1" style="position:absolute;z-index:1; border:solid 1px black; padding:10px; background:white; display:none;" onmouseover="this.style.display='';" onmouseout="this.style.display='none'">
      <ul>
         <li><b>动易2006：</b><br />
             <ul style="list-style-type:none;">
               <li>资金---Balance</li>
               <li>点数---UserPoint</li>
               <li>积分---UserExp</li>
               <li>消费点数---ConsumePoint</li>
              </ul> 
         </li>
         <li><b>动网7.1：</b>
             <ul style="list-style-type:none;">
               <li>金钱---UserMoney</li>
               <li>点券---UserTicket</li>
               <li>经验值---userEP</li>
               <li>财富---userWealth</li>
              </ul> 
         
         </li>
         <li><b>OBLOG4.0：</b>
             <ul style="list-style-type:none;">
               <li>积分---user_info</li>
               
              </ul> 
         
         </li>
      </ul>   
   </div>
   <div id="help2" style="position:absolute;z-index:1; border:solid 1px black; padding:10px; background:white; display:none;" onmouseover="this.style.display='';" onmouseout="this.style.display='none'">
      <ul>
         <li><b>动易2006：</b>PE_User</li>
         <li><b>动网7.1：</b>DV_User</li>
         <li><b>OBLOG4.0：</b>oblog_user</li>
         <li><b>创力：</b>cl_User</li>
      </ul>   
   </div>
   <div id="help3" style="position:absolute;z-index:1; border:solid 1px black; padding:10px; background:white; display:none; left: 0px; top: 0px;" onmouseover="this.style.display='';" onmouseout="this.style.display='none'">
      如频道资金，论坛积分等
   </div>
   <div id="help4" style="position:absolute;z-index:1; border:solid 1px black; padding:10px; background:white; display:none;" onmouseover="this.style.display='';" onmouseout="this.style.display='none'">
      <ul>
         <li><b>动易2006：</b>UserName</li>
         <li><b>动网7.1：</b>UserName</li>
         <li><b>OBLOG4.0：</b>username</li>         
      </ul>   
   </div>
 </form>
</body>
</html>
