<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_UserSynchron, HoWaveVGO" title="用户数据同步" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" ></asp:ScriptManager>
<script type="text/javascript">
function SelectDBType(ctlname)
{
 var obj1=document.getElementById(ctlname+"_0");
 var obj2=document.getElementById(ctlname+"_1");
 if(obj1.checked)
 {
   document.getElementById("AccessDB").style.display="none";
   document.getElementById("SqlDB").style.display="";
 }
 else if(obj2.checked)
 {
   document.getElementById("AccessDB").style.display="";
   document.getElementById("SqlDB").style.display="none";
 } 
}
</script>
<script type="text/javascript" src="Js/Function.js"></script>   
<table class="adminheading">
     <tr>
          <th class="cpanel">用户数据同步</th>                 
     </tr>
  </table> 
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"  SelectMethod="GetInterfaceNameID" TypeName="InterfaceBLL"/>
   
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<FIELDSET class="FieldSetStlye"><asp:Wizard id="UserSynchroSet" runat="server" FinishCompleteButtonText="" SideBarStyle-Width="15%" StepStyle-VerticalAlign="Top" Width="100%" ActiveStepIndex="0">
<StepStyle HorizontalAlign="Center" VerticalAlign="Top"></StepStyle>

<SideBarStyle Width="15%" HorizontalAlign="Center" VerticalAlign="Top"></SideBarStyle>
<StepNavigationTemplate>
            
        
</StepNavigationTemplate>
<WizardSteps>
<asp:WizardStep runat="server" ID="step1" Title="阅读转换说明"><TABLE class="UserSynchronTable" cellSpacing=1 cellPadding=3 width="100%"><TBODY><TR bgColor=#185195><TD colSpan=2 height=2></TD></TR><TR bgColor=#e9effc><TD style="WIDTH: 80%"><DIV align=center>恒浪整合V5.0用户表转移程序</DIV></TD><TD style="WIDTH: 58px"><DIV align=center><A href="http://bbs.howave.net" target="_blank">官方论坛</A></DIV></TD></TR><TR align="middle" bgColor=#ffffff><TD align=left colSpan=2><OL start=1><LI><STRONG>阅读转移说明</STRONG></LI><LI>选择源系统及目的系统 此转换程序为一对多的程序，在转换过程中一定要保证所有系统都有用户数据才能同步！ </LI><LI>设置源数据库地址和目的数据库地址</LI><LI>设置源数据库转移字段和目的数据库转移字段</LI><LI>执行转换</LI><LI>成功（错误）提示</LI></OL></TD></TR><TR align=center bgColor=#ffffff><TD align=left colSpan=2><LI><STRONG>　　转移说明</STRONG></LI><OL start=1><LI>此程序主要实现了恒浪数据库用户表与其它系统用户表互相转移的功能</LI><LI>使用此程序之前必须确认，您所用的恒浪数据库用户表为官方原版,并看清楚转换操作说明</LI><LI>转换之前请备份好目的数据库，如果转换失败请查看出错提示进行下一步的工作</LI><LI>此程序并不保证转换100%成功，对于使用此程序后出现的问题，官方不承担一切责任</LI></OL></TD></TR></TBODY></TABLE><BR /><asp:GridView runat="server" DataSourceID="ObjectDataSource2" ID="GridView2" AutoGenerateColumns="False" AllowPaging="True" __designer:wfdid="w102"><Columns>
<asp:BoundField DataField="TransferID" HeaderText="ID"></asp:BoundField>
<asp:TemplateField HeaderText="转换名称"><ItemTemplate>
恒浪V5.0<asp:Label id="TransferType" runat="server" __designer:wfdid="w103" Text='<%# ((Eval("TransferType").ToString())=="1")?"--->":"<---" %>'></asp:Label><asp:Label id="TransferName" runat="server" __designer:wfdid="w104" Text='<%#Eval("InterfaceName") %>'></asp:Label> 
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="操作"><ItemTemplate>
                            <asp:Button ID="Modify" runat="server" Text="修改转换设置"  CommandName='<%# Eval("TransferID")+"|Modify" %>' OnCommand="TransferAction"/>
                            <asp:Button ID="Button1" runat="server" Text="修改转换参数"  CommandName='<%# Eval("TransferID")+"|ModifyParam" %>' OnCommand="TransferAction"/>
                            <asp:Button ID="Delete" runat="server" Text="删除" CommandName='<%# Eval("TransferID")+"|Delete" %>' OnCommand="TransferAction" OnClientClick ="return confirm('将删除转换设置和转换字段，确定要删除?');"/>
                            <asp:Button ID="Transfer" runat="server" Text="转换" CommandName='<%# Eval("TransferID")+"|Transfer" %>' OnCommand="TransferAction"/>
                         
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
 </asp:WizardStep>
