<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="databaseopr.aspx.cs" Inherits="Us.Web.admin.database.databaseopr" %>


<!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 id="Head1" runat="server">
    <title>数据库操作</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <asp:Literal ID="litregscript" runat="server" Text=""></asp:Literal>

    <link href="../style/default/style.css" rel="stylesheet" type="text/css" />
<%=ImportScriptStr %>
</head>
<body>
    <form id="Form1" method="post" runat="server">
    
      
    
            <div id="tbMain">
                <div class="divTbg">
                    <div class="divTbgL">
                    </div>
                    <div class="divTbgInfo">
                        <div class="divTbgTitle">
                            数据库操作</div>
                    </div>
                </div>
                <div class="divTbgF">
                </div>
                <div class="divTNavBG" id="topURL">
                    <ul id="topURLul">
                        <li class="divURLed" id="div1">
                            <div>
                                <img src="../style/green/images/mini_icons_046.gif" width="10" height="10" />
                                数据库操作</div>
                        </li>
                    </ul>
                </div>
                <div id="mypanel">
                    <div  id="ddiv1">
                        

                        <div class="divInfo">
  <div class="divInfoblack">
    <div class="divInfoTopList">
      <div class="listLeft">
        <div class="navtitle"> 数据库操作 </div>
      </div>
    </div>
  </div>
</div>


                        <div class="divInfo">
                            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tablist">
                                <tr class="tablisttr">
                                    <td width="100" align="center" class="tablisttitle">
                                        数据库初始化</td>
                                    <td class="tabmanagertr">
                                        <asp:CheckBoxList ID="chkSelect" runat="server" RepeatColumns="6" 
                                            RepeatDirection="Horizontal">                                        </asp:CheckBoxList>
                                            (初次使用可以初始化全部数据，以后使用不可以初始化，否则系统就清空数据了)                                    </td>
                                </tr>
                                <tr class="tablisttr">
                                    <td align="center" class="tablisttitle" width="100">
                                        操作密码</td>
                                    <td class="tabmanagertr">
                                        <asp:TextBox ID="txtPwd" runat="server" Width="100px"></asp:TextBox>
                                        <asp:Button ID="btnSQL" runat="server" AccessKey="C" CommandName="save" 
                                            CssClass="SkyButtonFocus" OnClick="btnSQL_Click" Text="提交(C)" />                                    </td>
                                </tr>
                                <tr class="tablisttr">
                                    <td align="center" class="tablisttitle" width="100">
                                       备份还原</td>
                                    <td class="tabmanagertr">
                                       （<a href="databaseopr2.aspx">备份还原数据库请点击这里</a>）,要求数据库服务器和网站服务器在一起才可以执行本操作；</td>
                                </tr>
                                <tr class="tablisttr">
                                  <td align="center" class="tablisttitle">数据同步</td>
                                  <td class="tabmanagertr">
                                        <asp:CheckBoxList ID="chkSelectAnsy" runat="server" RepeatColumns="6" 
                                            RepeatDirection="Horizontal">
                                            <asp:ListItem Value="DELETE FROM SKYSTUDENTRESULTS WHERE SKYDEPARTCOURSEID NOT IN (SELECT SKYDEPARTCOURSEID FROM SKYCLASSCOURSE)">同步课程和成绩</asp:ListItem>
                                            <asp:ListItem Value="DELETE FROM SKYCLASSCOURSE WHERE SKYCID NOT IN (SELECT SKYCID FROM SKYCLASS)">同步班级和课程</asp:ListItem>
                                            <asp:ListItem Value="DELETE FROM SKYCLASS WHERE SKYPID NOT IN (SELECT SKYPID FROM SKYPROFESSIONAL)">同步专业和班级</asp:ListItem>
                                            <asp:ListItem Value="DELETE FROM SKYPROFESSIONAL WHERE SKYDID NOT IN (SELECT SKYDID FROM SKYDEPARTMENT )">同步院系和专业</asp:ListItem>
                                            <asp:ListItem Value="DELETE FROM SKYSTUDENTRESULTS WHERE USERID NOT IN (SELECT USERID FROM SKYSTUDENT)">同步学生和成绩</asp:ListItem>
                                            <asp:ListItem Value="DELETE FROM  SKYHOUSEUSE WHERE USERID IN(SELECT USERID FROM SKYSTUDENT WHERE SSTATE='1')">同步毕业生寝室</asp:ListItem>
                                            
                                            
                                            
                                      </asp:CheckBoxList>
                                            </td>
                                </tr>
                                <tr class="tablisttr">
                                  <td align="center" class="tablisttitle">操作密码</td>
                                  <td class="tabmanagertr">
                                        <asp:TextBox ID="txtPwd0" runat="server"  Width="100px"></asp:TextBox>
                                        <asp:Button ID="btnSQLAnsy" runat="server" AccessKey="C" CommandName="save" 
                                            CssClass="SkyButtonFocus" OnClick="btnSQLAnsy_Click" Text="提交(T)" />                                    </td>
                                </tr>
                                <tr class="tablisttr">
                                    <td align="center" class="tablisttitle">
                                        &nbsp;</td>
                                    <td class="tabmanagertr">
                                        &nbsp;</td>
                                </tr>
                                <tr class="tablisttr">
                      <td align="center" class="tablisttitle" width="100">注意                                        </td>
                                    <td class="divnoadmin">
                                        下面的功能可以直接执行SQL语句；</td>
                                </tr>
                                <tr class="tablisttr">
                                    <td align="center" class="tablisttitle" width="100">
                                        数据库语句</td>
                                    <td class="tabmanagertr"><asp:TextBox ID="txtSQL" runat="server" Height="100px" TextMode="MultiLine" 
                                            Width="600px"></asp:TextBox>                                    </td>
                                </tr>
                                <tbody runat="server" id="TBodyDataBaseAccess" visible="true">
                                    <tr class="tablisttr">
                                        <td width="100" align="center" class="tablisttitle">
                                            操作状态                                        </td>
                                        <td class="tabmanagertr"><div style="color:Red">
                                            <asp:Literal ID="LiteralInfo" runat="server"></asp:Literal></div>                                        </td>
                                    </tr>
                                </tbody>
                                <tbody runat="server" id="TBodyDataBase" visible="false">
                                </tbody>
                          </table>
                        </div>
                    </div>
                </div>
                <div class="divSave">
                    <asp:Button ID="btnSubmit" runat="server" Text="执行(O)" CssClass="SkyButtonFocus"
                        OnClick="btnSubmit_Click" AccessKey="S" CommandName="save"></asp:Button>
                </div>
            </div>
       <div class="divInfo">
        
         <span class="usHelpMessage">* 注意事项： 批量修改学生和教师密码请点击<a href="/admin/export/exporuserspwd.aspx">[这里]</a>;
            </span>  
    </div>
    </form>
</body>
</html>
