<%@ page language="VB" masterpagefile="~/MasterPage.master" autoeventwireup="false" inherits="ControloExtrasAnual, App_Web_arxqf21y" 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="left" colspan="2" 
                style="height: 20px; background-color: #5d7b9d; text-align: center">
            <asp:Label ID="TituloControloExtrasAnual" runat="server" Font-Bold="True" Font-Size="X-Small" ForeColor="Yellow" Text="Controlo Anual Banco Horas / Compensações"></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:DropDownList ID="cboJustificacaoExtra" runat="server" Font-Size="X-Small" AutoPostBack="True" Enabled="True" BackColor="#d6e0ee"></asp:DropDownList>
                <asp:ImageButton ID="btnControloExtrasMensal" runat="server" ImageUrl="~/Imagens/Saldos.png" PostBackUrl="ControloExtrasMensal.aspx" ToolTip="Controlo Mensal Banco Horas / Compensações" Width="30px"/>
                <%--<asp:ImageButton ID="btnRegistoPenalizacaoBH" runat="server" ImageUrl="~/Imagens/PontoObra1.png" PostBackUrl="RegistoPenalizacaoBH.aspx" ToolTip="Penalização BH por falha ponto" Width="30px"/>--%>
                <asp:ImageButton ID="btnRegistoPenalizacaoBH" runat="server" ImageUrl="~/Imagens/PontoObra1.png" ToolTip="Penalização BH por falha ponto" Width="30px"/>
                <asp:ImageButton ID="btnRegistoManualHorasPagas" runat="server" ImageUrl="~/Imagens/PontoObra.png" PostBackUrl="RegistoManualHorasPagas.aspx" ToolTip="Registo Manual Horas Pagas" Width="30px"/>
                <asp:ImageButton ID="btnExportarSaldo" runat="server" ImageUrl="~/Imagens/Exportacao.png" ToolTip="Exportar saldo para ano seguinte" Width="30px"/>
                <asp:ImageButton ID="btnTabelasAuxiliares" runat="server" ImageUrl="~/Imagens/Tabelas.png" ToolTip="Configurar tabelas auxiliares" Width="30px" Visible="True"/>
                <asp:ImageButton ID="btnOpenOffice" runat="server" ImageUrl="~/Imagens/OpenOffice.png" ToolTip="Exportar para Csv / Open Office" Width="30px"/>
                <asp:ImageButton ID="btnExcel" runat="server" ImageUrl="~/Imagens/Excel.png" ToolTip="Exportar para Excel" Width="30px"/>
                <asp:ImageButton ID="btnWord" runat="server" ImageUrl="~/Imagens/Word.png" ToolTip="Exportar para Word" 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="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:Label ID="lblPessoalCentrosCusto" runat="server" Visible="False"></asp:Label>&nbsp;
                <asp:Label ID="lblEsta_Opcao" runat="server" Visible="False"></asp:Label> 
            </td>
        </tr>

        <tr> 
            <td colspan="2">
            <asp:Panel ID="pnlEdit" 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: #a6cdcc">
                    <tr>
                        <td colspan="34" style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="lblAccao" runat="server" Visible="False"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="34" style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="Label8" runat="server" Text="Empregado:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboNumeroEmpregado" runat="server" AutoPostBack="True" 
                                Enabled="False" Font-Size="X-Small"></asp:DropDownList>&nbsp;
                            <asp:ImageButton ID="btnIndex" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar ordenação." Width="16px" />&nbsp;
                            <asp:DropDownList ID="cboNome" runat="server" Enabled="False" Font-Size="X-Small" >
                            </asp:DropDownList>&nbsp;&nbsp;
                            <asp:Label ID="RotuloAno" runat="server" Text="Ano:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtAno" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Enabled="False" Font-Size="X-Small" Width="30px" 
                                Wrap="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:Label ID="RotuloSaldoInicial" runat="server" Text="Saldo inicial / Ano anterior:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtSaldoInicial" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" Width="40px"></asp:TextBox>&nbsp;&nbsp;