<asp:WizardStep runat="server" ID="step2" Title="设置数据库"><TABLE class="UserSynchronTable" cellSpacing=1 cellPadding=3 width="100%"><TBODY><TR><TD><TABLE width="100%" bgColor=white border=0><TBODY><TR bgColor=#e9effc><TD align=left width="50%">选择转换形式</TD><TD><asp:RadioButtonList runat="server" RepeatDirection="Horizontal" ID="TransferType" __designer:wfdid="w75"><asp:ListItem Text="从恒浪导入该系统" Selected="True" Value="1"></asp:ListItem>
<asp:ListItem Text="从该系统导入恒浪" Value="2"></asp:ListItem>
</asp:RadioButtonList>
 </TD></TR></TBODY></TABLE></TD></TR><TR><TD><TABLE width="100%" bgColor=white border=0><TBODY><TR bgColor=#e9effc><TD align=center colSpan=4>选择转换系统</TD></TR><TR><TD align=left width="20%">转换系统:</TD><TD align=left width="30%"><asp:DropDownList runat="server" DataSourceID="ObjectDataSource1" AppendDataBoundItems="True" DataValueField="InterfaceID" ID="InterfaceID" DataTextField="InterfaceName" __designer:wfdid="w76"></asp:DropDownList>
 </TD><TD align=left colSpan=2></TD></TR></TBODY></TABLE></TD></TR><TR><TD><TABLE width="100%" bgColor=white border=0><TBODY><TR bgColor=#e9effc><TD align=center colSpan=6>转换用户数据表设置</TD></TR><TR><TD align=left width="50%"><TABLE width="100%" border=0><TBODY><TR><TD align=left width="40%">转换数据库表名</TD><TD align=left><asp:TextBox runat="server" Text="PE_User" ID="TransferTableName" __designer:wfdid="w77"></asp:TextBox>
 </TD></TR></TBODY></TABLE></TD><TD align=left><A onmouseover="showHelp('help1');" onmouseout="hidenHelp('help1');" href="#"><IMG src="../IMS_Img/smallIcon/tooltip.png" border=0 /></A></TD></TR><TR><TD align=left width="50%"><TABLE width="100%" border=0><TBODY><TR><TD align=left width="40%">表ID字段名</TD><TD align=left><asp:TextBox runat="server" Text="userid" ID="Other_UserID" __designer:wfdid="w78"></asp:TextBox>
 </TD></TR></TBODY></TABLE></TD><TD align=left><A onmouseover="showHelp('help3');" onmouseout="hidenHelp('help3');" href="#"><IMG src="../IMS_Img/smallIcon/tooltip.png" border=0 /></A> </TD></TR><TR><TD align=left width="50%"><TABLE width="100%" border=0><TBODY><TR><TD align=left width="40%">表用户UserName字段名</TD><TD align=left><asp:TextBox runat="server" Text="UserName" ID="Other_UserName" __designer:wfdid="w79"></asp:TextBox>
 </TD></TR></TBODY></TABLE></TD><TD align=left><A onmouseover="showHelp('help2');" onmouseout="hidenHelp('help2');" href="#"><IMG src="../IMS_Img/smallIcon/tooltip.png" border=0 /></A></TD></TR></TBODY></TABLE></TD></TR><TR><TD><TABLE width="100%" bgColor=white border=0><TBODY><TR bgColor=#e9effc><TD align=center colSpan=2>数据库类型及路径设置</TD></TR><TR><TD vAlign=top width="50%"><TABLE width="100%" border=0><TBODY><TR><TD align=left width="40%">转换系统的数据库类型</TD><TD align=left><asp:RadioButtonList runat="server" RepeatDirection="Horizontal" ID="DBType" __designer:wfdid="w80"><asp:ListItem Text="MS SQL" Value="SQL"></asp:ListItem>
