<%@ page language="VB" masterpagefile="~/MasterPage.master" autoeventwireup="false" inherits="faltas, App_Web_stnu1fyh" %>
<%--title="Cronos - Módulo web"--%>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
        <tr>
            <td align="right" colspan="2" 
                style="height: 20px; background-color: #5d7b9d; text-align: center">
            <asp:Label ID="Label5" runat="server" Font-Bold="True" Font-Size="X-Small" ForeColor="Yellow" Text="Faltas / Ausências"></asp:Label></td>
        </tr>
        <tr>
            <td style="height: 20px; background-color: #5d7b9d; text-align: left" >
                <asp:Label ID="RotuloFiltro" runat="server" Text="Filtro:" ForeColor= "White" ></asp:Label>
                <asp:DropDownList ID="txtFiltro" runat="server" BackColor="#D6E0EE" Font-Size="X-Small"  AutoPostBack="True">
                <asp:ListItem></asp:ListItem></asp:DropDownList>&nbsp;
                <asp:Label ID="LabelValor1" runat="server" Text="Valor: " ForeColor="White" Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor1" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:DropDownList ID="cboCampo1" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"></asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo1" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo1" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo1" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData1" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:Label ID="LabelValor2" runat="server" Text="Valor: " ForeColor="White" Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor2" runat="server" Font-Size="X-Small" Width="55px" Visible="False"></asp:TextBox>
                <asp:DropDownList ID="cboCampo2" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"> </asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo2" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo2" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo2" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData2" runat="server" Font-Size="X-Small"  Width="55px" Visible="False"></asp:TextBox>
                <asp:Label ID="LabelValor3" runat="server" Text="Valor: " ForeColor="White" Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor3" runat="server" Font-Size="X-Small" Width="55px" Visible="False"></asp:TextBox>
                <asp:DropDownList ID="cboCampo3" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"></asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo3" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo3" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo3" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData3" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:ImageButton ID="Pesquisar3" runat="server" ImageUrl="~/Imagens/Lupa2.png" ToolTip="Executar filtro" OnClientClick="target=''" Width="24px" Visible="False"/>
                <asp:Label ID="LabelValor4" runat="server" Text="Valor: " ForeColor="White" Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor4" runat="server" Font-Size="X-Small" Width="55px" Visible="False"></asp:TextBox>
                <asp:DropDownList ID="cboCampo4" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"></asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo4" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo4" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo4" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData4" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:ImageButton ID="Pesquisar4" runat="server" ImageUrl="~/Imagens/Lupa2.png" ToolTip="Executar filtro" OnClientClick="target=''" Width="24px" Visible="False"/>
                <asp:Label ID="LabelValor5" runat="server" Text="Valor: " ForeColor="White" Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor5" runat="server" Font-Size="X-Small" Width="55px" Visible="False"></asp:TextBox>
                <asp:DropDownList ID="cboCampo5" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"></asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo5" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo5" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo5" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData5" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:ImageButton ID="Pesquisar5" runat="server" ImageUrl="~/Imagens/Lupa2.png" ToolTip="Executar filtro" OnClientClick="target=''" Width="24px" Visible="False"/>
                <asp:Label ID="LabelValor6" runat="server" Text="Valor: " ForeColor="White"  Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor6" runat="server" Font-Size="X-Small" Width="55px" Visible="False"></asp:TextBox>
                <asp:DropDownList ID="cboCampo6" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"></asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo6" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo6" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo6" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData6" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:ImageButton ID="Pesquisar6" runat="server" ImageUrl="~/Imagens/Lupa2.png" ToolTip="Executar filtro" OnClientClick="target=''" Width="24px" Visible="False"/>
            </td>
            <td style="height: 20px; background-color: #5d7b9d; text-align: Right" >
                <asp:ImageButton ID="lnkInserir" runat="server" ImageUrl="~/Imagens/Add.png" ToolTip="Inserir novo registo" OnClientClick="target=''" Width="30px"/>
                <asp:ImageButton ID="lnkAlterardePara" runat="server" ImageUrl="~/Imagens/Edit.png" ToolTip="Alteração em bloco" OnClientClick="target=''" Width="30px" Visible="False"/>
                <asp:ImageButton ID="lnkEliminar" runat="server" ImageUrl="~/Imagens/Delete.png" ToolTip="Eliminação em bloco" OnClientClick="target=''" Width="30px" Visible="False"/>
                <asp:ImageButton ID="btnAlertas" runat="server" ImageUrl="~/Imagens/Alertas.png" EnableTheming="False" ToolTip="Alertas" Width="30px"/>
                <asp:ImageButton ID="btnImportacaoDados" runat="server" ImageUrl="~/Imagens/Importar2.png" EnableTheming="False" ToolTip="Importar dados externos (Ficheiro *.txt ou *.csv)" Width="30px"/>
                <asp:ImageButton ID="btnTotais" runat="server" ImageUrl="~/Imagens/Totais.png" PostBackUrl="TotalFaltasAnual.aspx" ToolTip="Total Anual Faltas / Ausências" OnClientClick="target=''" Width="30px"/>
                <asp:ImageButton ID="btnAusenciasDataActual" runat="server" ImageUrl="~/Imagens/Ausencias.png" PostBackUrl="AusenciasDataActual.aspx" ToolTip="Ausências data hora actual" OnClientClick="target=''" Width="30px"/>
                <asp:ImageButton ID="btnRegistoPenalizacao" runat="server" ImageUrl="~/Imagens/PontoObra1.png" ToolTip="Penalização por falha ponto" Width="30px" Visible="False" />
                <asp:ImageButton ID="btnTabelasAuxiliares" runat="server" ImageUrl="~/Imagens/Tabelas.png" ToolTip="Configurar tabelas auxiliares." OnClientClick="target=''" Width="30px" Visible="False"/>
                <asp:ImageButton ID="btnOpenOffice" runat="server" ImageUrl="~/Imagens/OpenOffice.png" ToolTip="Exportar para Csv / Open Office" OnClientClick="target=''" Width="30px"/>
                <asp:ImageButton ID="btnExcel" runat="server" ImageUrl="~/Imagens/Excel.png" ToolTip="Exportar para Excel" OnClientClick="target=''" Width="30px"/>
                <asp:ImageButton ID="btnWord" runat="server" ImageUrl="~/Imagens/Word.png" ToolTip="Exportar para Word" OnClientClick="target=''" Width="30px"/>
                <asp:ImageButton ID="btnImprimir" runat="server" ImageUrl="~/Imagens/print.gif" ToolTip="Imprimir" OnClientClick="target=''" Width="30px"/>
            </td>
        </tr>
        <tr>
            <td colspan="2" 
                style="height: 20px; background-color: White; text-align: center" 
                align="left"> 
                <asp:Label ID="lblMsg" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblAccao" runat="server" Visible="False"></asp:Label>&nbsp;
                <asp:Label ID="lblSqlFiltro" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblFiltroContador" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblIndex" runat="server" Visible="False">NumeroEmpregado</asp:Label>&nbsp;
                <asp:Label ID="lblCentrosCusto" runat="server" Visible="False"></asp:Label>&nbsp;
                <asp:LinkButton ID="lnkConfirmarEliminacao" runat="server" Visible="False">Confirmar</asp:LinkButton>&nbsp;&nbsp;
                <asp:LinkButton ID="lnkCancelarEliminacao" runat="server" Visible="False">Cancelar</asp:LinkButton>
                <asp:Label ID="lblPessoalCentrosCusto" runat="server" Visible="False"></asp:Label>&nbsp;
                <asp:Label ID="lblEsta_Opcao" runat="server" Visible="False"></asp:Label> 
                <asp:Label ID="lblFiltroDataInicio" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
            </td>
        </tr>
        <tr>
        <td colspan="2">
        <asp:Panel ID="pnlEdit" runat="server" Width="100%" Visible="False">
            <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                background-color: #d6e0ee">
            <tr>
                <td colspan="36" style="height: 20px; background-color: #d6e0ee; text-align: center">
                <asp:Label ID="RotuloCentroCusto" runat="server" Text="Centro Custo:"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboCentroCusto" runat="server" AutoPostBack="True" 
                    Enabled="True" Font-Size="X-Small" Visible="True">
                </asp:DropDownList>&nbsp;&nbsp;
                <asp:Label ID="RotuloEmpregado" runat="server" Text="Empregado:"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboNumeroEmpregado" runat="server" Font-Size="X-Small" 
                        Enabled="False">
                </asp:DropDownList>&nbsp;
                <asp:ImageButton ID="btnIndex" runat="server" 
                    ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar ordenação." Width="16px" />
                </td> 
            </tr>
            <tr>
                <td colspan="36" style="height: 20px; background-color: #d6e0ee; text-align: center">
                    <asp:Label ID="RotuloDataHoraIncio" runat="server" Text="Data Hora Início:" ></asp:Label>&nbsp;
                    <asp:TextBox ID="txtDataInicio" runat="server" BorderColor="Black" BorderWidth="1px"
                        Font-Size="X-Small" Width="60px" AutoPostBack="True" ></asp:TextBox>&nbsp;
                    <asp:TextBox ID="txtHoraInicio" runat="server" BorderColor="Black" BorderWidth="1px" 
                        Enabled="True" Font-Size="X-Small" Width="38px" Wrap="False"></asp:TextBox>&nbsp;&nbsp;
                    <asp:Label ID="RotuloDataHoraFim" runat="server" Text="Data Hora Fim:"></asp:Label>&nbsp;
                    <asp:TextBox ID="txtDataFim" runat="server" BorderColor="Black" BorderWidth="1px"
                        Font-Size="X-Small" Width="60px" AutoPostBack="True"></asp:TextBox>&nbsp;
                    <asp:TextBox ID="txtHoraFim" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Enabled="True" Font-Size="X-Small" Width="38px" Wrap="False" 
                        AutoPostBack="True"></asp:TextBox>&nbsp;&nbsp;
                    <asp:Label ID="RotuloHoras" runat="server" Text="Horas:"></asp:Label>&nbsp;
                    <asp:TextBox ID="txtHoras" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small"
                        Width="38px"></asp:TextBox>&nbsp;
                    <asp:ImageButton ID="btnCalcularHoras" runat="server" 
                        ImageUrl="~/Imagens/Edit2.png" ToolTip="Recalcular horas" Width="16px" 
                        Visible="True" />&nbsp;&nbsp;                        
                    <asp:Label ID="RotuloCriarSegundaAusencia" runat="server" Text="2ª ausência" Visible="True" ></asp:Label>&nbsp;
                    <asp:ImageButton ID="btnCriarSegundaAusencia" runat="server" 
                        ImageUrl="~/Imagens/Edit2.png" ToolTip="Criar 2ª ausência" />&nbsp;&nbsp;
                    <asp:Label ID="RotuloHoraInicio2" runat="server" 
                        Text="2ª ausência - Hora início:" Visible="False" ></asp:Label>&nbsp;
                    <asp:TextBox ID="txtHoraInicio2" runat="server" BorderColor="Black" 
                        BorderWidth="1px" Font-Size="X-Small"
                        Width="38px" Visible="False"></asp:TextBox>&nbsp;&nbsp;
                    <asp:Label ID="RotuloHoraFim2" runat="server" Text="Hora Fim:" Visible="False" ></asp:Label>&nbsp;
                    <asp:TextBox ID="txtHoraFim2" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Enabled="True" Font-Size="X-Small" Width="38px" Wrap="False" 
                        Visible="False" AutoPostBack="True" ></asp:TextBox>&nbsp;
                    <asp:Label ID="RotuloHoras2" runat="server" Text="Horas:" Visible="False" ></asp:Label>&nbsp;
                    <asp:TextBox ID="txtHoras2" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small"
                        Width="38px" Visible="False"></asp:TextBox>&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="36" style="height: 20px; background-color: #d6e0ee; text-align: center">
                    <asp:Label ID="RotuloJustificacao" runat="server" Text="Justificação:"></asp:Label>&nbsp;
                    <asp:DropDownList ID="cboFaltaCodigo" runat="server" Font-Size="X-Small"></asp:DropDownList>&nbsp;&nbsp;
                    <asp:Label ID="RotuloJustificacao2" runat="server" Text="Justificação 2ª ausência:" Visible="False"></asp:Label>&nbsp;
                    <asp:DropDownList ID="cboFaltaCodigo2" runat="server" Font-Size="X-Small" 
                        Width="195px" Visible="False"></asp:DropDownList>&nbsp;&nbsp;
                    <asp:LinkButton ID="lnkGravar" runat="server" Visible="False">Gravar</asp:LinkButton>&nbsp;&nbsp;
                    <asp:LinkButton ID="lnkCancelar" runat="server" Visible="False">Cancelar</asp:LinkButton>
                    </td>
            </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="pnlEditNotas" runat="server" Width="100%" Visible="False">
            <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                background-color: #d6e0ee">
            <tr>
                <td colspan="36" style="height: 20px; background-color: #d6e0ee; text-align: center">
                    <br />
                    <asp:Label ID="RotuloNotas" runat="server" Text="Notas:"></asp:Label>&nbsp;
                    <asp:TextBox ID="txtNotas" runat="server" BorderColor="Black" BorderWidth="1px" 
                        Font-Size="X-Small" Width="500px" ></asp:TextBox>&nbsp;&nbsp;
                    <asp:ImageButton ID="btnEliminarPdf" runat="server" 
                        ImageUrl="~/Imagens/Delete2.png" ToolTip="Eliminar documento 'pdf'." Visible="True" />&nbsp;&nbsp;
                    <asp:LinkButton ID="lnkGravarNotas" runat="server">Gravar / Sair</asp:LinkButton>&nbsp;&nbsp;
                    <asp:LinkButton ID="lnkGravarNotasTodosRegistosSeleccionados" runat="server" Visible="False">Inserir em todos os registos seleccionados.</asp:LinkButton>
                    <br />
                </td>
            </tr>
            <tr>
                <td colspan="36" style="height: 20px; background-color: #d6e0ee; text-align: center">
                    <br />
                    <asp:Label ID="RotuloFileUploadFaltas" runat="server" Text="Anexar documento 'pdf':"></asp:Label>&nbsp;
                    <asp:FileUpload ID="FileUploadFaltas" runat="server" ToolTip="Documento" 
                        BackColor="#F7F6F3" CssClass="icon" Font-Size="Small" Width="600px" 
                        Visible="False" />
                    <asp:LinkButton ID="lnkGravarPdf" runat="server">Gravar / Sair</asp:LinkButton>&nbsp;&nbsp;
                    <br /> <br />
                </td>
            </tr>
            </table>
        </asp:Panel>

        <asp:Panel ID="pnlEditAlterarDePara" runat="server" Width="100%" Visible="False">
            <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                background-color: #d6e0ee">
            <tr>
                <td colspan="36" style="height: 20px; background-color: #d6e0ee;" align="left">
                    <asp:Label ID="RotuloCampo" runat="server" Text="Seleccionar Campo:"></asp:Label>&nbsp;
                    <asp:DropDownList ID="cboCampoAlterarDePara" runat="server" AutoPostBack="True" 
                        Font-Size="X-Small" Width="130px">
                    </asp:DropDownList>&nbsp;&nbsp;
                </td>
            </tr> 
            <tr>
                <td colspan="36" style="height: 20px; background-color: #d6e0ee; text-align: center">
                <asp:Label ID="RotuloAlterarDe" runat="server" Text="Alterar de: " ></asp:Label>&nbsp;
                <asp:TextBox ID="txtAlterarDe" runat="server" BorderColor="Black" 
                        BorderWidth="1px" Font-Size="X-Small" Width="38px" Visible="False"></asp:TextBox>&nbsp;&nbsp;
                <asp:DropDownList ID="cboAlterarDe" runat="server" Font-Size="X-Small" 
                        Width="195px" Visible="False"></asp:DropDownList>&nbsp;&nbsp;
                <asp:Label ID="RotuloAlterarPara" runat="server" Text="Para: " ></asp:Label>&nbsp;
                <asp:TextBox ID="TxtAlterarPara" runat="server" BorderColor="Black" 
                        BorderWidth="1px" Font-Size="X-Small" Width="38px" Visible="False"></asp:TextBox>&nbsp;&nbsp;
                <asp:DropDownList ID="cboAlterarPara" runat="server" Font-Size="X-Small" 
                        Width="195px" Visible="False"></asp:DropDownList>&nbsp;&nbsp;
                <asp:LinkButton ID="lnkConfirmarAlterarDePara" runat="server" Visible="False">Confirmar</asp:LinkButton>&nbsp;&nbsp;
                <asp:LinkButton ID="lnkSairAlterarDePara" runat="server" Visible="False">Sair</asp:LinkButton>
                <br /> <br />
                </td>
            </tr>
            </table>
        </asp:Panel>

        <asp:Panel ID="PnlImportacaoDados" runat="server" Visible="False" Width="100%" 
                HorizontalAlign="Center">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color: #a6cdcc" >
            <tr >
                <td colspan="36" style="height: 20px; background-color: #d6e0ee; text-align: center" >
                    <br />
                    <asp:Label ID="RotuloFileUploadFicheiroDados" runat="server" Text="Importar dados externos p/ Tabela:"></asp:Label>&nbsp;
                    <asp:DropDownList ID="cboFicheiroImportacao" runat="server" AutoPostBack="True" 
                        Font-Size="X-Small" > </asp:DropDownList>
                    <asp:ImageButton ID="btnConfigurarImportacao" runat="server"  ImageUrl="~/Imagens/Config2.png" ToolTip="Configuração de Importações"/>&nbsp;&nbsp;
                    <asp:FileUpload ID="FileUploadFicheiroDados" runat="server" ToolTip="Ficheiro" 
                        BackColor="#F7F6F3" CssClass="icon" Font-Size="Small" Width="600px" 
                        Visible="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:LinkButton ID="lnkConfirmarImportacaoFicheiro" runat="server">Confirmar Importação</asp:LinkButton>&nbsp;&nbsp;
                    <asp:LinkButton ID="lnkCancelarImportacaoFicheiro" runat="server">Cancelar</asp:LinkButton>&nbsp;&nbsp;
                    <br /> <br />
                </td>
            </tr>
            </table>
            <br /> 
            <asp:Panel ID="pnlConfigurarTabelaImportacao" runat="server" Visible="False" Width="100%" HorizontalAlign="Center" >
            <table border="0" cellpadding="0" cellspacing="0" 
                    style="width: 100%; background-color: #a6cdcc" >
            <tr>
                <td colspan="36" style="height: 20px; background-color: #d6e0ee; text-align: center">
                <br /> 
                <asp:Label ID="RotuloOrdemFicheiro" runat="server" Text="Ordenação:" 
                    Visible="True"></asp:Label>&nbsp;
                <asp:TextBox ID="txtOrdemFicheiro" runat="server" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" Visible="True"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloTabelaImportacao" runat="server" Text="Tabela:" 
                    Visible="True"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboCodigoTabelaImportacao" runat="server" Font-Size="X-Small" 
                    Visible="True" AutoPostBack="True"></asp:DropDownList>&nbsp;
                <asp:Label ID="RotuloFicheiroImportacao" runat="server" Text="Descrição Importação:" 
                    Visible="True"></asp:Label>&nbsp;
                <asp:TextBox ID="txtFicheiroImportacao" runat="server" BorderWidth="1px" 
                    Font-Size="X-Small" Width="80px" Visible="True"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloSeparadorColunas" runat="server" Text="Separador colunas:" 
                    Visible="True"></asp:Label>&nbsp;
                <asp:TextBox ID="txtSeparadorColunas" runat="server" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" Visible="True"></asp:TextBox>&nbsp;&nbsp;
                <asp:ImageButton ID="btnFicheiroImportacaoNovoRegisto" runat="server" 
                    ImageUrl="~/Imagens/Add2.png" ToolTip="Nova Importação." />&nbsp;&nbsp;
                <asp:LinkButton ID="lnkTabelaImportacaoGravar" runat="server" Visible="True">Gravar</asp:LinkButton>&nbsp;&nbsp;
                <asp:LinkButton ID="lnkTabelaImportacaoCancelar" runat="server" Visible="True">Cancelar</asp:LinkButton>
                <br /> <br />
                </td>
            </tr>
            </table>
            </asp:Panel>

            <asp:Panel ID="pnlConfigurarTabelaImportacaoSub" runat="server" Visible="False" 
                Width="100%" BackColor="#d6e0ee">
            <%--<table border="0" cellpadding="0" cellspacing="0" 
                    style="width: 96%; background-color: #d6e0ee" >--%>
            <%--<tr>
                <td colspan="36" style="height: 20px; background-color: #d6e0ee; text-align: center">--%>
                <br /> 
                <asp:Label ID="RotuloOrdenacaoCampo" runat="server" Text="Ordenação:" 
                    Visible="True"></asp:Label>&nbsp;
                <asp:TextBox ID="txtOrdenacaoCampo" runat="server" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" Visible="True"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloCampoImportacao" runat="server" Text="Campo:" 
                    Visible="True"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboCodigoCampoImportacao" runat="server" Font-Size="X-Small" 
                    Width="100px" Visible="True"></asp:DropDownList>&nbsp;
                <asp:Label ID="RotuloColuna" runat="server" Text="Posição / Nº Coluna:" Visible="True"></asp:Label>&nbsp;
                <asp:TextBox ID="txtColunaNumero" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" Visible="True"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloValorFixo" runat="server" Text="Valor Fixo / Cálculado:" 
                    Visible="True"></asp:Label>&nbsp;
                <asp:TextBox ID="txtValorFixo" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="150px" Visible="True"></asp:TextBox>
                <asp:LinkButton ID="lnkTabelaImportacaoSubGravar" runat="server" Visible="True">Gravar</asp:LinkButton>&nbsp;&nbsp;
                <asp:LinkButton ID="lnkTabelaImportacaoSubCancelar" runat="server" Visible="True">Cancelar</asp:LinkButton>
                <br />  <br />
                <%--</td>
            </tr>--%>
            <%--</table>--%>
            </asp:Panel>
            <asp:GridView ID="grdDadosImportacaoTabelas" runat="server" CellPadding="4" HorizontalAlign="Center" 
                    PageSize="4" Width="800px">
                <Columns>
                    <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                        SelectImageUrl="~/Imagens/Edit2.png" 
                        DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                </Columns>
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <EditRowStyle BackColor="#999999" />
                <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="~/Imagens/SetaPrimeiro.png" PreviousPageImageUrl="~/Imagens/SetaEsquerda.png" NextPageImageUrl="~/Imagens/SetaDireita.png" LastPageImageUrl="~/Imagens/SetaUltimo.png" />
                <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
            <br />
        </asp:Panel>
        </td>
        </tr>

        <tr>
        <td colspan="2" style="text-align: center">
        <asp:Panel ID="pnlTabelasAuxiliares" runat="server" Visible="False" Width="100%">
            <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                    border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                    background-color: #d6e0ee">
            <tr>
            <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                <%--<br />--%> 
                <asp:Label ID="RotuloTabela" runat="server" Font-Size="X-Small" Text="Tabela:"></asp:Label>&nbsp;&nbsp;
                <asp:DropDownList ID="cboTabelaAuxiliar" runat="server" AutoPostBack="True" 
                    Font-Size="X-Small" Width="200px" Height="20px"> </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:LinkButton ID="lnkTabelaAuxiliarSair" runat="server">Sair</asp:LinkButton>
            </td>
            </tr> 
            <tr>
            <td style="height: 30px; background-color: #d6e0ee; text-align: center">
                <br /> 
                <asp:Label ID="RotuloCodigoTabelaAuxiliar" runat="server" Text="Código:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtCodigoTabelaAuxiliar" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="47px"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloDescricao" runat="server" Text="Descrição:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtDescricaoTabelaAuxiliar" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="235px"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloCodigosFalta" runat="server" Text="Códigos Falta:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtCodigosFalta" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="50px"></asp:TextBox>&nbsp;

                <asp:Label ID="RotuloLimitePeriodo" runat="server" Text="Limite por Período:" Visible="False" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtLimitePeriodo" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small" Width="38px" Visible="False"></asp:TextBox>&nbsp;&nbsp;
                <asp:Label ID="RotuloLimiteDia" runat="server" Text="Limite por Dia:" Visible="False" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtLimiteDia" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small" Width="38px" Visible="False"></asp:TextBox>&nbsp;&nbsp;
                <asp:Label ID="RotuloLimiteMensal" runat="server" Text="Limite Mensal:" Visible="False" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtLimiteMensal" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small" Width="38px" Visible="False"></asp:TextBox>&nbsp;&nbsp;
                <asp:Label ID="RotuloLimiteAnual" runat="server" Text="Limite Anual:" Visible="False" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtLimiteAnual" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small" Width="38px" Visible="False"></asp:TextBox>&nbsp;&nbsp;

                <asp:LinkButton ID="lnkTabelaAuxiliarGravar" runat="server">Gravar</asp:LinkButton>&nbsp;&nbsp;
                <asp:ImageButton ID="btnTabelaAuxiliarNovoFiltro" runat="server" 
                    ImageUrl="~/Imagens/Add2.png" ToolTip="Novo filtro." />&nbsp;&nbsp;
                <asp:ImageButton ID="btnTabelaAuxiliarAlterarFiltro" runat="server" 
                    ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar filtro." Width="16px" />&nbsp;&nbsp;
            </td>
            </tr>
            <tr>
            <td style="height: 30px; background-color: #d6e0ee; text-align: center">
                <%--<asp:Label ID="RotuloSql" runat="server" Text="Sql:" Visible="False" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtSql" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small" Width="800px" Visible="False" TextMode="MultiLine"></asp:TextBox>&nbsp;&nbsp;--%>

            </td>
            </tr> 
            <tr>
            <td colspan="36" style="height: 20px; background-color: #d6e0ee; text-align: center">
                <br />
                <asp:GridView ID="grdDadosTabelasAuxiliares" runat="server" CellPadding="4" HorizontalAlign="Center" 
                        PageSize="4" Width="702px" AutoGenerateColumns="False" RowStyle-HorizontalAlign="Left">
                    <Columns>
                        <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                            SelectImageUrl="~/Imagens/Edit2.png" 
                            DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                        <asp:BoundField DataField="Codigo" HeaderText="Código" />
                        <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                        <%--<asp:TemplateField HeaderText="Código Falta">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropCodigoFalta" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropCodigoFalta_Load" 
                                onselectedindexchanged="dropCodigoFalta_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>--%>
                        <asp:BoundField DataField="CodigosFalta" HeaderText="Códigos Falta" />
                        <asp:BoundField DataField="LimitePeriodo" HeaderText="Limite por Período" />
                        <asp:BoundField DataField="LimiteDia" HeaderText="Limite por dia" />
                        <asp:BoundField DataField="LimiteMensal" HeaderText="Limite mensal" />
                        <asp:BoundField DataField="LimiteAnual" HeaderText="Limite anual" />
                        <%--<asp:BoundField DataField="Sql" HeaderText="Sql" />--%>
                        <asp:TemplateField HeaderText="Activo">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkAlertasActivo" runat="server" AutoPostBack="True" OnCheckedChanged="chkAlertasActivo_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <%--<asp:BoundField DataField="CodigoFalta" HeaderText="" />--%>
                        <asp:BoundField DataField="Activo" HeaderText="" />
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <EditRowStyle BackColor="#999999" />
                    <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                    <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
                <br />
            </td>
            </tr>
            </table>
        </asp:Panel>
        </td>
        </tr>

        <tr>
        <td colspan="2" style="background-color: #d6e0ee; text-align: center">
        <asp:Panel ID="pnlOpcoesFiltros" runat="server" Visible="False" Width="100%">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color: #a6cdcc">
            <tr>
                <td colspan="2" style="background-color: #d6e0ee; text-align: center">
                    <asp:GridView ID="grdDadosOpcoesFiltros" runat="server"  
                            AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                                PageSize="4" Width="800px">
                    <Columns>
                        <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Imagens/Edit2.png" 
                                    DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                        <asp:BoundField DataField="Descricao" HeaderText="Filtro" />
                        <asp:TemplateField HeaderText="Activo">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkFiltroActivo" runat="server" AutoPostBack="True" OnCheckedChanged="chkFiltroActivo_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Filtro" HeaderText="" />
                        <asp:BoundField DataField="Activo" HeaderText="" />
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <EditRowStyle BackColor="#999999" />
                    <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                    <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                    <br />  
                </td>
            </tr>
            <tr>
                <td colspan="2" style="background-color: #d6e0ee; text-align: center">
                    <asp:Label ID="RotuloContador" runat="server" Text="Ordem:" Visible="False"></asp:Label>&nbsp;
                    <asp:TextBox ID="txtContador" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                Width="25px" Visible="False"></asp:TextBox>&nbsp;
                    <asp:TextBox ID="txtParenteses1" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                Width="10px" Visible="False"></asp:TextBox>&nbsp;
                    <asp:Label ID="RotulocboCampos" runat="server" Text="Campo:" Visible="False"></asp:Label>&nbsp;
                    <asp:DropDownList ID="cboCampos" runat="server" Font-Size="X-Small" 
                                Visible="False"> </asp:DropDownList>&nbsp;
                    <asp:Label ID="RotuloOperador" runat="server" Text="Operador:" Visible="False"></asp:Label>&nbsp;
                    <asp:DropDownList ID="cboOperadores" runat="server" Font-Size="X-Small" 
                                Visible="False"> </asp:DropDownList>&nbsp;
                    <asp:Label ID="RotuloValor" runat="server" Text="Valor:" Visible="False"></asp:Label>&nbsp;
                    <asp:TextBox ID="txtValor" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                Width="80px" Visible="False"></asp:TextBox>&nbsp;
                    <asp:TextBox ID="txtParenteses2" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                Width="10px" Visible="False"></asp:TextBox>&nbsp;
                    <asp:Label ID="RotuloCondicao" runat="server" Text="Condição:" Visible="False"></asp:Label>&nbsp;
                    <asp:DropDownList ID="cboCondicao" runat="server" Font-Size="X-Small" 
                                Visible="False"> </asp:DropDownList>&nbsp;&nbsp;
                    <asp:ImageButton ID="btnNovoCampo" runat="server" 
                        ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir Novo registo." Visible="False" />&nbsp;
                    <asp:ImageButton ID="btnAlterarCampo" runat="server" 
                        ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar filtro." Width="16px" Visible="False" />
                    <br /> <br />
                    <asp:GridView ID="grdDadosOpcoesFiltrosCampos" runat="server"  
                            AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                                PageSize="4" Width="1000px" Visible="False">
                    <Columns>
                        <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Imagens/Edit2.png" 
                                    DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                        <asp:BoundField DataField="Descricao" HeaderText="Filtro" />
                        <asp:BoundField DataField="Contador" HeaderText="Ordem"/>
                        <asp:BoundField DataField="Parenteses1" HeaderText=" " />
                        <asp:TemplateField HeaderText="Campo">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropOpcoesCampos" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropOpcoesCampos_Load" 
                                onselectedindexchanged="dropOpcoesCampos_SelectedIndexChanged" >
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Operador">
                            <ItemTemplate>
                            <asp:DropDownList ID="DropOperacao" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="DropOperacao_Load" 
                                onselectedindexchanged="DropOperacao_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Valor" HeaderText="Valor" />
                        <asp:BoundField DataField="Parenteses2" HeaderText=" " />
                        <asp:TemplateField HeaderText="Condição">
                            <ItemTemplate>
                            <asp:DropDownList ID="DropConjuncao" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="DropConjuncao_Load" 
                                onselectedindexchanged="DropConjuncao_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Tipo" HeaderText="" />
                        <asp:BoundField DataField="Filtro2" HeaderText="" />
                        <asp:BoundField DataField="Opcao2" HeaderText=""/>
                        <asp:BoundField DataField="Campo2" HeaderText=""/>
                        <asp:BoundField DataField="Contador2" HeaderText=""/>
                        <asp:BoundField DataField="NumeroEmpregado2" HeaderText=""/>
                        <asp:BoundField DataField="Condicao" HeaderText=""/>
                        <asp:BoundField DataField="Conjuncao" HeaderText=""/>
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <EditRowStyle BackColor="#999999" />
                    <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                    <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                    <br />
                </td>
            </tr>
            </table>
        </asp:Panel>
        </td>
        </tr>

        <tr>
        <td colspan="2" style="background-color: #d6e0ee; text-align: center">
            <asp:Panel ID="pnlCaracteristicasConfiguracao" runat="server" Visible="False" Width="100%">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%" >
                <tr>
                <td>
                    <asp:Label ID="RotuloCaracteristicasDescGrupo" runat="server" Text="Grupo:" Visible="False"></asp:Label>&nbsp;
                    <asp:TextBox ID="txtCaracteristicasDescGrupo" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                Width="200px" Visible="False"></asp:TextBox>&nbsp;
                    <asp:ImageButton ID="btnCaracteristicasGrupo" runat="server" 
                        ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir Novo Grupo." Visible="False" />&nbsp;

                    <asp:Label ID="RotuloCaracteristicasDescricao" runat="server" Text="Descrição:" Visible="False"></asp:Label>&nbsp;
                    <asp:TextBox ID="txtCaracteristicasDescricao" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                Width="200px" Visible="False"></asp:TextBox>&nbsp;
                    <asp:Label ID="RotuloCaracteristicasTamanho" runat="server" Text="Tamanho:" Visible="False"></asp:Label>&nbsp;
                    <asp:TextBox ID="txtCaracteristicasTamanho" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                Width="20px" Visible="False"></asp:TextBox>&nbsp;
                    <asp:ImageButton ID="btnCaracteristicasNovaCaracteristica" runat="server" 
                        ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir Nova Característica." Visible="False" />&nbsp;
                    <asp:ImageButton ID="btnCaracteristicasGravar" runat="server" 
                        ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar dados." Width="16px" Visible="False" />
                    <br /> <br />
                    <asp:GridView ID="grdDadosCaracteristicas" runat="server"  
                            AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                                PageSize="4" Width="800px" Visible="true">
                    <Columns>
                        <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Imagens/Edit2.png" 
                                    DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                        <asp:BoundField DataField="DescGrupo" HeaderText="Grupo" />
                        <asp:BoundField DataField="CodigoCaracteristica" HeaderText="Código" />
                        <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                        <asp:TemplateField HeaderText="Tipo">
                            <ItemTemplate>
                            <asp:DropDownList ID="DropTiposCampos" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="DropTiposCampos_Load" 
                                onselectedindexchanged="DropTiposCampos_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="">
                            <ItemTemplate>
                                <table cellpadding="0" cellspacing="0" class="style3">
                                <tr>
                                <td>
                                    <asp:imagebutton ID="btnTabelaCaracteristicas" runat="server"  
                                        Height="12px" OnClick="btnTabelaCaracteristicas_Click" ImageUrl="~/Imagens/Edit2.png" ToolTip="Editar Tabela." Width="12px" />
                                </td>
                                </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Unidades">
                            <ItemTemplate>
                            <asp:DropDownList ID="dropUnidades" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropUnidades_Load" 
                                onselectedindexchanged="dropUnidades_SelectedIndexChanged" >
                            </asp:DropDownList>
                            </span>
                            </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:BoundField DataField="Dimensao" HeaderText="Tamanho"/>
                        <asp:BoundField DataField="Unidades" HeaderText=""/>
                        <asp:BoundField DataField="Tipo" HeaderText="" />
                        <asp:BoundField DataField="Grupo2" HeaderText=""/>
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <EditRowStyle BackColor="#999999" />
                    <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="~/Imagens/SetaPrimeiro.png" PreviousPageImageUrl="~/Imagens/SetaEsquerda.png" NextPageImageUrl="~/Imagens/SetaDireita.png" LastPageImageUrl="~/Imagens/SetaUltimo.png" />
                    <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                    <br />

                    <asp:Label ID="RotuloCaracteristicasTabelaCodigo" runat="server" Text="Código:" Visible="False"></asp:Label>&nbsp;
                    <asp:TextBox ID="txtCaracteristicasTabelaCodigo" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                Width="30px" Visible="False"></asp:TextBox>&nbsp;
                    <asp:Label ID="RotuloCaracteristicasTabelaDescricao" runat="server" Text="Descrição:" Visible="False"></asp:Label>&nbsp;
                    <asp:TextBox ID="txtCaracteristicasTabelaDescricao" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                Width="200px" Visible="False"></asp:TextBox>&nbsp;
                    <asp:ImageButton ID="btnCaracteristicasTabelaInserir" runat="server" 
                        ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir novo registo." Visible="False" />&nbsp;
                    <asp:ImageButton ID="btnCaracteristicasTabelaAlterar" runat="server" 
                        ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar dados." Width="16px" Visible="False" />
                    <br /> <br /> 
                    <asp:GridView ID="grdDadosCaracteristicasTabela" runat="server" CellPadding="4" HorizontalAlign="Center" 
                            PageSize="4" Width="582px" AutoGenerateColumns="False" Visible="False">
                        <Columns>
                        <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Imagens/Edit2.png" 
                                    DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                            <asp:BoundField DataField="Codigo" HeaderText="Código" />
                            <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                        </Columns>
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <EditRowStyle BackColor="#999999" />
                        <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                        <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                    <%--<br />--%>
                </td>
                </tr>
            </table>
        </asp:Panel>
        </td>
        </tr>

        <tr>
        <td colspan="2" style="background-color: #d6e0ee; text-align: center">
        <asp:Panel ID="pnlTabelaFaltas" runat="server" Visible="False" Width="100%">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color: #a6cdcc" >
            <%--<table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                    border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                    background-color: #d6e0ee">--%>
            <tr>
            <td colspan="2" style="background-color: #d6e0ee; text-align: center">
                <br />
                <asp:Label ID="RotuloCodigoFalta" runat="server" Text="Criar / alterar Código:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtCodigoFalta" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="47px"></asp:TextBox>&nbsp;
                <asp:DropDownList ID="cboCodigoFalta" runat="server" Font-Size="X-Small" 
                    Width="195px" Visible="False"></asp:DropDownList>&nbsp;
                <asp:Label ID="RotuloDescricaoFalta" runat="server" Text="Descrição:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtDescricaoFalta" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="235px"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloAbreviatura" runat="server" Text="Abreviatura:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtAbreviatura" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small" Width="80px"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloFuncao" runat="server" Text="Função Relógio:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtFuncao" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="70px"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloConversaoCodigos" runat="server" Text="Conversão Exportação:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtConversaoCodigos" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="70px"></asp:TextBox>&nbsp;&nbsp&nbsp
                <asp:LinkButton ID="lnkTabelaFaltasGravar" runat="server">Gravar</asp:LinkButton>&nbsp;&nbsp;
                <br /><br />
                <asp:GridView ID="grdDadosTabelaFaltas" runat="server" 
                    AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                        PageSize="4" Width="1400px">
                    <Columns>
                        <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                            SelectImageUrl="~/Imagens/Edit2.png" 
                            DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" 
                            HeaderText="      " />
                        <asp:BoundField DataField="CodigoFalta" HeaderText="Código" />
                        <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                        <asp:BoundField DataField="Abreviatura" HeaderText="Abreviatura" />
                        <asp:TemplateField HeaderText="Tipo">
                            <ItemTemplate>
                            <asp:DropDownList ID="DropTipoFalta" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="19px" onload="DropTipoFalta_Load" 
                                onselectedindexchanged="DropTipoFalta_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Unidades">
                            <ItemTemplate>
                            <asp:DropDownList ID="DropUnidadesTempo" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="19px" onload="DropUnidadesTempo_Load" 
                                onselectedindexchanged="DropUnidadesTempo_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Funcao" HeaderText="Função" />
                        <asp:TemplateField HeaderText="Absentismo">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkAbsentismo" runat="server" AutoPostBack="True" OnCheckedChanged="chkAbsentismo_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Exp. Desc.">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkDiasDescanso" runat="server" AutoPostBack="True" OnCheckedChanged="chkDiasDescanso_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Serv. Externo">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkServicoExterno" runat="server" AutoPostBack="True" OnCheckedChanged="chkServicoExterno_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Desc. S. T.">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkDescSubTransporte" runat="server" AutoPostBack="True" OnCheckedChanged="chkDescSubTransporte_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Activa">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkWeb" runat="server" AutoPostBack="True" OnCheckedChanged="chkWeb_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Prevista">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkPrevista" runat="server" AutoPostBack="True" OnCheckedChanged="chkPrevista_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Sub. alimentação">
                            <ItemTemplate>
                                <asp:DropDownList ID="DropSubAlimentacao" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="DropSubAlimentacao_SelectedIndexChanged" 
                                    SelectedValue='<%# Bind("SubAlimentacao") %>' Font-Size="X-Small" Height="19px">
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem Value="-1">Desconta</asp:ListItem>
                                    <asp:ListItem Value="1">Acrescenta</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ConversaoCodigos" HeaderText="Conversão Exportação" />
                        <asp:TemplateField HeaderText="Exportar">
                            <ItemTemplate>
                                <asp:DropDownList ID="DropExportarVencimentos" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="DropExportarVencimentos_SelectedIndexChanged" 
                                    SelectedValue='<%# Bind("Exportar") %>' Font-Size="X-Small" Height="19px">
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem Value="0">Não</asp:ListItem>
                                    <asp:ListItem Value="1">Sim</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Absentismo" HeaderText="" />
                        <asp:BoundField DataField="DiasDescanso" HeaderText="" />
                        <asp:BoundField DataField="ServicoExterno" HeaderText="" />
                        <asp:BoundField DataField="DescontaSubTransporte" HeaderText="" />
                        <asp:BoundField DataField="Web" HeaderText="" />
                        <asp:BoundField DataField="Prevista" HeaderText="" />
                        <asp:BoundField DataField="TipoFalta" HeaderText="" />
                        <asp:BoundField DataField="UnidadeTempo" HeaderText="" />
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <EditRowStyle BackColor="#999999" />
                    <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                    <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
                <br />
            </td>
            </tr>
            </table>
        </asp:Panel>
        </td>
        </tr>

        <tr>
        <td colspan="2" style="background-color: #d6e0ee; text-align: center">
        <asp:Panel ID="pnlTabelaAtrasos" runat="server" Visible="False" Width="100%">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color: #a6cdcc" >
            <%--<table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                    border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                    background-color: #d6e0ee">--%>
            <tr>
            <td colspan="2" style="background-color: #d6e0ee; text-align: center">
                <br />
                <asp:Label ID="RotuloCodigoAtrasos" runat="server" Text="Criar / alterar Código:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtCodigoAtrasos" runat="server" BorderWidth="1px" 
                    Font-Size="X-Small" Width="47px" Visible="False"></asp:TextBox>&nbsp;
                <asp:DropDownList ID="cboCodigoAtrasos" runat="server" Font-Size="X-Small" 
                    Width="195px" ></asp:DropDownList>&nbsp;
                <asp:Label ID="RotuloAtrasoDe" runat="server" Text="Ausência De:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtAtrasoDe" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="35px"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloAtrasoAte" runat="server" Text="Ausência Até:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtAtrasoAte" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="35px"></asp:TextBox>&nbsp;&nbsp;
            </td>
            </tr>

            <tr>
            <td colspan="2" style="background-color: #d6e0ee; text-align: center">
                <asp:Label ID="RotuloCreditoDia" runat="server" Text="Crédito Diário Ausências:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtCreditoDia" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="35px" ></asp:TextBox>&nbsp;&nbsp;
                <asp:Label ID="RotuloCreditoMensal" runat="server" Text="Crédito Mensal Ausências:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtCreditoMensal" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="35px" ></asp:TextBox>&nbsp;&nbsp;
                <asp:Label ID="RotuloLimiteHorasFalta" runat="server" Text="Horas Ausência:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtLimiteHorasFalta" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="35px" ToolTip="Limite de horas para penalização do prémio mensal."></asp:TextBox>&nbsp;&nbsp;
                <asp:Label ID="RotuloPercentagemPenalizacao" runat="server" Text="% Penalização:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtPercentagemPenalizacao" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="35px" ToolTip="Percentagem de penalização do prémio mensal."></asp:TextBox>&nbsp;&nbsp;
                <asp:Label ID="RotuloArredondarPara" runat="server" Text="Arredondar Para:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtArredondarPara" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="35px" ToolTip=""></asp:TextBox>&nbsp;&nbsp;
                <asp:Label ID="RotuloArredondarDepoisDe" runat="server" Text="Depois de:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtArredondarDepoisDe" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="35px" ToolTip=""></asp:TextBox>&nbsp;&nbsp;
                <asp:Label ID="RotuloLimiteSuperiorTempoFalta" runat="server" Text="Só faltas inferiores a:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtLimiteSuperiorTempoFalta" runat="server" BorderWidth="1px" Font-Size="X-Small" Width="35px" ToolTip=""></asp:TextBox>&nbsp;&nbsp;
                <asp:LinkButton ID="lnkTabelaAtrasosGravar" runat="server">Gravar</asp:LinkButton>&nbsp;&nbsp;
                <br /><br />
                <asp:GridView ID="grdDadosTabelaAtrasos" runat="server" 
                    AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                        PageSize="4" Width="1400px">
                    <Columns>
                        <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                            SelectImageUrl="~/Imagens/Edit2.png" 
                            DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" 
                            HeaderText="      " />
                        <asp:TemplateField HeaderText="Justificação" >
                        <ItemTemplate>
                            <asp:DropDownList ID="dropAtrasosFaltas" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropAtrasosFaltas_Load" 
                                onselectedindexchanged="dropAtrasosFaltas_SelectedIndexChanged" >
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:BoundField DataField="AtrasoDe" HeaderText="Ausência De" />
                        <asp:BoundField DataField="AtrasoAte" HeaderText="Ausência Até" />
                        <asp:TemplateField HeaderText="Cód. extra">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropExtras" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropExtras_Load" 
                                onselectedindexchanged="dropExtras_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:BoundField DataField="CreditoDia" HeaderText="Crédito Diário" />
                        <asp:BoundField DataField="CreditoMensal" HeaderText="Crédito Mensal" />
                        <asp:TemplateField HeaderText="Tipo">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropTipoAtraso" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropTipoAtraso_Load" 
                                onselectedindexchanged="dropTipoAtraso_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Após Justificação" >
                        <ItemTemplate>
                            <asp:DropDownList ID="dropAtrasosAposFalta" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropAtrasosAposFalta_Load" 
                                onselectedindexchanged="dropAtrasosAposFalta_SelectedIndexChanged" >
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Just. Extra">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropJustificacaoExtra" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropJustificacaoExtra_Load" 
                                onselectedindexchanged="dropJustificacaoExtra_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Activo">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkActivo" runat="server" AutoPostBack="True" OnCheckedChanged="chkActivo_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Período">
                            <ItemTemplate>
                                <asp:DropDownList ID="DropPeriodo" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="DropPeriodo_SelectedIndexChanged" 
                                    SelectedValue='<%# Bind("Periodo") %>' Font-Size="X-Small" Height="19px">
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem Value="0">Entrada dia</asp:ListItem>
                                    <asp:ListItem Value="1">Após almoço</asp:ListItem>
                                    <asp:ListItem Value="2">Ent. e após alm</asp:ListItem>
                                    <asp:ListItem Value="3">Saída dia</asp:ListItem>
                                    <asp:ListItem Value="4">Todos os períodos</asp:ListItem>
                                    <asp:ListItem Value="5">Período Manhã</asp:ListItem>
                                    <asp:ListItem Value="6">Período Tarde</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="LimiteHoras" HeaderText="Horas Ausência" />
                        <asp:BoundField DataField="Penalizacao" HeaderText="% Penalização" />
                        <asp:BoundField DataField="ArredondarPara" HeaderText="Arredondar Para" />
                        <asp:BoundField DataField="ArredondarDepoisDe" HeaderText="Depois De" />
                        <asp:BoundField DataField="LimiteSuperiorTempoFalta" HeaderText="Só faltas inferiores a" />
                        <asp:BoundField DataField="Tipo" HeaderText="" />
                        <asp:BoundField DataField="CodigoFalta" HeaderText="" />
                        <asp:BoundField DataField="CodigoExtra" HeaderText="" />
                        <asp:BoundField DataField="AposCodigoFalta" HeaderText="" />
                        <asp:BoundField DataField="JustificacaoExtra" HeaderText="" />
                        <asp:BoundField DataField="Activo" HeaderText="" />
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <EditRowStyle BackColor="#999999" />
                    <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                    <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
                <br />
            </td>
            </tr>
            </table>
        </asp:Panel>
        </td>
        </tr>

        <tr>
        <td colspan="2" style="text-align: center">
            <asp:Panel ID="pnlOpcoesCampos" runat="server" Visible="False" Width="100%">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;background-color: #d6e0ee;" >
            <%--<table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                    border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                    background-color: #d6e0ee">--%>
                <tr align="center">
                    <td style="height: 3px; text-align: center">
                        <asp:LinkButton ID="lnkSairOpcoesCampos" runat="server">Sair</asp:LinkButton>
                    </td>
                </tr>
                <tr>
                    <td 
                        style="height: 20px; background-color: White; text-align: center" 
                        align="left"> 
                        <asp:Label ID="lblMsg3" runat="server" Visible="False" BackColor="White"></asp:Label> 
                    </td>
                </tr>
                <tr>
                    <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                        <asp:Label ID="RotuloTitulo" runat="server" Font-Size="X-Small" Text="Visualizar / ocultar campos"></asp:Label>&nbsp;&nbsp;
                        </td>
                </tr> 
                <tr>
                    <td style="height: 30px; background-color: #d6e0ee; text-align: center">
                        <asp:GridView ID="grdDadosOpcoesCampos" runat="server" CellPadding="4" HorizontalAlign="Center" 
                                PageSize="4" Width="582px" AutoGenerateColumns="False">
                            <Columns>
                                <asp:BoundField DataField="Descricao" HeaderText="Campo / coluna" />
                                <asp:TemplateField HeaderText="Visualizar">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkVisualizarOpcoesCampos" runat="server" AutoPostBack="True" OnCheckedChanged="chkVisualizarOpcoesCampos_Clicked" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Campo" HeaderText="" />
                                <asp:BoundField DataField="Visualizar" HeaderText="" />
                            </Columns>
                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                            <EditRowStyle BackColor="#999999" />
                            <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                            <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>
                        <br />
                    </td>
                </tr>
            </table>
        </asp:Panel>
            <%--<br /><br />--%>
        </td>
        </tr>

        <tr >
        <td colspan="2" align="center">
            <asp:Panel ID="pnlAlertas" runat="server" Visible="False" Width="1000px">
                <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                        border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                        background-color: #a6cdcc">
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:LinkButton ID="lnkOcultarAlertas" runat="server">Ocultar</asp:LinkButton>
                            <br /> 
                        </td>
                    </tr>
                    <tr>
                    <td style="height: 20px; background-color: #5d7b9d; text-align: center " 
                            align="center">
                        <asp:Label ID="TituloAlertas" runat="server" ForeColor="Yellow" Text="Alertas"></asp:Label>
                     </td>
                    </tr> 
                </table>
                <asp:GridView ID="grdDadosAlertas" runat="server" AutoGenerateColumns="False" 
                    CellPadding="4" HorizontalAlign="Center" PageSize="4" Width="1000px">
                    <Columns>
                        <asp:CommandField ButtonType="Image" DeleteImageUrl="~/Imagens/Delete2.png" 
                            SelectImageUrl="~/Imagens/Edit2.png" SelectText="" ShowDeleteButton="True" 
                            ShowSelectButton="False" HeaderText="_______"  HeaderStyle-ForeColor="#5D7B9D" />
                        <asp:BoundField DataField="Alerta" HeaderText="Nº" />
                        <asp:BoundField DataField="NumeroEmpregado" HeaderText="Nº Empregado" />
                        <asp:BoundField DataField="Nome" HeaderText="Nome" />
                        <asp:BoundField DataField="Data" HeaderText="Data" />
                        <asp:BoundField DataField="Mensagem" HeaderText="Mensagem" />
                        <asp:BoundField DataField="CriadoPorNome" HeaderText="Criado Por" />
                        <asp:BoundField DataField="CriadoEm" HeaderText="Criado Em" />
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <EditRowStyle BackColor="#999999" />
                    <PagerSettings FirstPageImageUrl="~/Imagens/SetaPrimeiro.png" 
                        LastPageImageUrl="~/Imagens/SetaUltimo.png" Mode="NextPreviousFirstLast" 
                        NextPageImageUrl="~/Imagens/SetaDireita.png" Position="Bottom" 
                        PreviousPageImageUrl="~/Imagens/SetaEsquerda.png" Visible="true" />
                    <PagerStyle BackColor="#F7F6F3" Font-Size="Small" ForeColor="#5D7B9D" 
                        HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
                <br />
        </asp:Panel>
        </td>
        </tr>

        <tr><td colspan="2">
        <asp:GridView ID="grdDados" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="Vertical" Width="100%" AllowPaging="True" >
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <Columns>
            <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                SelectImageUrl="~/Imagens/Edit2.png" 
                DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
            <asp:BoundField DataField="NumeroEmpregado" HeaderText="Núm" />
            <asp:BoundField DataField="Nome" HeaderText="Nome" />
            <asp:BoundField DataField="CentroCusto" HeaderText="Centro Custo" />
            <asp:BoundField DataField="Grupo1Caracteristica1" HeaderText="Grupo1Caracteristica1" />
            <asp:BoundField DataField="Grupo1Caracteristica2" HeaderText="Grupo1Caracteristica2" />
            <asp:BoundField DataField="Grupo1Caracteristica3" HeaderText="Grupo1Caracteristica3" />
            <asp:BoundField DataField="Grupo2Caracteristica1" HeaderText="Grupo2Caracteristica1" />
            <asp:BoundField DataField="Grupo2Caracteristica2" HeaderText="Grupo2Caracteristica2" />
            <asp:BoundField DataField="Grupo2Caracteristica3" HeaderText="Grupo2Caracteristica3" />
            <asp:BoundField DataField="Grupo3Caracteristica1" HeaderText="Grupo3Caracteristica1" />
            <asp:BoundField DataField="Grupo3Caracteristica2" HeaderText="Grupo3Caracteristica2" />
            <asp:BoundField DataField="Grupo3Caracteristica3" HeaderText="Grupo3Caracteristica3" />
            <asp:BoundField HeaderText="Dia" />
            <asp:BoundField DataField="Data" HeaderText="Data" ReadOnly="True" />
            <asp:BoundField DataField="DataInicio" HeaderText="In&#237;cio" DataFormatString="{0:d}" />
            <asp:BoundField DataField="DataFim" HeaderText="Fim" DataFormatString="{0:d}" />
            <asp:BoundField DataField="Horas" HeaderText="Horas" DataFormatString="{0:t}"/>
            <asp:TemplateField HeaderText="Justificação" >
            <ItemTemplate>
                <asp:DropDownList ID="dropFaltas" runat="server" AutoPostBack="True" 
                    Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropFaltas_Load" 
                    onselectedindexchanged="dropFaltas_SelectedIndexChanged" >
                </asp:DropDownList>
                </span>
            </ItemTemplate>                            
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Confirmação">
                <ItemTemplate>
                <asp:DropDownList ID="DropConfirmacao" runat="server" AutoPostBack="True" 
                    Font-Size="X-Small" CssClass="drop" Height="19px" onload="DropConfirmacao_Load" 
                    onselectedindexchanged="DropConfirmacao_SelectedIndexChanged">
                </asp:DropDownList>
                </span>
                </ItemTemplate>
            </asp:TemplateField>
            <%--<asp:BoundField DataField="Notas" HeaderText="Notas"/>--%>
            <asp:TemplateField HeaderText="Notas">
                <ItemTemplate>
                    <table cellpadding="0" cellspacing="0" class="style3">
                        <tr>
                        <td>
                            <asp:Label ID="lblNotas" runat="server" />
                            <asp:imagebutton ID="btnNotas" runat="server"  
                                Height="12px" OnClick="btnNotas_Click" ImageUrl="~/Imagens/Edit2.png" ToolTip="Editar notas. / Anexar documento 'Pdf'." Width="12px" />
                        </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
            <%--<asp:ImageField DataAlternateTextField="Imagem" HeaderText="Doc" 
                NullImageUrl="~/Imagens/pdf.png" ReadOnly="True">
            </asp:ImageField>--%>
            <asp:TemplateField HeaderText="doc.">
                <ItemTemplate>
                    <table cellpadding="0" cellspacing="0" class="style3">
                        <tr>
                        <td>
                            <asp:imagebutton ID="btnPdf" runat="server"   
                                Height="12px" OnClick="btnVerPdf_Click" ImageUrl="~/Imagens/pdf.png" ToolTip="Baixar documento 'Pdf'." Width="12px" />
                            <asp:imagebutton ID="btnAnexarPdf" runat="server"   
                                Height="12px" OnClick="btnAnexarPdf_Click" ImageUrl="~/Imagens/Edit2.png" ToolTip="Anexar documento 'Pdf'." Width="12px" />
                            <asp:imagebutton ID="btnEliminarPdf2" runat="server"   
                                Height="12px" OnClick="btnEliminarPdf2_Click" ImageUrl="~/Imagens/Delete2.png" ToolTip="Eliminar documento 'pdf'." Width="12px" />
                        </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <table cellpadding="0" cellspacing="0" class="style3">
                        <tr>
                        <td>
                            <asp:imagebutton ID="btnRegistadoPor" runat="server"  
                                Height="12px" OnClick="btnRegistadoPor_Click" ImageUrl="~/Imagens/Informacao1.png" ToolTip="" Width="12px" />
                        </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="CodigoFalta" HeaderText=""/>
            <asp:BoundField DataField="ConfirmacaoFalta" HeaderText=""/>
            <asp:BoundField DataField="DiadeSemana" HeaderText="" />
            <asp:BoundField DataField="IdObjecto" HeaderText="" /> 
            <asp:BoundField DataField="EnviadoPara" HeaderText="" /> 
            <asp:BoundField DataField="RegistadoPor" HeaderText="" />
            <asp:BoundField DataField="RegistadoEm" HeaderText="" />
        </Columns>
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <EditRowStyle BackColor="#999999" />
        <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
        <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:GridView>
        </td></tr>

        <tr>
            <td colspan="2" style="height: 12px" align="right" >
            <asp:Panel ID="pnlOpcoesRodape" runat="server" Visible="True" Width="100%" BackColor="#5d7b9d">
                <asp:ImageButton ID="btnOpcoesCampos" runat="server"  ImageUrl="~/Imagens/Config.png" ToolTip="Configurar ocultação campos/colunas"/>&nbsp;
                <asp:CheckBox ID="ChkVisualizarTotais" runat="server" ForeColor="White" 
                    Text="Visualizar Totais" TextAlign="Left" Visible="False" 
                    AutoPostBack="True" />&nbsp;
                <asp:Label ID="RotuloGrelha" runat="server" Text="Grelha: " 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboGrelha" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black">
                    <asp:ListItem Value="0">Vertical</asp:ListItem>
                    <asp:ListItem Value="1">Horizontal</asp:ListItem>
                    <asp:ListItem Value="2">Ambos</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:Label ID="RotuloLinhasPagina" runat="server" Text="Paginação Linhas:" 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:TextBox ID="txtLinhasPagina" runat="server" BorderColor="White" 
                    BorderWidth="0px" Font-Size="X-Small" Height="18px" Width="30px" 
                    BackColor="#5D7B9D" ForeColor="White" ></asp:TextBox>
                <asp:Label ID="Label13" runat="server" Text="Posição: " 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboPaginacaoPosicao" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black">
                    <asp:ListItem Value="0">Em baixo</asp:ListItem>
                    <asp:ListItem Value="1">Em cima</asp:ListItem>
                    <asp:ListItem Value="2">Em ambos</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:Label ID="Label14" runat="server" Text="Tipo: " 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboPaginacaoTipo" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black">
                    <asp:ListItem Value="2">Botões</asp:ListItem>
                    <asp:ListItem Value="3">Nº pág.</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:ImageButton ID="btnEditarOpcoes" runat="server"  ImageUrl="~/Imagens/Edit2.png" ToolTip="Gravar opções"/>&nbsp;
            </asp:Panel>
            </td>                 
        </tr>
    </table>
</asp:Content>