<%--                            <asp:ImageButton ID="btnSaldoInicialGravar" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Gravar" Width="16px" Visible="True" />&nbsp;&nbsp;
--%>                            <asp:LinkButton ID="lnkSair" runat="server">Sair</asp:LinkButton>
                            <br />  <br />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            </td>
        </tr>

        <tr> 
            <td colspan="2">
            <asp:Panel ID="pnlExportarSaldos" 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: #a6cdcc">
                    <tr>
                        <td colspan="34" style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <br />  
                            <asp:Label ID="RotuloMes" runat="server" Text="Exportar saldos para ano seguinte."></asp:Label>&nbsp;
                            <%--<asp:DropDownList ID="cboMeses" runat="server" AutoPostBack="True" 
                                Enabled="False" Font-Size="X-Small"></asp:DropDownList>&nbsp; &nbsp;--%>
                            <asp:LinkButton ID="lnkConfirmarExportacao" runat="server">Confirmar</asp:LinkButton>&nbsp; &nbsp;
                            <asp:LinkButton ID="lnkCancelarExportacao" runat="server">Cancelar</asp:LinkButton>
                            <br />  <br />
                        </td>
                    </tr>
                </table>
            </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: White; text-align: center" 
                        align="left"> 
                        <asp:Label ID="lblMsg2" runat="server" Visible="False" BackColor="White"></asp:Label> 
                    </td>
                </tr>

                <tr>
                    <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                        <asp:Label ID="RotuloTabela" runat="server" Font-Size="X-Small" Text="Tabela:"></asp:Label>&nbsp;&nbsp;
                        <asp:DropDownList ID="cboTabela" runat="server" AutoPostBack="True" 
                            Font-Size="X-Small" Width="200px" Height="20px"> </asp:DropDownList>
                        <%--<asp:Label ID="Label6" runat="server" Text="Centros de Custo"></asp:Label>--%>
                    </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" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="47px"></asp:TextBox>&nbsp;
                        <asp:Label ID="Label6" runat="server" Text="Descrição:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtDescricaoTabelaAuxiliar" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="235px"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloValor" runat="server" Text="Paga:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtValor" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="60px"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloDataInicio" runat="server" Text="Data Início:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtDataInicio" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="60px"></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="RotuloLimiteHorasTransferirMesSeguinte" runat="server" Text="Máx. H. Mês a Transferir:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtLimiteHorasTransferirMesSeguinte" runat="server" BorderColor="Black" BorderWidth="1px"
                            Font-Size="X-Small" Width="38px" ToolTip="Limite de horas a tranferir para o mês seguinte."></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloFactorBH" runat="server" Text="Factor:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtFactorBH" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="50px"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloCompensacao" runat="server" Text="Factor:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtCompensacao" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="50px"></asp:TextBox>&nbsp;