<asp:ListItem Text="Access" Selected="True" Value="Access"></asp:ListItem>
</asp:RadioButtonList>
 </TD></TR><TR id="AccessDB"><TD align=left width="40%">Access数据库相对路径</TD><TD align=left><asp:TextBox runat="server" Width="90%" Text="data/data.mdb" ID="AccessPath" __designer:wfdid="w81"></asp:TextBox>
 <A onmouseover="showHelp('help4');" onmouseout="hidenHelp('help4');" href="#"><IMG src="../IMS_Img/smallIcon/tooltip.png" border=0 /></A></TD></TR><TR style="DISPLAY: none" id="SqlDB"><TD style="HEIGHT: 159px" colSpan=2><TABLE width="100%" border=0><TBODY><TR><TD align=left width="40%">数据库服务器</TD><TD align=left><asp:TextBox runat="server" Text="localhost" ID="Sql_Source" __designer:wfdid="w82"></asp:TextBox>
 </TD></TR><TR><TD align=left>数据库名</TD><TD align=left><asp:TextBox runat="server" Text="Howave" ID="Sql_Name" __designer:wfdid="w83"></asp:TextBox>
 </TD></TR><TR><TD align=left>登录帐号</TD><TD align=left><asp:TextBox runat="server" Text="sa" ID="Sql_user" __designer:wfdid="w84"></asp:TextBox>
 </TD></TR><TR><TD align=left>登录密码</TD><TD align=left><asp:TextBox runat="server" ID="Sql_Pass" TextMode="Password" __designer:wfdid="w85"></asp:TextBox>
 </TD></TR></TBODY></TABLE><asp:Label runat="server" ID="ErrMessages" __designer:wfdid="w86"></asp:Label>
 </TD></TR></TBODY></TABLE></TD><TD vAlign=top width="50%"><asp:Label runat="server" CssClass="ErrMessageStyle" ID="Message1" __designer:wfdid="w87"></asp:Label>
 </TD></TR></TBODY></TABLE></TD></TR><TR><TD><TABLE width="100%" bgColor=white border=0><TBODY><TR bgColor=#e9effc><TD align=left width="50%">遇到相同用户名时处理方式</TD><TD><asp:RadioButtonList runat="server" SelectedValue='<%# Bind("JumpUser") %>' RepeatDirection="Horizontal" ID="JumpUser" __designer:wfdid="w88"><asp:ListItem Text="用户名加随机数字" Value="1"></asp:ListItem>
<asp:ListItem Text="跳过" Selected="True" Value="2"></asp:ListItem>
</asp:RadioButtonList>
 </TD></TR></TBODY></TABLE></TD></TR><TR><TD><TABLE width="100%" bgColor=white border=0><TBODY><TR bgColor=#e9effc><TD align=left width="50%">当目标系统的ID字段不是自动递增请勾选</TD><TD><asp:CheckBox runat="server" ID="AutoID" __designer:wfdid="w89"></asp:CheckBox>
 (若转换系统为动易请勾选)</TD></TR></TBODY></TABLE></TD></TR><TR><TD><TABLE width="100%" bgColor=white border=0><TBODY><TR bgColor=#e9effc><TD align=left width="50%">该系统采用MD5加密位数</TD><TD><asp:DropDownList runat="server" ID="Md5Size" __designer:wfdid="w90"><asp:ListItem Text="16位" Selected="True" Value="16"></asp:ListItem>
<asp:ListItem Text="32位" Value="32"></asp:ListItem>
</asp:DropDownList>
 </TD></TR></TBODY></TABLE></TD></TR><TR><TD><TABLE width="100%" bgColor=white border=0><TBODY><TR bgColor=#e9effc><TD align=left width="50%">设置转换起始数量</TD><TD>起始ID<asp:TextBox runat="server" Width="60px" Text="0" ID="StartID" __designer:wfdid="w91"></asp:TextBox>
 结束ID<asp:TextBox runat="server" Width="60px" Text="0" ID="EndID" __designer:wfdid="w92"></asp:TextBox>
 <BR /><SPAN style="COLOR: red">若起始ID和结束ID均为0则表示转换全部的用户</SPAN> </TD></TR></TBODY></TABLE></TD></TR><TR><TD align=right><asp:Button runat="server" ID="SychroSetButton" Text="下一步" __designer:wfdid="w93" OnClick="SychroSetButton_Click"></asp:Button>
 </TD></TR></TBODY></TABLE></asp:WizardStep>
