<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="PasswordStrength_Admin_AdminPassword, HoWaveIMSV5.0" title="管理员密码修改" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />

<script src="Js/tabpane.js"  type="text/javascript"></script> 
 <fieldset style=" margin:5px" >
<table class="adminheading">                       
   <tr>
      <th class="user" nowrap="nowrap">
         管理员管理</th>
   </tr>                        
</table>
     <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAdminByAdminID" TypeName="AdminBLL" UpdateMethod="UpdateAdmin" OnUpdating="ObjectDataSource1_Updating" OnUpdated="ObjectDataSource1_Updated">         
         <SelectParameters>
             <asp:QueryStringParameter DefaultValue="0" Name="AdminID" QueryStringField="Admin_ID"
                 Type="Int32" />
         </SelectParameters>
         <UpdateParameters>
             <asp:Parameter Name="Admin_ID" Type="Int32" />
             <asp:Parameter Name="UserName" Type="String" />
             <asp:Parameter Name="Password" Type="String" />            
             <asp:Parameter Name="LastLoginIP" Type="String" />            
             <asp:Parameter Name="LastLogin" Type="DateTime" />
         </UpdateParameters>
     </asp:ObjectDataSource>
  <div class="tab-page" id="AdminAdministrator">  
     <script type="text/javascript">
       var tabPane1 = new WebFXTabPane( document.getElementById( "AdminAdministrator" ), 1 )
    </script> 
     <asp:FormView ID="FormView1" runat="server" DataKeyNames="Admin_ID" DataSourceID="ObjectDataSource1" 
          DefaultMode="Edit" Width="100%">
            <InsertItemTemplate>
             UserName:
             <asp:TextBox ID="UserNameTextBox" runat="server" Text='<%# Bind("UserName") %>'>
             </asp:TextBox><br />
             PassWord:
             <asp:TextBox ID="PassWordTextBox" runat="server" Text='<%# Bind("PassWord") %>'>
             </asp:TextBox><br />
             Access:
             <asp:TextBox ID="AccessTextBox" runat="server" Text='<%# Bind("Access") %>'>
             </asp:TextBox><br />
             LastLogin:
             <asp:TextBox ID="LastLoginTextBox" runat="server" Text='<%# Bind("LastLogin") %>'>
             </asp:TextBox><br />
             LastLoginIP:
             <asp:TextBox ID="LastLoginIPTextBox" runat="server" Text='<%# Bind("LastLoginIP") %>'>
             </asp:TextBox><br />
             LoginTimes:
             <asp:TextBox ID="LoginTimesTextBox" runat="server" Text='<%# Bind("LoginTimes") %>'>
             </asp:TextBox><br />
             AcceptIP:
             <asp:TextBox ID="AcceptIPTextBox" runat="server" Text='<%# Bind("AcceptIP") %>'>
             </asp:TextBox><br />
             <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                 Text="插入">
             </asp:LinkButton>
             <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                 Text="取消">
             </asp:LinkButton>
         </InsertItemTemplate> 
          
         <EditItemTemplate>
         
              <div class="tab-page" id="chanagepwd">
                   <h2 class="tab">修改密码</h2>
                   <script type="text/javascript">
                         tabPane1.addTabPage( document.getElementById( "chanagepwd" ) );
                    </script>                   
                    <table width="100%" border="0" class="adminform">
                    <tr>
                      <td width="40%" align="right" class="text_area">管理员名</td>
                      <td width="60%" class="row0"><asp:Label ID="UserName" Text='<%# Bind("UserName") %>' runat="server" /></td>                      
                    </tr>
                    <tr>
                      <td align="right" class="text_area">请输入新密码</td>
                      <td> 
                      <asp:TextBox ID="PassWord1" runat="server" Text='<%# Bind("PassWord") %>' CssClass="text_area" TextMode="Password"/> <br />
                     
                     <ajaxToolkit:PasswordStrength ID="p1" runat="server"                                 
                                    DisplayPosition="RightSide" 
                                    TargetControlID="PassWord1"
                                    StrengthIndicatorType="BarIndicator" 
                                    PreferredPasswordLength="15" 
                                    HelpStatusLabelID="PassWordCheckHelp"                     
                                    BarIndicatorCssClass="BarIndicator_PasswordTextBox" 
                                    BarBorderCssClass="BarBorder_PasswordTextBox"                    
                                    MinimumNumericCharacters="1" 
                                    MinimumSymbolCharacters="1" 
                                    RequiresUpperAndLowerCaseCharacters="true" />
                            
                       </td>                      
                    </tr>
                    <tr>
                      <td align="right" class="text_area">密码强度</td>
                      <td class="row0">
                         <asp:Label ID="PassWordCheckHelp" runat="server" />
                         <asp:Label ID="Message" runat="server"/>
                      </td>                                 
                    </tr>
                    <tr>
                      <td align="right" class="text_area">确认密码</td>
                      <td class="row0">
                          <asp:TextBox ID="PassWord2" runat="server" CssClass="text_area" TextMode="Password"/>
                           <asp:CompareValidator ID="CompareValidator1" runat="server" 
                                ControlToValidate="PassWord2" 
                                ControlToCompare="PassWord1"
                                Operator="Equal"
                                ErrorMessage="密码不相同!"/>
                          <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="PassWord2"
                                ErrorMessage="请输入确认密码!" />                      
                      </td>
                    </tr>
                    <tr>
                       <td>&nbsp;</td>
                       <td>
                           <asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                              Text="更新"  />             
                           <asp:Button ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                             Text="取消"/>
                        </td>                       
                     </tr>
                  </table>
               </div>  
            </EditItemTemplate>  
         </asp:FormView>          
      </div>         
  </fieldset>
                
</asp:Content>