<%--                        <asp:Label ID="RotuloValorHora" runat="server" Text="Valor hora:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtValorHora" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="50px"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloMaxHorasEscalao" runat="server" Text="Máx. H. escalão:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtMaxHorasEscalao" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="38px"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloMaxHorasMes" runat="server" Text="Máx. H. Mês:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtMaxHorasMes" runat="server" BorderColor="Black" BorderWidth="1px"
                            Font-Size="X-Small" Width="38px" ToolTip="Limite a partir do qual o código é alterado p/ código escalão superior. (É necessário definir 2 ou mais códigos do mesmo grupo)."></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloMaxHorasAno" runat="server" Text="Máx. H. Ano:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtMaxHorasAno" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="38px" ToolTip="Limite a partir do qual deixa de ser cálculado."></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloGrupo" runat="server" Text="Grupo:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtGrupo" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="38px"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloConversaoExportacao" runat="server" Text="Conversão Exportação:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtConversaoExportacao" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="60px"></asp:TextBox>&nbsp;&nbsp--%>
                        <asp:ImageButton ID="btnTabelaAuxiliarNovoFiltro" runat="server" 
                            ImageUrl="~/Imagens/Add2.png" ToolTip="Novo registo." />&nbsp;&nbsp;
                        <asp:ImageButton ID="btnTabelaAuxiliarAlterarFiltro" runat="server" 
                            ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar registo." Width="16px" />&nbsp;&nbsp;
                        <asp:LinkButton ID="lnkTabelaAuxiliarSair" runat="server" Visible="True">Sair</asp:LinkButton>
                        <br />  <br />
                        <asp:GridView ID="grdDadosTabelasAuxiliares" runat="server" CellPadding="4" HorizontalAlign="Center" 
                                AllowPaging="True" PageSize="18" 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:BoundField DataField="Valor" HeaderText="Paga" />
                                <asp:TemplateField HeaderText="Controlo Compensações">
                                <ItemTemplate>
                                    <asp:DropDownList ID="dropSaldoAnterior" runat="server" AutoPostBack="True" 
                                        Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropSaldoAnterior_Load" 
                                        onselectedindexchanged="dropSaldoAnterior_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    </span>
                                </ItemTemplate>                            
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Periodicidade Compensação">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="DropPeriodicidadeCompensacao" runat="server" AutoPostBack="True" 
                                            onselectedindexchanged="DropPeriodicidadeCompensacao_SelectedIndexChanged" 
                                            SelectedValue='<%# Bind("Meses") %>' Font-Size="X-Small" Height="19px">
                                            <asp:ListItem></asp:ListItem>
                                            <asp:ListItem Value="1">Mensal</asp:ListItem>
                                            <asp:ListItem Value="2">Bimestral</asp:ListItem>
                                            <asp:ListItem Value="3">Trimestral</asp:ListItem>
                                            <asp:ListItem Value="12">Anual</asp:ListItem>
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="DataInicio" HeaderText="Data Início" />
                                <asp:TemplateField HeaderText="Activar Compensação">
                                <ItemTemplate>
                                    <asp:DropDownList ID="dropCompensacaoFaltas" runat="server" AutoPostBack="True" 
                                        Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropCompensacaoFaltas_Load" 
                                        onselectedindexchanged="dropCompensacaoFaltas_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    </span>
                                </ItemTemplate>                            
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Tipo Compensação">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="DropHorariosTipoCompensacao" runat="server" AutoPostBack="True" 
                                            onselectedindexchanged="DropHorariosTipoCompensacao_SelectedIndexChanged" 
                                            SelectedValue='<%# Bind("TipoCompensacao") %>' Font-Size="X-Small" Height="19px">
                                            <asp:ListItem></asp:ListItem>
                                            <asp:ListItem Value="0">Permitir compensação após ausência</asp:ListItem>
                                            <asp:ListItem Value="1">Só se tiver saldo à data da ausência</asp:ListItem>
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="SaldoAnterior" HeaderText="" />
                                <asp:BoundField DataField="Meses" HeaderText="" />
                                <asp:BoundField DataField="Compensacao" HeaderText="" />
                                <asp:BoundField DataField="TipoCompensacao" 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 style="height: 20px; background-color: #d6e0ee; text-align: center">
                        <asp:GridView ID="grdDadosTabelaExtras" 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="Escalao" HeaderText="Código" />
                                <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                                <asp:BoundField DataField="Abreviatura" HeaderText="Abreviatura" />
                                <asp:BoundField DataField="LimiteHorasTransferirMesSeguinte" HeaderText="Máx. H. Mês a Transf" />
                                <%--<asp:TemplateField HeaderText="Banco Horas">
                                <ItemTemplate>
                                    <asp:DropDownList ID="dropCodigoBancoHoras" runat="server" AutoPostBack="True" 
                                        Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropCodigoBancoHoras_Load" 
                                        onselectedindexchanged="dropCodigoBancoHoras_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    </span>
                                </ItemTemplate>                            
                                </asp:TemplateField>--%>
                                <asp:TemplateField HeaderText="Controlo Extras">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="DropControloExtras" runat="server" AutoPostBack="True" 
                                            onselectedindexchanged="DropControloExtras_SelectedIndexChanged" 
                                            SelectedValue='<%# Bind("ControloExtras") %>' Font-Size="X-Small" Height="19px">
                                            <asp:ListItem></asp:ListItem>
                                            <asp:ListItem Value="0">Só confirmadas</asp:ListItem>
                                            <asp:ListItem Value="1">Todos os registos</asp:ListItem>
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Banco Horas">
                                <ItemTemplate>
                                    <asp:DropDownList ID="dropBancoHoras" runat="server" AutoPostBack="True" 
                                        Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropBancoHoras_Load" 
                                        onselectedindexchanged="dropBancoHoras_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    </span>
                                </ItemTemplate>                            
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Justificação Extras">
                                <ItemTemplate>
                                    <asp:DropDownList ID="dropCompensacaoExtras" runat="server" AutoPostBack="True" 
                                        Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropCompensacaoExtras_Load" 
                                        onselectedindexchanged="dropCompensacaoExtras_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    </span>
                                </ItemTemplate>                            
                                </asp:TemplateField>
                                <asp:BoundField DataField="PercentagemBH" HeaderText="Factor BH" />
                                <asp:TemplateField HeaderText="Visível">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkWeb" runat="server" AutoPostBack="True" OnCheckedChanged="chkWeb_Clicked" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="SubTurno" HeaderText="" />
                                <asp:BoundField DataField="Compensacao" HeaderText="" />
                                <asp:BoundField DataField="CodigoBancoHoras" HeaderText="" />
                                <asp:BoundField DataField="Web" 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>
                        <asp:GridView ID="grdDadosOpcoesFiltros" runat="server"  
                                AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                                    PageSize="4" Width="600px">
                        <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 />  
                        <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="RotulocboCamposOpcoesFiltros" runat="server" Text="Campo:" Visible="False"></asp:Label>&nbsp;
                        <asp:DropDownList ID="cboCamposOpcoesFiltros" 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="RotuloValorOpcoesFiltros" runat="server" Text="Valor:" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtValorOpcoesFiltros" 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="800px" 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">
            <asp:GridView ID="grdDados" runat="server" CellPadding="4" ForeColor="#333333" GridLines="Vertical" Width="100%" AllowPaging="True" PageSize="16">
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <Columns>
                </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: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="Label2" 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="Label3" 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="btnGravarOpoes" runat="server"  ImageUrl="~/Imagens/Edit2.png" ToolTip="Gravar opções"/>&nbsp;
            </asp:Panel>
            </td>                 
        </tr>

        <asp:Panel ID="pnlDadosBimestral" runat="server" Visible="False" Width="100%" BackColor="#5d7b9d">
            <asp:GridView ID="grdDadosBimestral" runat="server" CellPadding="4" ForeColor="#333333" GridLines="Vertical" Width="100%" AllowPaging="True" PageSize="16">
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <Columns>
                </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>
        </asp:Panel>

    </table>
</asp:Content>

