<%@ page language="C#" autoeventwireup="true" inherits="HL_Admin_Admin_AddInterface, 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" src="Js/Function.js"></script>
</head>
<body>
    <form id="form1" runat="server">
           <asp:FormView ID="FormView1" runat="server" DataKeyNames="InterfaceID" DataSourceID="ObjectDataSource1" Width="100%" CellSpacing="2" 
           Font-Size="13px" HorizontalAlign="Center" DefaultMode="Edit" OnItemUpdated="FormView1_ItemUpdated" OnItemInserted="FormView1_ItemInserted">
                      <HeaderTemplate>
                      <table width="100%" class="tableadd">                      
                          <tr>
                               <th colspan="2"><b>整合接口设置</b></th>              
                          </tr>
                      </HeaderTemplate>
                     
                      <InsertItemTemplate>
                          
                          <tr>
                               <td width="20%" class="tdbg1"> 接口系统名称:</td>
                               <td width="80%" class="tdbg2"> <asp:TextBox ID="InterfaceNameTextBox" runat="server" Text='<%# Bind("InterfaceName") %>' Width="70%" CssClass="text_area" />
                               <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="InterfaceNameTextBox" ErrorMessage="请填写系统名称"></asp:RequiredFieldValidator>
                               </td>
                          </tr>
                           <tr>
                               <td class="tdbg1">系统版本</td>
                               <td class="tdbg2"><asp:TextBox ID="Version" runat="server" Text='<%# Bind("Version") %>' Width="70%" CssClass="text_area" />
                               </td>
                          </tr>                          
                           <tr>
                               <td class="tdbg1">接口更新日期 :</td>
                               <td class="tdbg2"><asp:TextBox ID="UpdateTime" runat="server" Text='<%# Bind("UpdateTime") %>' Width="70%" CssClass="text_area" />
                               <asp:RequiredFieldValidator runat="server" ID="gh" ControlToValidate="UpdateTime" ErrorMessage="请填写更新日期"></asp:RequiredFieldValidator>
                               </td>
                          </tr>                          
                         
                          <tr>
                               <td class="tdbg1">前台接口路径 :</td>
                               <td class="tdbg2"><asp:TextBox ID="InterfaceFrontUrlTextBox" runat="server" Text='<%# Bind("InterfaceFrontUrl") %>' Width="70%" CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help3');" onmouseout="hidenHelp('help3');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
                          </tr>
                          <tr>
                               <td class="tdbg1">后台接口路径 :</td>
                               <td class="tdbg2"><asp:TextBox ID="InterfaceAdminUrlTextBox" runat="server" Text='<%# Bind("InterfaceAdminUrl") %>' Width="70%" CssClass="text_area" /></td>
                          
                          </tr>
                           <tr>
                               <td class="tdbg1">后台登录帐号 :</td>
                               <td class="tdbg2"><asp:TextBox ID="AdminLoginUrl" runat="server" Text='<%# Bind("AdminLoginUrl") %>' Width="70%" CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help2');" onmouseout="hidenHelp('help2');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
                          </tr>
                           <tr>
                               <td class="tdbg1">后台登录密码 :</td>
                               <td class="tdbg2"><asp:TextBox ID="AdminLoginPass" runat="server" Text='<%# Bind("AdminLoginPassword") %>' Width="70%" CssClass="text_area" /></td>
                          </tr>
                          <tr>
                              <td class="tdbg1">后台打开方式</td>
                              <td class="tdbg2"><asp:RadioButtonList ID="AdminLoginOpenType" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Bind("AdminLoginOpenType") %>'>
                                       <asp:ListItem Text="新窗口" Value="0" />
                                       <asp:ListItem Text="原窗口" Value="1" Selected="True"/>
                                    </asp:RadioButtonList></td>
                          </tr>                         
                          <tr>
                               <td class="tdbg1">该系统会员中心路径 :</td>
                               <td class="tdbg2"><asp:TextBox ID="UserCenterUrl" runat="server" Text='<%# Bind("UserCenterUrl") %>' Width="70%" CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help1');" onmouseout="hidenHelp('help1');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
                          
                          </tr>
                          <tr>
                               <td class="tdbg1">系统字符编码 :</td>
                               <td class="tdbg2">
                               <asp:DropDownList ID="CodePage" runat="server" SelectedValue='<%# Bind("CodePage") %>' >
                                   <asp:ListItem Text="gb2312" Value="gb2312"></asp:ListItem>
                                   <asp:ListItem Text="utf-8" Value="utf-8"></asp:ListItem>
                                   <asp:ListItem Text="默认" Value=""></asp:ListItem>
                               </asp:DropDownList>可以向程序提供商联系获知，默认值为GB2312。
                               </td>
                          </tr>
                           <tr>
                               <td class="tdbg1">开启前台整合:</td>
                               <td class="tdbg2"><asp:RadioButtonList ID="EnableFrontInterfaceRadio" runat="server" 
                                     SelectedValue='<%# Bind("EnableFrontInterface") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                                   </asp:RadioButtonList>
                               </td>
                          </tr>
                          <tr>
                               <td class="tdbg1">开启后台整合:</td>
                               <td class="tdbg2"><asp:RadioButtonList ID="EnableAdminInterfaceRadio" runat="server" 
                                     SelectedValue='<%# Bind("EnableAdminInterface") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                                   </asp:RadioButtonList>                               
                              </td>
                          </tr>
                          <tr>
                               <td class="tdbg1">关闭同步注册:</td>
                               <td class="tdbg2"><asp:RadioButtonList ID="RegCloseRadio" runat="server" 
                                     SelectedValue='<%# Bind("RegClose") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                          <tr>
                               <td class="tdbg1"> 关闭同步登录:</td>
                               <td class="tdbg2"><asp:RadioButtonList ID="LoginCloseRadio" runat="server" 
                                     SelectedValue='<%# Bind("LoginClose") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                          <tr>
                               <td class="tdbg1">是否为跨域名接口:</td>
                               <td class="tdbg2"><asp:RadioButtonList ID="CrossDomain" runat="server" 
                                     SelectedValue='<%# Bind("CrossDomain") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                          <tr>
                               <td colspan="2" align="center"> 
                               <asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="插入"/>                              
                                <asp:Button ID="ImageButton3" runat="server" CommandName="Cancel" OnClientClick="window.close();" CausesValidation="false" Text="取消"  />
                              </td>                               
                          </tr>  
                      </InsertItemTemplate>
                      <EditItemTemplate>
                            <tr>
                                <td width="20%" class="tdbg1"> 接口ID:</td>
                                <td width="80%" class="tdbg2"> <%# Eval("InterfaceID") %></td>
                            </tr>
                            <tr>
                                <td class="tdbg1">接口系统名称: </td>
                                <td class="tdbg2"><asp:TextBox ID="InterfaceNameTextBox" runat="server" Text='<%# Bind("InterfaceName") %>' Width="70%" CssClass="text_area" />
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="InterfaceNameTextBox" ErrorMessage="请填写系统名称"></asp:RequiredFieldValidator>
                               </td>
                            </tr>
                            <tr>
                                <td class="tdbg1">系统版本: </td>
                                <td class="tdbg2"><asp:TextBox ID="Version" runat="server" Text='<%# Bind("Version") %>' Width="70%" CssClass="text_area" /></td>
                            </tr>
                            <tr>
                                <td class="tdbg1">接口更新日期: </td>
                                <td class="tdbg2"><asp:TextBox ID="UpdateTime" runat="server" Text='<%# Bind("UpdateTime") %>' Width="70%" CssClass="text_area" />
                                <asp:RequiredFieldValidator runat="server" ID="gh" ControlToValidate="UpdateTime" ErrorMessage="请填写更新日期"></asp:RequiredFieldValidator>
                               </td>
                            </tr>
                            <tr>
                                <td class="tdbg1">前台接口路径 : </td>
                                <td class="tdbg2"><asp:TextBox ID="InterfaceFrontUrlTextBox" runat="server" Text='<%# Bind("InterfaceFrontUrl") %>' Width="70%"  CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help3');" onmouseout="hidenHelp('help3');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
                            </tr>
                           <tr>
                               <td class="tdbg1">后台接口路径 :</td>
                               <td class="tdbg2"><asp:TextBox ID="InterfaceAdminUrlTextBox" runat="server" Text='<%# Bind("InterfaceAdminUrl") %>' Width="70%" CssClass="text_area" /></td>
                          
                          </tr>
                           <tr>
                               <td class="tdbg1">后台登录帐号 :</td>
                               <td class="tdbg2"><asp:TextBox ID="AdminLoginUrl" runat="server" Text='<%# Bind("AdminLoginUrl") %>' Width="70%" CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help2');" onmouseout="hidenHelp('help2');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
                          </tr>
                           <tr>
                               <td class="tdbg1">后台登录密码 :</td>
                               <td class="tdbg2"><asp:TextBox ID="AdminLoginPass" runat="server" OnDataBinding="ReplacePassWord" Text='<%# Bind("AdminLoginPassword") %>' Width="70%" CssClass="text_area" /> 不修改请留空。</td>
                          </tr>
                          <tr>
                              <td class="tdbg1">后台打开方式</td>
                              <td class="tdbg2"><asp:RadioButtonList ID="AdminLoginOpenType" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Bind("AdminLoginOpenType") %>'>
                                       <asp:ListItem Text="新窗口" Value="0" />
                                       <asp:ListItem Text="原窗口" Value="1" Selected="True"/>
                                    </asp:RadioButtonList></td>
                          </tr>        
                          <tr>
                               <td class="tdbg1">该系统会员中心路径 :</td>
                               <td class="tdbg2"><asp:TextBox ID="UserCenterUrl" runat="server" Text='<%# Bind("UserCenterUrl") %>' Width="70%" CssClass="text_area" />&nbsp;<a href="#"  onmouseover="showHelp('help1');" onmouseout="hidenHelp('help1');" ><img src="../IMS_Img/smallIcon/tooltip.png" border="0" /></a></td>
                          
                          </tr>
                          <tr>
                               <td class="tdbg1">系统字符编码 :</td>
                               <td class="tdbg2">
                               <asp:DropDownList ID="CodePage" runat="server" SelectedValue='<%# Bind("CodePage") %>' >
                                   <asp:ListItem Text="gb2312" Value="gb2312"></asp:ListItem>
                                   <asp:ListItem Text="utf-8" Value="utf-8"></asp:ListItem>
                                   <asp:ListItem Text="默认" Value=""></asp:ListItem>
                               </asp:DropDownList>可以向程序提供商联系获知，默认值为GB2312。
                               </td>
                          </tr>
                           <tr>
                               <td class="tdbg1">开启前台整合:</td>
                               <td class="tdbg2"><asp:RadioButtonList ID="EnableFrontInterfaceRadio" runat="server"
                                     SelectedValue='<%# Bind("EnableFrontInterface") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>
                               </td>
                          </tr>
                          <tr>
                               <td class="tdbg1">开启后台整合:</td>
                               <td class="tdbg2"><asp:RadioButtonList ID="EnableAdminInterfaceRadio" runat="server" 
                                     SelectedValue='<%# Bind("EnableAdminInterface") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                               
                              </td>
                          </tr>
                          <tr>
                               <td class="tdbg1">关闭同步注册:</td>
                               <td class="tdbg2"><asp:RadioButtonList ID="RegCloseRadio" runat="server" 
                                     SelectedValue='<%# Bind("RegClose") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                          <tr>
                               <td class="tdbg1">关闭同步登录:</td>
                               <td class="tdbg2"><asp:RadioButtonList ID="LoginCloseRadio" runat="server" 
                                     SelectedValue='<%# Bind("LoginClose") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                           <tr>
                               <td class="tdbg1"> 是否为跨域名接口:</td>
                               <td class="tdbg2"><asp:RadioButtonList ID="CrossDomain" runat="server" 
                                     SelectedValue='<%# Bind("CrossDomain") %>' RepeatDirection="Horizontal">
                                       <asp:ListItem Value="0">否</asp:ListItem>
                                       <asp:ListItem Value="1">是</asp:ListItem>
                                   </asp:RadioButtonList>                                
                               </td>
                          </tr>
                          <tr>
                              <td colspan="2" align="center"> 
                                  <asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                                   Text="修改"/>                                  
                                  <asp:Button ID="UpdateCancelButton" OnClientClick="window.close();" runat="server" CausesValidation="False" CommandName="Cancel"
                                    Text="取消"/>                                   
                               </td>
                          </tr>
                      </EditItemTemplate>                      
                      <FooterTemplate>
                      </table>
                      </FooterTemplate>
                      <PagerSettings Mode="NumericFirstLast" />                     
                      <RowStyle Font-Size="Large" />
                      <PagerStyle Font-Size="Large" Font-Strikeout="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                      
                  </asp:FormView> 
           
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DelInterface"
        InsertMethod="AddInterface" SelectMethod="GetInterfaceByInterfaceID" TypeName="InterfaceBLL"
        UpdateMethod="UpdateInterface"  OnInit="ObjectDataSource1_Init1" OnUpdating="FormView1_ItemUpdating">
        <DeleteParameters>
            <asp:Parameter Name="InterfaceID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="InterfaceID" Type="Int32" />
            <asp:Parameter Name="EnableAdminInterface" Type="Int32" />
            <asp:Parameter Name="EnableFrontInterface" Type="Int32" />
            <asp:Parameter Name="AdminLoginOpenType" Type="Int32" />
            <asp:Parameter Name="AdminLoginPassword" Type="String" />
            <asp:Parameter Name="AdminLoginUrl" Type="String" />
            <asp:Parameter Name="InterfaceAdminUrl" Type="String" />
            <asp:Parameter Name="InterfaceFrontUrl" Type="String" />
            <asp:Parameter Name="InterfaceName" Type="String" />
            <asp:Parameter Name="InterfaceType" Type="Int32" />
            <asp:Parameter Name="CodePage" Type="String" />
            <asp:Parameter Name="LoginClose" Type="Int32" />
            <asp:Parameter Name="RegClose" Type="Int32" />
            <asp:Parameter Name="UpdateTime" Type="DateTime" />
            <asp:Parameter Name="Version" Type="String" />
            <asp:Parameter Name="CrossDomain" Type="Int32" />
            <asp:Parameter Name="UserCenterUrl" Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="InterfaceID" QueryStringField="InterfaceID" Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="EnableAdminInterface" Type="Int32" />
            <asp:Parameter Name="EnableFrontInterface" Type="Int32" />
            <asp:Parameter Name="AdminLoginOpenType" Type="Int32" />
            <asp:Parameter Name="AdminLoginPassword" Type="String" />
            <asp:Parameter Name="AdminLoginUrl" Type="String" />
            <asp:Parameter Name="InterfaceAdminUrl" Type="String" />
            <asp:Parameter Name="InterfaceFrontUrl" Type="String" />
            <asp:Parameter Name="InterfaceName" Type="String" />
            <asp:Parameter Name="InterfaceType" Type="Int32" />
            <asp:Parameter Name="CodePage" Type="String" />
            <asp:Parameter Name="LoginClose" Type="Int32" />
            <asp:Parameter Name="RegClose" Type="Int32" />
            <asp:Parameter Name="UpdateTime" Type="DateTime" />
            <asp:Parameter Name="Version" Type="String" />
            <asp:Parameter Name="CrossDomain" Type="Int32" />
            <asp:Parameter Name="UserCenterUrl" Type="String" />
        </InsertParameters>
    </asp:ObjectDataSource>
    </form>
    
     <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'">
        添加会员地址用于在首页显示该系统的会员页面，不填则显示空白页面。 
     </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'">
        填写该系统的管理员帐号和密码用于该系统的后台整合，不填则后台整合不起作用。
     </div>
     <div id="help3" 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'">
        需要填写接口的完整URL路径，如http://域名/interface.asp 请不要填写相对路径
     </div>
</body>
</html>