<asp:WizardStep runat="server" ID="step3" Title="设置转换字段"><asp:HiddenField runat="server" ID="TransferIDValue" __designer:wfdid="w94"></asp:HiddenField>
 <TABLE class="UserSynchronTable" cellSpacing=1 cellPadding=3 width="100%"><TBODY><TR bgColor=#185195><TD height=2></TD></TR><TR bgColor=#e9effc><TD align=center>转换字段设置</TD></TR><TR><TD><TABLE width="100%" bgColor=white border=0><TBODY><TR bgColor=#e9effc><TD style="WIDTH: 25%" align=center>恒浪OMSV5.0数据表字段</TD><TD style="WIDTH: 25%" align=center>转移数据表字段</TD><TD style="WIDTH: 25%" align=center>该字段在此系统的默认值</TD><TD style="WIDTH: 25%" align=center></TD></TR><TR><TD style="WIDTH: 25%" align=center><asp:DropDownList runat="server" AppendDataBoundItems="True" ID="HowaveDataTable" __designer:wfdid="w95"><asp:ListItem Text="其它" Value="DefaultValue|default"></asp:ListItem>
</asp:DropDownList>
 </TD><TD style="WIDTH: 25%" align=center><asp:DropDownList runat="server" ID="OtherTable" __designer:wfdid="w96"></asp:DropDownList>
 </TD><TD style="WIDTH: 25%" align=center><asp:TextBox runat="server" ID="DefaulValue" __designer:wfdid="w97"></asp:TextBox>
 </TD><TD style="WIDTH: 25%" align=center><asp:Button runat="server" ID="TransferSave" Text="保存添加字段" __designer:wfdid="w98" OnClick="TransferSaveButton_Click"></asp:Button>
 </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><asp:GridView runat="server" ID="GridView1" Width="100%" AutoGenerateColumns="False" DataKeyNames="TransferFieldID" __designer:wfdid="w99" OnRowDeleting="GridView1_RowDeleting"><Columns>
<asp:BoundField DataField="HLFieldName" HeaderText="恒浪字段/字段类型">
<HeaderStyle Width="25%"></HeaderStyle>
</asp:BoundField>
<asp:BoundField DataField="FieldName" HeaderText="目标系统字段/字段类型">
<HeaderStyle Width="25%"></HeaderStyle>
</asp:BoundField>
<asp:BoundField DataField="DefaultValue" HeaderText="默认值">
<HeaderStyle Width="25%"></HeaderStyle>
</asp:BoundField>
<asp:TemplateField HeaderText="删除">
<ItemStyle Width="25%"></ItemStyle>
<ItemTemplate>
 <asp:Button id="btnDelete" runat="server" OnClientClick ="return confirm('您真的要删除?');" CommandName="Delete" Text="删除" CommandArgument='<% Bind("TransferFieldID") %>'></asp:Button> 
 
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
 <DIV style="WIDTH: 98%; TEXT-ALIGN: right"><asp:Button runat="server" ID="Button1" Text="下一步" __designer:wfdid="w100" OnClick="SaveSynchronField"></asp:Button>
 </DIV><DIV style="TEXT-ALIGN: left"><B>转换字段说明：</B><BR /><UL><LI>UserID字段不需要设置保存，因为UserID字段一般是默认递增</LI><LI>当从恒浪V5.0同步到其它系统时，在恒浪没有对应该系统字段或者需要在转换中设置该系统某些字段对应值，则可以从恒浪设置中选择“其它”一项，并填入默认值</LI><LI>例如：从恒浪转BBS论坛，需要设置会员的默认等级Group为1,则只需设置恒浪字段为“其它”BBS字段为"Group"，默认值为1，点击保存即可</LI></UL></DIV></asp:WizardStep>
</WizardSteps>
</asp:Wizard>  
</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>
    <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>UserName</li><li><b>OBLOG4.0：</b>username</li><li><b>创力：</b>UserName</li><li><b>BBSXP7：</b>UserName</li></ul>   
     </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>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><li><b>BBSXP7：</b>BBSXP_Users</li></ul>   
   </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'">
      <ul>
         <li><b>动易2006：</b>UserID</li><li><b>动网7.1：</b>UserID</li><li><b>OBLOG4.0：</b>userid</li><li><b>创力：</b>UserID</li><li><b>BBSXP7：</b>ID</li></ul>   
   </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>相对当前目录路径：</b>如在上一级目录需要在前面添加"../"</li><li><b>例如：</b>网站路径为http://www.howave.com/cms/database/data.mdb,Accees路径为"../cms/database/data.mdb"</li></ul>   
   </div>
<asp:HiddenField ID="SQLPassword" runat="server" />   
<asp:HiddenField ID="ConnectionString" runat="server" />
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetTransferSet"
        TypeName="HowaveTransferSet"/>
     
</asp:Content>

