<%@ Page Language="C#" MasterPageFile="~/MasterPages/DefaultContentMasterPage.master" Title="RH WEB | Home" Inherits="Default_aspx" CodeBehind="Default.aspx.cs" %>
<%@ Register Assembly="CECAM.ImageHandler.BI" Namespace="ImageHandler" TagPrefix="cc1" %>

<asp:Content ID="ConteudoSideBar1" ContentPlaceHolderID="ConteudoSideBar" runat="server">
    <asp:Login ID="Login1" runat="server" OnAuthenticate="Login1_Authenticate">
        <LayoutTemplate>
            <div class="login">
                <h4>Acesso</h4>
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <asp:Label runat="server" ID="UserNameLabel" CssClass="label" AssociatedControlID="UserName">Login</asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TextBox Width="130px" runat="server" ID="UserName" CssClass="TextBox" AccessKey="u" /></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:RequiredFieldValidator runat="server" ID="UserNameRequired" ControlToValidate="UserName" ValidationGroup="Login1" ErrorMessage="User Name is required." ToolTip="User Name	is required.">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label runat="server" ID="PasswordLabel" CssClass="label" AssociatedControlID="Password">Senha</asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TextBox Width="130px" runat="server" ID="Password" TextMode="Password" CssClass="TextBox" AccessKey="p" /></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:RequiredFieldValidator runat="server" ID="PasswordRequired" ControlToValidate="Password" ValidationGroup="Login1" ToolTip="Password is	required.">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label runat="server" ID="Label1" CssClass="label" AssociatedControlID="Password">Digite o texto da imagem abaixo</asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TextBox Width="130px" runat="server" ID="txtImagem" CssClass="TextBox" AccessKey="p" MaxLength="4" /></td>
                    </tr>
                    <tr>
                        <td>
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <cc1:wccIVal ID="wcValidation" runat="server" Visible="False" />
                            <asp:Image ID="imgvalidarTexto" runat="server" ImageUrl="~/controle/ImageHandler.ashx" />
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <asp:RequiredFieldValidator runat="server" ID="Requiredfieldvalidator1" ControlToValidate="txtImagem" ValidationGroup="Login1" ToolTip="Digite o texto conforme a imagem">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td>
                            <div>
                                <asp:CheckBox runat="server" ID="RememberMe" Text="Lembrar a senha" />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:ImageButton runat="server" ID="LoginButton" CommandName="Login" AlternateText="login" SkinID="login" CssClass="button" OnClick="LoginButton_Click" /><p style="color: red">
                                <asp:Literal runat="server" ID="FailureText" EnableViewState="False"></asp:Literal>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                    </tr>
                    <tr>
                        <td>
                            <hr />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <b>
                                <asp:LinkButton runat="server" ID="lnkValidar" Text="Validar Autenticidade de Holerite" PostBackUrl="~/asp/ValidaHollerith.aspx"></asp:LinkButton>
                            </b>
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <b>
                                <asp:LinkButton runat="server" ID="lnkValidarInforme" Text="Validar Informe de Rendimentos" PostBackUrl="~/asp/ValidaInforme.aspx"></asp:LinkButton>
                            </b>
                        </td>
                    </tr>
                </table>
            </div>
        </LayoutTemplate>
    </asp:Login>
</asp:Content>

<asp:Content ID="ConteudoCorpo1" ContentPlaceHolderID="ConteudoCorpo" runat="server">
    <asp:ScriptManager id="ScriptManager1" runat="server"></asp:ScriptManager>
    <h3>Bem-vindo ao RH WEB</h3>
    <table border="0" cellpadding="2" cellspacing="0" style="width: 400px">
        <tr>
            <td colspan="4" style="height: 15px; width: 400px;">
                <asp:Label ID="Desc_BemVindo" runat="server" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="4" style="height: 25px"></td>
        </tr>
        <tr>
            <td colspan="4">
                <hr />
            </td>
        </tr>
        <%--        <tr>
            <td colspan="4"><h4>Manuais</h4></td>
        </tr>
        <tr>
            <td colspan="4">
                <asp:Label ID="Desc_Manuais" runat="server" Text="Label"></asp:Label></td>
        </tr>
        <tr>
            <td colspan="4" style="height:25px"></td>
        </tr>
        <tr>
            <td colspan="4"><a href="Para%20Instalar/Documentacao/ManualOperacionalRHWeb.pdf"
                    target="_blank">Manual do Hollerith WEB</a></td>
        </tr>
        <tr>
            <td colspan="4"><a href="Para%20Instalar/Documentacao/ManualOperacionalRHWeb.pdf"
                    target="_blank">Manual do Informe de Rendimentos</a></td>
        </tr>
        --%>
    </table>
    <br />
    <br />

    <asp:UpdatePanel id="uppAlterarSenha" runat="server" ChildrenAsTriggers="false" 
        UpdateMode="Conditional">
        <ContentTemplate>     
            <fieldset>
                <legend>Alterar Senha do Administrador
                </legend>
                <br />
                <table border="0" cellpadding="0" cellspacing="0" style="width: 400px" id="tbEdicaoAdmin" runat="server">
                    <tr>
                        <td style="height: 22px; width: 147px;">&nbsp;Login:</td>
                        <td style="height: 22px; width: 220px;">ADMIN</td>
                    </tr>
                    <tr>
                        <td style="height: 22px; width: 147px;">&nbsp;Nova Senha:</td>
                        <td style="height: 22px; width: 220px;">
                            <asp:TextBox ID="txtSenha" runat="server" TextMode="Password" Width="150px"></asp:TextBox>&nbsp;</td>
                    </tr>
                    <tr>
                        <td style="height: 22px; width: 147px;">&nbsp;Confirmar Nova Senha:</td>
                        <td style="height: 22px; width: 220px;">
                            <asp:TextBox ID="txtConfirmaSenha" runat="server" TextMode="Password" Width="150px"></asp:TextBox>
                            <asp:CompareValidator ID="CompareValidator1" runat="server"
                                ControlToCompare="txtConfirmaSenha" ControlToValidate="txtSenha"
                                ErrorMessage="Senha divergente da digitada acima" ValidationGroup="Salvar"></asp:CompareValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 50px; width: 147px;"></td>
                        <td style="vertical-align: bottom; height: 50px; width: 220px;" align="right">
                            <asp:ImageButton ID="btnGravar" runat="server"
                                SkinID="salvar" CssClass="button" OnClick="btnGravar_Click"
                                ValidationGroup="Salvar" />
                        </td>
                    </tr>
                </table>
            </fieldset>
            <asp:Label ID="lblMsgSucesso" runat="server" SkinID="ErroLabel" Text="" ForeColor="Blue"></asp:Label><br />
            <asp:Label ID="lblMsgErro" runat="server" Text="" SkinID="ErroLabel"></asp:Label>
            <br />              
        </ContentTemplate>
        <triggers>
            <asp:PostBackTrigger ControlID="btnGravar"   />
        </triggers>
    </asp:UpdatePanel>
</asp:Content>