<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="Admin_BackUpDB, HoWaveIMSV5.0" title="数据库管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
<script type="text/javascript" src="Js/Function.js"></script>   

<table class="adminheading">               
   <th valign="middle" class="menus" style="height: 54px; width: 629px;" align="left">备份数据库</th> 
</table>
  <fieldset  class="FieldSetStlye">
      <legend>数据库管理</legend>
          <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
             <ContentTemplate>
                <div id="backupdatabase">           
                   <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid 1px black">
                      <tr>
                         <td colspan="2" align="center" style="background-color:#3872B2; height:25px; color:White">备份数据库</td>                    
                      </tr>
                      <tr>
                         <td align="right" width="30%">备份目录：</td>
                         <td><asp:TextBox ID="BackUpDir" runat="server"  Text="DataBackUp" CssClass="text_area"/>
                             <a href="#"  onmouseover="showHelp('help1');" onmouseout="hidenHelp('help1');" ><img src="../Images/smallIcon/tooltip.png" border="0" /></a>
                         </td>
                      </tr>
                      <tr>
                         <td align="right">备份名称：</td>
                         <td>
                            <asp:TextBox ID="BackUpName" runat="server"   CssClass="text_area"/>
                            <a href="#"  onmouseover="showHelp('help2');" onmouseout="hidenHelp('help2');" ><img src="../Images/smallIcon/tooltip.png" border="0" /></a>
                     
                       </td>
                       </tr>
                       <tr>
                          <td colspan="2" align="center">
                            <br />
                            <asp:Label ID="lblbackup" runat="server" />
                           </td>
                      </tr>
                   </table>
                 </div>
             </ContentTemplate>
              <Triggers>
                  <asp:AsyncPostBackTrigger ControlID="Btn_BackUp" EventName="Click" />                 
              </Triggers>
         </asp:UpdatePanel>
          <div align="center"><asp:Button ID="Btn_BackUp" runat="server" OnClick="Btn_BackUp_Click"  Text="开始备份"  /></div>
          <br /><br />
         <div id="restoredatabase">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid 1px black">
                 <tr>
                    <td colspan="2" align="center" style="background-color:#3872B2; height:25px; color:White">恢复数据库</td>                    
                 </tr>
                 <tr>
                    <td align="right" width="30%">原备份数据库路径：</td>
                    <td><asp:TextBox ID="RestoreDBName" runat="server"  Text="DataBackUp\HowaveV5.0.bak" Width="300px" CssClass="text_area"/>
                        <a href="#"  onmouseover="showHelp('help3');" onmouseout="hidenHelp('help3');" ><img src="../Images/smallIcon/tooltip.png" border="0" /></a>
                        
                    </td>
                 </tr>                                
                 <tr>
                    <td colspan="2" align="center">
                       <asp:Label ID="lblRestore" runat="server" />
                       <br />
                       <asp:Button ID="Btn_RestoreDB" runat="server" OnClick="Btn_RestoreDB_Click"  Text="开始恢复"/>
                    </td>
                 </tr>
           </table>
         </div>
          <br /><br />
         <div id="Div1">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid 1px black">
                 <tr>
                    <td colspan="2" align="center" style="background-color:#3872B2; height:25px; color:White">压缩数据库</td>                    
                 </tr>                                 
                 <tr>
                    <td colspan="2" align="center">
                       <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" >
                          <ContentTemplate>
                            <asp:Label ID="lblcompact" runat="server" />
                          </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="Btn_CompactDB" EventName="Click" />                 
                            </Triggers>
                       </asp:UpdatePanel>  
                       <br />
                       <asp:Button ID="Btn_CompactDB" runat="server" OnClick="Btn_CompactDB_Click"  Text="开始压缩"/>
                    </td>
                 </tr>
           </table>
         </div>
  </fieldset>
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
    <ProgressTemplate>
       <div class="wait">
         <img src="../Images/wait.gif" align="middle"/>请稍等...
        </div>
     </ProgressTemplate>
</asp:UpdateProgress>
 <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>1：</b>请填写文件夹名，如文件夹不存在，将自动创建</li>
         <li><b>2：</b>默认备份文件夹为“安装文件目录\DataBackUp\备份文件.bak</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>必须输入文件名后缀（如“.bak”若不想别人可以下载可以输入".config"）。如有同名文件，将覆盖</li>
         <li>请输入一个不规则的数据库名称如"pJf98SF21"以防被人下载，并牢记该备份名，若留空则为随机文件名</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>请输入要恢复的数据库备份文件的相对路径</li>
         <li>请不要漏掉文件的后缀名".bak"，否则不能恢复</li>
         <li>默认备份文件夹为“安装文件目录\DataBackUp\备份文件.bak</li>
         <li>恢复完之后请不要在该页面刷新，否则会再进行一次恢复。</li>
         <li>恢复完点其它页面可能会出现“共享内存出错”这是正常的，只要再重新刷新一次页面就恢复正常</li>               
      </ul>   
   </div>
</asp:Content>

