<%@ page language="VB" masterpagefile="~/MasterPage.master" autoeventwireup="false" inherits="HorariosPessoalDataVigor, App_Web_cxqzk3b2" 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="20" style="height: 20px; background-color: #5d7b9d; text-align: center">
            <asp:Label ID="NomeForm" runat="server" Font-Bold="True" Font-Size="X-Small" ForeColor="Yellow" Text="Horários Pessoal / Data em Vigor"></asp:Label></td>
        </tr>
        <tr>
            <td colspan="8" 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 colspan="12" style="height: 20px; background-color: #5d7b9d; text-align: Right" >
                <asp:ImageButton ID="lnkInserir" runat="server" ImageUrl="~/Imagens/Add.png" ToolTip="Inserir novo horário" Width="30px"/>
                <asp:ImageButton ID="lnkAlterardePara" runat="server" ImageUrl="~/Imagens/Edit.png" ToolTip="Alteração em bloco" Width="30px" Visible="False"/>
                <asp:ImageButton ID="lnkEliminar" runat="server" ImageUrl="~/Imagens/Delete.png" ToolTip="Eliminação em bloco" Width="30px" Visible="False"/>
                <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="btnControlo2CentroCustoCategoria" runat="server" ImageUrl="~/Imagens/Calendario1.png" PostBackUrl="~/Controlo2CentroCustoCategoria.aspx" ToolTip="Controlo por centro de custo / categoria" Width="30px" Visible="False"/>
                <asp:ImageButton ID="btnHorariosPessoal" runat="server" ImageUrl="~/Imagens/Horarios.png" ToolTip="Horários Pessoal - Grelha" Width="30px"/>
                <asp:ImageButton ID="btnTurnoDataGrelha" runat="server" ImageUrl="~/Imagens/Escalas.png" ToolTip="Gestão de turnos / escalas" Width="30px" Visible="True"/>
                <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="20" 
                style="height: 20px; background-color: White; text-align: center" 
                align="left"> 
                <asp:Label ID="lblMsg" runat="server" Visible="False" BackColor="White"></asp:Label> &nbsp;&nbsp;
                <asp:Label ID="lblIndex" runat="server" Visible="False">NumeroEmpregado</asp:Label>&nbsp;&nbsp;
                <asp:Label ID="lblSqlFiltro" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblSqlFiltroTurnoData" 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="lblAccao" runat="server" Visible="False"></asp:Label>&nbsp;&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="lblNumeroEmpregado" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblFiltroHorario" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblDataInicio" runat="server" Visible="False"></asp:Label> 
                <asp:Label ID="lblDataFim" runat="server" Visible="False"></asp:Label> 
                <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="lblSqlFiltroOpcao19" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblTurno" runat="server" Visible="False"></asp:Label>
                <asp:Label ID="lblSqlFiltroData" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblCentrosCusto" runat="server" Visible="False"></asp:Label>&nbsp;
                <asp:Label ID="lblCampoCor" runat="server" Visible="False"></asp:Label>&nbsp;
            </td>
        </tr>

        <tr>
            <td colspan="20" style="text-align: center">
                <asp:Panel ID="pnlEditDataVigor" 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 colspan="20" style="height: 20px; background-color: #d6e0ee; text-align: center">
                        <br />
                        <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="RotuloOficina" runat="server" Text="Oficina:"></asp:Label>&nbsp;
                        <asp:DropDownList ID="cboOficina" runat="server" AutoPostBack="True" 
                            Enabled="True" Font-Size="X-Small" Visible="True">
                        </asp:DropDownList>&nbsp;&nbsp;
                        <asp:Label ID="RotuloEmpregados" runat="server" Text="Empregados:" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="TxtEmpregados" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small"
                            Width="200px" Visible="False"></asp:TextBox>
                        <asp:Label ID="RotuloEmpregado" 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." />&nbsp;
                        <asp:ImageButton ID="btnEmpregados" runat="server" ImageUrl="~/Imagens/EditMais.png" ToolTip="Activar / desactivar. Inserir vários empregados, separados por ','" Width="16px" />&nbsp;
                        <asp:ImageButton ID="btnEmpregadosSelecionados" runat="server" 
                            ImageUrl="~/Imagens/Add2.png" ToolTip="Afectar a Empregados, todos os empregados seleccionados." Width="16px" Visible="False" />&nbsp;
                        <br />
                    </td>
                    </tr>
                    <tr>
                    <td colspan="20" style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="RotuloDataVigor" runat="server" Text="Data em Vigor:"></asp:Label>&nbsp;&nbsp;
                            <asp:TextBox ID="txtDataVigor" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Enabled="False" Font-Size="X-Small" Width="60px" Wrap="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:Label ID="RotuloHorario" runat="server" Text="Horário:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboHorario" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" >
                            </asp:DropDownList>&nbsp;&nbsp;
                            <asp:Label ID="RotuloTurno" runat="server" Text="Turno:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboTurno" runat="server" AutoPostBack="True" Font-Size="X-Small" >
                            </asp:DropDownList>&nbsp;&nbsp;&nbsp;
                            <asp:ImageButton ID="btnInserirHorario" runat="server" ImageUrl="~/Imagens/EditMais.png" ToolTip="Inserir horário em vigor numa data anterior." Width="16px" />&nbsp;
                            <asp:Label ID="RotuloHorarioVigor" runat="server" Text="horário em vigor:" 
                                Visible="False"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtDataVigorAnterior" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Font-Size="X-Small" Width="60px" Wrap="False" 
                                Visible="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkGravarDataVigor" runat="server">Gravar</asp:LinkButton>
                                &nbsp;&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkCancelarDataVigor" runat="server">Cancelar</asp:LinkButton>
                        </td>
                        </tr>
                    <tr>
                    <td colspan="20" style="height: 12px; text-align: center"><asp:Label ID="Label3" runat="server" Visible="False"></asp:Label></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: 96%; 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: 96%; 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%" HorizontalAlign="Center">
                    <table border="0" cellpadding="0" cellspacing="0" style="width: 96%; background-color: #a6cdcc">
                    <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>

                <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="34" style="height: 20px; background-color: #d6e0ee;" align="left">
                                <asp:Label ID="RotuloCampo" runat="server" Text="Seleccionar Campo:"></asp:Label>&nbsp;
                                <asp:DropDownList ID="cboCampo" runat="server" AutoPostBack="True" 
                                    Font-Size="X-Small" Width="130px">
                                </asp:DropDownList>&nbsp;&nbsp;
                            </td>
                        </tr> 
                        <tr>
                            <td colspan="34" 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="60px" Visible="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:DropDownList ID="cboAlterarDe" runat="server" Font-Size="X-Small" 
                                    Width="195px" AutoPostBack="True" 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="60px" Visible="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:DropDownList ID="cboAlterarPara" runat="server" Font-Size="X-Small" 
                                    Width="195px" AutoPostBack="True" 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>


            </td>
        </tr>


        <tr>
        <td colspan="34" style="text-align: center">
            <asp:Panel ID="pnlTabelasAuxiliares" runat="server" Visible="False" Width="100%">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color: #d6e0ee">
                <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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="RotuloAbreviaturaExcelLimites" runat="server" 
                            Text="Limites abreviatura na exportação para excel:" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtAbreviaturaExcelLimites" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="10px" Visible="False"></asp:TextBox>&nbsp;
                    </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="RotuloDescricaoTabelaAuxiliar" 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="RotuloCpo3" runat="server" Text="" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtcpo3" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="60px" Visible="False" ></asp:TextBox>&nbsp;&nbsp;
                        <%--<asp:Label ID="RotuloCpo4" runat="server" Text="" Visible="False" ></asp:Label>&nbsp;
                        <asp:TextBox ID="txtcpo4" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="60px" Visible="False" ></asp:TextBox>&nbsp;&nbsp;--%>
                        <%--<asp:ImageButton ID="btnCor" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Escolher cor" Width="16px" />&nbsp;&nbsp;--%>
                        <asp:Label ID="RotuloCpo5" runat="server" Text="" Visible="False" ></asp:Label>&nbsp;
                        <asp:TextBox ID="txtcpo5" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="60px" Visible="False" ></asp:TextBox>&nbsp;&nbsp;
                        <asp:Label ID="RotuloCpo6" runat="server" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtcpo6" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Visible="False" Width="60px"></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 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">Sair</asp:LinkButton>
                        <br />  <br />
                        <asp:GridView ID="grdDadosTabelasAuxiliares" runat="server" CellPadding="4" HorizontalAlign="Center" 
                                AllowPaging="True" PageSize="12" 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="Activo">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkTurnoActivo" runat="server" AutoPostBack="True" OnCheckedChanged="chkTurnoActivo_Clicked" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <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>

                    </td>
                </tr>
            </table>
            </asp:Panel>
        </td>
        </tr>

        <tr>
        <td colspan="34" style="text-align: center">
        <asp:Panel ID="pnlCores" runat="server" Visible="False" Width="100%">
                <asp:ImageButton ID="btnCoresActivas" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Cores activas." Visible="False" />
                <asp:ImageButton ID="btnCoresDesactivas" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Cores não activas." />&nbsp;&nbsp;
                <asp:LinkButton ID="lnkCoresOcular" runat="server">Ocultar</asp:LinkButton>
                <br /><br />
                <asp:GridView ID="grdDadosCores" runat="server" CellPadding="4" HorizontalAlign="Center" 
                        PageSize="4" Width="702px" AutoGenerateColumns="False" 
                    Visible="True" >
                    <Columns>
                        <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                            SelectImageUrl="~/Imagens/Edit2.png" />
                        <asp:BoundField DataField="ID" HeaderText="ID" />
                        <asp:BoundField DataField="Cor" HeaderText="Cor" />
                        <asp:BoundField DataField="Codigo" HeaderText="Código" />
                        <asp:TemplateField HeaderText="Activa">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkActiva" runat="server" AutoPostBack="True" OnCheckedChanged="chkActiva_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Activa" HeaderText="CpoActiva" />
                    </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>


        <asp:Panel ID="pnlHorarios" runat="server" Visible="False" Width="100%">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;background-color: #d6e0ee">
            <tr>
            <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                <asp:Label ID="RotuloHorariosHorario" runat="server" Text="Código:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosHorario" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" AutoPostBack="True"></asp:TextBox>&nbsp;
                <asp:Label ID="Label10" runat="server" Text="Descrição:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosHorarioDesc" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="150px"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloTipoHorario" runat="server" Text="Tipo:" ></asp:Label>&nbsp;
                <asp:DropDownList ID="cboTipoHorario" runat="server" AutoPostBack="True" Enabled="True" Font-Size="X-Small" Visible="True"> </asp:DropDownList>&nbsp;&nbsp;
                <asp:Label ID="RotuloHorariosAbreviatura" runat="server" Text="Abreviatura:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosAbreviatura" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="60px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloCorTexto" runat="server" Text="Cor Texto:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtCorTextoHorarios" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="50px" ></asp:TextBox>
                <asp:ImageButton ID="btnCorTextoHorarios" runat="server" 
                        ImageUrl="~/Imagens/Edit2.png" ToolTip="Escolher cor" Width="16px" />&nbsp;&nbsp;
                <asp:Label ID="RotuloCorFundo" runat="server" Text="Cor Fundo:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtCorFundoHorarios" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="50px" ></asp:TextBox>
                <asp:ImageButton ID="btnCorFundoHorarios" runat="server" 
                        ImageUrl="~/Imagens/Edit2.png" ToolTip="Escolher cor" Width="16px" />&nbsp;&nbsp;
                <asp:Label ID="RotuloHorasSemanais" runat="server" Text="H. semanais:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosHorasSemanais" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloToleranciaDia" runat="server" Text="Tolerância dia:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosToleranciaDia" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;

                <br /> 
                <asp:Label ID="RotuloActualizarHorario" runat="server" Text="Intervalo p/ Act. Horário:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosActualizarHorario" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloInicioDia" runat="server" Text="Início do dia:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosInicioDia" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloFimDia" runat="server" Text="Fim do dia:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosFimDia" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloHorariosHorasMensais" runat="server" Text="H. mensais:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosHorasMensais" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloHorasTurno" runat="server" Text="H. turno:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosHorasTurno" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloCreditoFaltaMensal" runat="server" Text="Crédito falta mensal:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtCreditoFaltaMensal" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloCreditoFaltaAnual" runat="server" Text="Crédito Falta anual:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtCreditoFaltaAnual" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloFaltaMensal" runat="server" Text="Falta mensal:" ></asp:Label>&nbsp;
                <asp:DropDownList ID="cboFaltaMensal" runat="server" AutoPostBack="True" Enabled="True" Font-Size="X-Small" Visible="True"> </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="RotuloMaximoBHMensal" runat="server" Text="Máximo BH mensal:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtMaximoBHMensal" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloToleranciaPontoPrevisto" runat="server" Text="Tolerância Ponto Prev. Almoço:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtToleranciaPontoPrevisto" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;

                <br /> 
                <asp:ImageButton ID="btnImportarHorario" runat="server" 
                    ImageUrl="~/Imagens/Importar3.png" 
                    ToolTip="Importar configuração de outro horário." Width="16px" Visible="False" />&nbsp;&nbsp;
                <asp:DropDownList ID="cboImportarHorario" runat="server" AutoPostBack="False" 
                    Font-Size="X-Small" Visible="False"> </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="RotuloInserir" runat="server" Text="Inserir" ForeColor="#336699"></asp:Label>
                <asp:ImageButton ID="btnHorariosNovoRegisto" runat="server" 
                    ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir Novo horário." />&nbsp;&nbsp;
                <asp:Label ID="RotuloAlterar" runat="server" Text="Alterar" ForeColor="#336699" ></asp:Label>
                <asp:ImageButton ID="btnHorariosAlterarRegisto" runat="server" 
                    ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar horário." Width="16px" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:LinkButton ID="lnkCancelarHorarios" runat="server">Sair</asp:LinkButton>
                <br />  <br />

                <asp:GridView ID="grdDadosHorarios" runat="server" CellPadding="4" 
                    ForeColor="#333333" GridLines="Vertical" Width="100%" AllowPaging="True" 
                    AutoGenerateColumns="False" Visible="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="DescHorario" HeaderText="Horário" />
                        <asp:BoundField DataField="Abreviatura" HeaderText="Abreviatura"/>
                        <asp:TemplateField HeaderText="Tipo">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropTipoHorario" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropTipoHorario_Load" 
                                onselectedindexchanged="dropTipoHorario_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:BoundField DataField="IntervaloActualizarHorario" HeaderText="Int. p/act. Horário"/>
                        <asp:TemplateField HeaderText="Ponto p/ act. horário">
                            <ItemTemplate>
                                <asp:DropDownList ID="DropTipoActualizacaoHorario" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="DropTipoActualizacaoHorario_SelectedIndexChanged" 
                                    SelectedValue='<%# Bind("TipoActualizacaoHorario") %>' Font-Size="X-Small" Height="19px">
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem Value="0">Entrada</asp:ListItem>
                                    <asp:ListItem Value="1">Saida</asp:ListItem>
                                    <asp:ListItem Value="2">Ent./Sai.</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="HoraInicioDia" HeaderText="Início Dia"/>
                        <asp:BoundField DataField="HoraFimDia" HeaderText="Fim Dia"/>
                        <asp:TemplateField HeaderText="cálc. autom.">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkInicioFimDiaAutomatico" runat="server" AutoPostBack="True" OnCheckedChanged="chkInicioFimDiaAutomatico_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ToleranciaDia" HeaderText="Tolerância Dia"/>
                        <asp:BoundField DataField="HorasSemanais" HeaderText="Horas Semana"/>
                        <asp:TemplateField HeaderText="Anular T. Ref.">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkHorariosAnularTempRefeicao" runat="server" AutoPostBack="True" OnCheckedChanged="chkHorariosAnularTempRefeicao_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ToleranciaAnularTempos" HeaderText="Toler. A.T.R."/>
                        <asp:TemplateField HeaderText="Anular Extras">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkHorariosAnularTemposExtras" runat="server" AutoPostBack="True" OnCheckedChanged="chkHorariosAnularTemposExtras_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="TemposExtrasAnterioresA" HeaderText="Ant. ás"/>
                        <asp:BoundField DataField="TemposExtrasPosterioresA" HeaderText="Post. ás"/>
                        <asp:TemplateField HeaderText="Anular Ex. S.">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkHorariosAnularTemposExtrasSaldo" runat="server" AutoPostBack="True" OnCheckedChanged="chkHorariosAnularTemposExtrasSaldo_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Unidades">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropUnidadeTempo" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropUnidadeTempo_Load" 
                                onselectedindexchanged="dropUnidadeTempo_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:BoundField DataField="HorasTurno" HeaderText="Horas turno"/>
                        <asp:BoundField DataField="CorTexto" HeaderText="Cor"/>
                        <asp:TemplateField HeaderText="Cálc. Obras">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkExportarInicioFimDiaPonto" runat="server" AutoPostBack="True" OnCheckedChanged="chkExportarInicioFimDiaPonto_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Activo">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkHorariosActivo" runat="server" AutoPostBack="True" OnCheckedChanged="chkHorariosActivo_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Interromper Trab. às 00:00">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkHorariosInterromperPeriodoTrab" runat="server" AutoPostBack="True" OnCheckedChanged="chkHorariosInterromperPeriodoTrab_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Categoria">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropCategoria" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropCategoria_Load" 
                                onselectedindexchanged="dropCategoria_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <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:TemplateField HeaderText="Falha ponto">
                            <ItemTemplate>
                                <asp:DropDownList ID="DropInserirPontosEmFalta" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="DropInserirPontosEmFalta_SelectedIndexChanged" 
                                    SelectedValue='<%# Bind("InserirPontosEmFalta") %>' Font-Size="X-Small" Height="19px">
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem Value="1">Início/Fim Dia</asp:ListItem>
                                    <asp:ListItem Value="2">Incluir Almoço</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Horario" HeaderText=""/>
                        <asp:BoundField DataField="UnidadeTempo" HeaderText=""/>
                        <asp:BoundField DataField="Activo" HeaderText=""/>
                        <asp:BoundField DataField="TipoHorario" HeaderText=""/>
                        <asp:BoundField DataField="InicioFimDiaAutomatico" HeaderText=""/>
                        <asp:BoundField DataField="InterromperPeriodoTrab" HeaderText=""/>
                        <asp:BoundField DataField="Categoria" HeaderText="" />
                        <asp:BoundField DataField="CodigoExtra" HeaderText=""/>
                        <asp:BoundField DataField="CodigoFalta" HeaderText=""/>
                        <asp:BoundField DataField="AnularTempDuranteRefeicao" HeaderText=""/>
                        <asp:BoundField DataField="AnularTemposExtras" HeaderText=""/>
                        <asp:BoundField DataField="AnularTemposExtrasSaldo" HeaderText=""/>
                        <asp:BoundField DataField="ExportarInicioFimDiaPonto" HeaderText=""/>
                        <asp:BoundField DataField="InserirPontosEmFalta" HeaderText=""/>
                        <asp:BoundField DataField="CorFundo" HeaderText="Cor"/>
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="left" />
                    <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="34" style="height: 12px" align="right" >
                <asp:Panel ID="Panel1" runat="server" Visible="True" Width="100%" BackColor="#5d7b9d">
                    <asp:ImageButton ID="btnOpcoesCamposHorarios" runat="server"  ImageUrl="~/Imagens/Config.png" ToolTip="Horários - Configurar visualização campos/colunas"/>&nbsp;
                    <asp:Label ID="RotuloLinhasPaginaHorarios" runat="server" Text="Paginação Linhas:" 
                        ForeColor="White"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtLinhasPaginaHorarios" runat="server" BorderColor="White" 
                        BorderWidth="0px" Font-Size="X-Small" Height="12px" Width="30px" 
                        BackColor="#5D7B9D" ForeColor="White" ></asp:TextBox>
                    <asp:ImageButton ID="btnGravarOpcoesHorarios" runat="server"  ImageUrl="~/Imagens/Edit2.png" ToolTip="Gravar opções"/>&nbsp;
                </asp:Panel>
                </td>                 
            </tr>
            </table>
        </asp:Panel>

<%--            <asp:Panel ID="pnlHorariosPeriodos" 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 colspan="34">

                <br />  
                <asp:Label ID="RotuloDiaSemana" runat="server" Text="Dia:"></asp:Label>&nbsp;
                <asp:CheckBox ID="CheckBox_1" runat="server" Text="Fer" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:CheckBox ID="CheckBox1" runat="server" Text="Dom" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:CheckBox ID="CheckBox2" runat="server" Text="Seg" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:CheckBox ID="CheckBox3" runat="server" Text="Ter" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:CheckBox ID="CheckBox4" runat="server" Text="Qua" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:CheckBox ID="CheckBox5" runat="server" Text="Qui" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:CheckBox ID="CheckBox6" runat="server" Text="Sex" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:CheckBox ID="CheckBox7" runat="server" Text="Sab" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="RotuloTipoPeriodo" runat="server" Text="Tipo Período:"></asp:Label>&nbsp;&nbsp;
                <asp:DropDownList ID="cboTipoPeriodo" runat="server" AutoPostBack="True" 
                    Font-Size="X-Small" Width="120px">
                </asp:DropDownList>&nbsp;
                <asp:Label ID="RotuloInicio" runat="server" Text="Início:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtInicio" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                            Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloProcessamentoInicio" runat="server" Text="Processamento:"></asp:Label>&nbsp;&nbsp;
                <asp:DropDownList ID="cboProcessamentoInicio" runat="server" AutoPostBack="True" 
                    Font-Size="X-Small" >
                </asp:DropDownList>&nbsp;
                <asp:Label ID="RotuloToleranciaInicio" runat="server" Text="Tolerância:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtToleranciaInicio" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                            Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloFim" runat="server" Text="Fim:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtFim" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                            Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloProcessamentoFim" runat="server" Text="Processamento:"></asp:Label>&nbsp;&nbsp;
                <asp:DropDownList ID="cboProcessamentoFim" runat="server" AutoPostBack="True" 
                    Font-Size="X-Small" >
                </asp:DropDownList>&nbsp;
                <asp:Label ID="RotuloToleranciaFim" runat="server" Text="Tolerância:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtToleranciaFim" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                            Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloMinHoras" runat="server" Text="Mín. Horas:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtMinHoras" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                            Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloMaxHoras" runat="server" Text="Máx. Horas:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtMaxHoras" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                            Width="30px" ></asp:TextBox>&nbsp;
                <asp:ImageButton ID="btnHorariosPeriodosNovoRegisto" runat="server" 
                    ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir Novo registo." />&nbsp;
                <asp:ImageButton ID="btnHorariosPeriodosAlterarRegisto" runat="server" 
                    ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar registo." Width="16px" />
                <asp:LinkButton ID="lnkCancelarHorariosPeriodos" runat="server">Ocultar</asp:LinkButton>
                <br /> <br />

                <asp:GridView ID="grdDadosHorariosPeriodos" runat="server" CellPadding="4" 
                    ForeColor="#333333" GridLines="Vertical" Width="100%" AllowPaging="True" 
                    PageSize="16" AutoGenerateColumns="False" >
                    <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="Horario" HeaderText="Horário"/>
                        <asp:BoundField DataField="DescDiadeSemana" HeaderText="Dia da Semana"/>
                        <asp:TemplateField HeaderText="Tipo Período">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropTipoPeriodo" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropTipoPeriodo_Load" 
                                onselectedindexchanged="dropTipoPeriodo_SelectedIndexChanged" >
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:BoundField DataField="HoraInicio" HeaderText="Início" DataFormatString="{0:t}" 
                            ApplyFormatInEditMode="True" ReadOnly="True"/>
                        <asp:TemplateField HeaderText="Processamento">
                            <ItemTemplate>
                                <asp:DropDownList ID="DropDiaProcessamentoIni" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="DropDiaProcessamentoIni_SelectedIndexChanged" 
                                    SelectedValue='<%# Bind("DiaInicio") %>' Font-Size="X-Small" Height="19px">
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem Value="-1">Dia Anterior</asp:ListItem>
                                    <asp:ListItem Value="0">Próprio Dia</asp:ListItem>
                                    <asp:ListItem Value="1">Dia Seguinte</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ToleranciaInicio" HeaderText="Tolerância"/>
                        <asp:BoundField DataField="HoraFim" HeaderText="Fim" DataFormatString="{0:t}" 
                            ApplyFormatInEditMode="True" ReadOnly="True"/>
                        <asp:TemplateField HeaderText="Processamento">
                            <ItemTemplate>
                                <asp:DropDownList ID="DropDiaProcessamentoFim" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="DropDiaProcessamentoFim_SelectedIndexChanged" 
                                    SelectedValue='<%# Bind("DiaFim") %>' Font-Size="X-Small" Height="19px">
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem Value="-1">Dia Anterior</asp:ListItem>
                                    <asp:ListItem Value="0">Próprio Dia</asp:ListItem>
                                    <asp:ListItem Value="1">Dia Seguinte</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ToleranciaFim" HeaderText="Tolerância"/>
                        <asp:BoundField DataField="MinimoHoras" HeaderText="Mín. Horas"/>
                        <asp:BoundField DataField="MaximoHoras" HeaderText="Máx. Horas"/>
                        <asp:BoundField DataField="DiadeSemana" HeaderText=""/>
                        <asp:BoundField DataField="TipoPeriodo" HeaderText=""/>
                        <asp:BoundField DataField="Horario2" HeaderText=""/>
                        <asp:BoundField DataField="Tipo" 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 /> <br />
            </td>
            </tr>
            </table>
            </asp:Panel>
--%>
        <asp:Panel ID="pnlHorariosPeriodos" 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 colspan="34">

            <br />  
            <asp:Label ID="RotuloDiaSemana" runat="server" Text="Dia:"></asp:Label>&nbsp;
            <asp:CheckBox ID="CheckBox_1" runat="server" Text="Fer" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox1" runat="server" Text="Dom" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox2" runat="server" Text="Seg" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox3" runat="server" Text="Ter" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox4" runat="server" Text="Qua" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox5" runat="server" Text="Qui" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox6" runat="server" Text="Sex" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox7" runat="server" Text="Sab" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Label ID="RotuloTipoPeriodo" runat="server" Text="Tipo Período:"></asp:Label>&nbsp;&nbsp;
            <asp:DropDownList ID="cboTipoPeriodo" runat="server" AutoPostBack="True" 
                Font-Size="X-Small" Width="120px">
            </asp:DropDownList>&nbsp;
            <asp:Label ID="RotuloInicio" runat="server" Text="Início:"></asp:Label>&nbsp;
            <asp:TextBox ID="txtInicio" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="40px" ></asp:TextBox>&nbsp;
            <asp:Label ID="RotuloProcessamentoInicio" runat="server" Text="Processamento:"></asp:Label>&nbsp;&nbsp;
            <asp:DropDownList ID="cboProcessamentoInicio" runat="server" AutoPostBack="True" 
                Font-Size="X-Small" >
            </asp:DropDownList>&nbsp;
            <asp:Label ID="RotuloToleranciaInicio" runat="server" Text="Tolerância:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtToleranciaInicio" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <asp:Label ID="RotuloFim" runat="server" Text="Fim:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtFim" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <asp:Label ID="RotuloProcessamentoFim" runat="server" Text="Processamento:"></asp:Label>&nbsp;&nbsp;
            <asp:DropDownList ID="cboProcessamentoFim" runat="server" AutoPostBack="True" 
                Font-Size="X-Small" >
            </asp:DropDownList>&nbsp;
            <asp:Label ID="RotuloToleranciaFim" runat="server" Text="Tolerância:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtToleranciaFim" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <br /> 
            <asp:Label ID="RotuloMinHoras" runat="server" Text="Mín. Horas:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtMinHoras" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <asp:ImageButton ID="btnCalcularHoras" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Calcular horas" Width="16px"/>&nbsp;&nbsp;                        
            <asp:Label ID="RotuloMaxHoras" runat="server" Text="Máx. Horas:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtMaxHoras" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <asp:ImageButton ID="btnHorariosPeriodosNovoRegisto" runat="server" 
                ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir Novo registo." />&nbsp;
            <asp:ImageButton ID="btnHorariosPeriodosAlterarRegisto" runat="server" 
                ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar registo." Width="16px" />
            <asp:LinkButton ID="lnkCancelarHorariosPeriodos" runat="server">Ocultar</asp:LinkButton>
            <br /> <br />

            <%--<asp:Label ID="RotuloMinHoras" runat="server" Text="Mín. Horas:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtMinHoras" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <asp:Label ID="RotuloMaxHoras" runat="server" Text="Máx. Horas:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtMaxHoras" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <asp:ImageButton ID="btnHorariosPeriodosNovoRegisto" runat="server" 
                ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir Novo registo." />&nbsp;
            <asp:ImageButton ID="btnHorariosPeriodosAlterarRegisto" runat="server" 
                ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar registo." Width="16px" />
            <asp:LinkButton ID="lnkCancelarHorariosPeriodos" runat="server">Ocultar</asp:LinkButton>
            <br /> <br />--%>

            <asp:GridView ID="grdDadosHorariosPeriodos" runat="server" CellPadding="4" 
                ForeColor="#333333" GridLines="Vertical" Width="100%" AllowPaging="True" 
                PageSize="16" AutoGenerateColumns="False" >
                <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="Horario" HeaderText="Horário"/>
                    <asp:BoundField DataField="DescDiadeSemana" HeaderText="Dia da Semana"/>
                    <asp:TemplateField HeaderText="Tipo Período">
                    <ItemTemplate>
                        <asp:DropDownList ID="dropTipoPeriodo" runat="server" AutoPostBack="True" 
                            Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropTipoPeriodo_Load" 
                            onselectedindexchanged="dropTipoPeriodo_SelectedIndexChanged" >
                        </asp:DropDownList>
                        </span>
                    </ItemTemplate>                            
                    </asp:TemplateField>
                    <asp:BoundField DataField="HoraInicio" HeaderText="Início" DataFormatString="{0:t}" 
                        ApplyFormatInEditMode="True" ReadOnly="True"/>
                    <asp:TemplateField HeaderText="Processamento">
                        <ItemTemplate>
                            <asp:DropDownList ID="DropDiaProcessamentoIni" runat="server" AutoPostBack="True" 
                                onselectedindexchanged="DropDiaProcessamentoIni_SelectedIndexChanged" 
                                SelectedValue='<%# Bind("DiaInicio") %>' Font-Size="X-Small" Height="19px">
                                <asp:ListItem></asp:ListItem>
                                <asp:ListItem Value="-1">Dia Anterior</asp:ListItem>
                                <asp:ListItem Value="0">Próprio Dia</asp:ListItem>
                                <asp:ListItem Value="1">Dia Seguinte</asp:ListItem>
                            </asp:DropDownList>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="ToleranciaInicio" HeaderText="Tolerância"/>
                    <asp:BoundField DataField="HoraFim" HeaderText="Fim" DataFormatString="{0:t}" 
                        ApplyFormatInEditMode="True" ReadOnly="True"/>
                    <asp:TemplateField HeaderText="Processamento">
                        <ItemTemplate>
                            <asp:DropDownList ID="DropDiaProcessamentoFim" runat="server" AutoPostBack="True" 
                                onselectedindexchanged="DropDiaProcessamentoFim_SelectedIndexChanged" 
                                SelectedValue='<%# Bind("DiaFim") %>' Font-Size="X-Small" Height="19px">
                                <asp:ListItem></asp:ListItem>
                                <asp:ListItem Value="-1">Dia Anterior</asp:ListItem>
                                <asp:ListItem Value="0">Próprio Dia</asp:ListItem>
                                <asp:ListItem Value="1">Dia Seguinte</asp:ListItem>
                            </asp:DropDownList>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="ToleranciaFim" HeaderText="Tolerância"/>
                    <asp:BoundField DataField="MinimoHoras" HeaderText="Mín. Horas"/>
                    <asp:BoundField DataField="MaximoHoras" HeaderText="Máx. Horas"/>
                    <asp:TemplateField HeaderText="Cód. Falta" >
                    <ItemTemplate>
                        <asp:DropDownList ID="dropHorariosPeriodosFaltas" runat="server" AutoPostBack="True" 
                            Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropHorariosPeriodosFaltas_Load" 
                            onselectedindexchanged="dropHorariosPeriodosFaltas_SelectedIndexChanged" >
                        </asp:DropDownList>
                        </span>
                    </ItemTemplate>                            
                    </asp:TemplateField>
                    <asp:BoundField DataField="DiadeSemana" HeaderText=""/>
                    <asp:BoundField DataField="TipoPeriodo" HeaderText=""/>
                    <asp:BoundField DataField="Horario2" HeaderText=""/>
                    <asp:BoundField DataField="CodigoFalta" HeaderText=""/>
                    <asp:BoundField DataField="Tipo" HeaderText=""/>
                    <asp:BoundField DataField="HoraInicio2" 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>
        </table>
        </asp:Panel>

        </td>
        </tr>

        <tr>
            <td colspan="34" style="text-align: center">
                <asp:Panel ID="pnlEditTurno" runat="server" Visible="False" Width="100%">
                <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; border-bottom: black 1px solid;">
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="Label2" runat="server" Text="Turno:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtTurno" runat="server" Enabled="False" Font-Size="X-Small" Wrap="False"></asp:TextBox>
                            <br /> 
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="RotuloTurnoDataHorario" runat="server" Text="Horário:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboTurnoDataHorario" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small"> </asp:DropDownList>&nbsp;&nbsp;
                            <asp:Label ID="RotuloTurnoDataDataInicio" runat="server" Text="Data início:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtDataInicio" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Enabled="True" Font-Size="X-Small" Width="60px" Wrap="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:Label ID="RotuloTurnoDataDataFim" runat="server" Text="Data fim:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtDataFim" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Enabled="True" Font-Size="X-Small" Width="60px" Wrap="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:ImageButton ID="btnOcultarSeleccaoDias" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Edição entre datas." Visible="False" />
                            <asp:ImageButton ID="btnActivarSeleccaoDias" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Edição por seleccão de dias." Visible="True" />&nbsp;&nbsp;&nbsp;
                            <asp:Label ID="RotuloTurnoDataDiasRotacao" runat="server" Text="Dias rotação:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtTurnoDataDiasRotacao" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Enabled="True" Font-Size="X-Small" Width="20px" 
                                Wrap="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:ImageButton ID="btnGravarHorario" runat="server" 
                                ImageUrl="~/Imagens/Ok.png" ToolTip="Gravar dados." />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Label ID="RotuloGeralDataFim" runat="server" Text="Gerar turno até:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtData" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Enabled="True" Font-Size="X-Small" Width="60px" 
                                Wrap="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:ImageButton ID="btnGerarTurno" runat="server" 
                                ImageUrl="~/Imagens/Add4.png" ToolTip="Gerar turno." Width="16px" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <%--<asp:ImageButton ID="btnConfirmarGeracao" runat="server" 
                                ImageUrl="~/Imagens/Ok.png" ToolTip="Confirmar geração do turno." 
                                Visible="False" />&nbsp;&nbsp;&nbsp;&nbsp;--%>
                            <%--<asp:ImageButton ID="btnAlterarHorario" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar registo." Width="16px" />&nbsp;&nbsp;--%>
                            <asp:ImageButton ID="btnImportarTurno" runat="server" 
                                ImageUrl="~/Imagens/Importar3.png" ToolTip="Importar configuração de outro turno." Width="16px" />&nbsp;&nbsp;
                            <asp:DropDownList ID="cboImportarTurno" runat="server" AutoPostBack="False" 
                                Font-Size="X-Small" Visible="True"> </asp:DropDownList>&nbsp;&nbsp;
                            <asp:ImageButton ID="btnDiminuirDias" runat="server" 
                                ImageUrl="~/Imagens/EditMenos.png" ToolTip="Diminuir dias a data início e data de fim." Width="16px" />&nbsp;
                            <asp:TextBox ID="txtDias" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Font-Size="X-Small" Width="16px" ></asp:TextBox>&nbsp;
                            <asp:ImageButton ID="btnAdicionarDias" runat="server" 
                                ImageUrl="~/Imagens/EditMais.png" ToolTip="Adicionar dias a data início e data de fim." Width="16px" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkSairTurno" runat="server">Sair</asp:LinkButton>
                            <br /> <br /> 
                    </td>
                    </tr>
                </table>
            </asp:Panel>

            </td>
        </tr>
        <tr>
            <td colspan="34" style="text-align: center">
                <asp:Panel ID="pnlEditTurno2" runat="server" Visible="False" Width="100%">
                <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; border-bottom: black 1px solid;">
                        <tr>
                        <td colspan="34" style="height: 20px; background-color: #d6e0ee; text-align: left ">
                        <asp:Label ID="RotuloDiadeSemana" runat="server" Text="Activar/desactivar dia da semana:"></asp:Label>&nbsp;
                        <asp:CheckBox ID="ChkDom" runat="server" Text="Dom" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:CheckBox ID="ChkSeg" runat="server" Text="Seg" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:CheckBox ID="ChkTer" runat="server" Text="Ter" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:CheckBox ID="ChkQua" runat="server" Text="Qua" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:CheckBox ID="ChkQui" runat="server" Text="Qui" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:CheckBox ID="ChkSex" runat="server" Text="Sex" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:CheckBox ID="ChkSab" runat="server" Text="Sab" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                        </td>
                        </tr>
                        <tr>
                        <td colspan="34" style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="RotuloDiaInicio" runat="server" Text="Início:"></asp:Label>&nbsp;
                            <asp:Label ID="RotuloAnoIni" runat="server" Text="Ano:"></asp:Label>&nbsp;
                            <asp:TextBox ID="TxtAnoIni" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Enabled="True" Font-Size="X-Small" Width="30px" Wrap="False"></asp:TextBox>&nbsp;
                            <asp:Label ID="RotuloMesIni" runat="server" Text="Mês:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboMes2Ini" runat="server" Enabled="True" Font-Size="X-Small" 
                                    Visible="True" AutoPostBack="True" >
                            </asp:DropDownList>&nbsp;
                            <asp:CheckBox ID="ChkDiaIni1" runat="server" Text="  1" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni2" runat="server" Text="  2" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni3" runat="server" Text="  3" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni4" runat="server" Text="  4" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni5" runat="server" Text="  5" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni6" runat="server" Text="  6" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni7" runat="server" Text="  7" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni8" runat="server" Text="  8" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni9" runat="server" Text="  9" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni10" runat="server" Text=" 10" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni11" runat="server" Text=" 11" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni12" runat="server" Text=" 12" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni13" runat="server" Text=" 13" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni14" runat="server" Text=" 14" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni15" runat="server" Text=" 15" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni16" runat="server" Text=" 16" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni17" runat="server" Text=" 17" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni18" runat="server" Text=" 18" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni19" runat="server" Text=" 19" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni20" runat="server" Text=" 20" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni21" runat="server" Text=" 21" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni22" runat="server" Text=" 22" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni23" runat="server" Text=" 23" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni24" runat="server" Text=" 24" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni25" runat="server" Text=" 25" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni26" runat="server" Text=" 26" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni27" runat="server" Text=" 27" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni28" runat="server" Text=" 28" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni29" runat="server" Text=" 29" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni30" runat="server" Text=" 30" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaIni31" runat="server" Text=" 31" TextAlign="Left" Width="16px" AutoPostBack="True" />
                        </td>
                        </tr>
                        <tr>
                        <td colspan="34" style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="RotuloDiaFim" runat="server" Text="Fim:"></asp:Label>&nbsp;
                            <asp:Label ID="RotuloanoFim" runat="server" Text="Ano:"></asp:Label>&nbsp;
                            <asp:TextBox ID="TxtAnoFim" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Enabled="True" Font-Size="X-Small" Width="30px" Wrap="False"></asp:TextBox>&nbsp;
                            <asp:Label ID="RotuloMesFim" runat="server" Text="Mês:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboMes2Fim" runat="server" Enabled="True" Font-Size="X-Small" Visible="True" AutoPostBack="True" >
                            </asp:DropDownList>&nbsp;
                            <asp:CheckBox ID="ChkDiaFim1" runat="server" Text="  1" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim2" runat="server" Text="  2" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim3" runat="server" Text="  3" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim4" runat="server" Text="  4" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim5" runat="server" Text="  5" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim6" runat="server" Text="  6" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim7" runat="server" Text="  7" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim8" runat="server" Text="  8" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim9" runat="server" Text="  9" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim10" runat="server" Text=" 10" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim11" runat="server" Text=" 11" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim12" runat="server" Text=" 12" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim13" runat="server" Text=" 13" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim14" runat="server" Text=" 14" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim15" runat="server" Text=" 15" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim16" runat="server" Text=" 16" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim17" runat="server" Text=" 17" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim18" runat="server" Text=" 18" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim19" runat="server" Text=" 19" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim20" runat="server" Text=" 20" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim21" runat="server" Text=" 21" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim22" runat="server" Text=" 22" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim23" runat="server" Text=" 23" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim24" runat="server" Text=" 24" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim25" runat="server" Text=" 25" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim26" runat="server" Text=" 26" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim27" runat="server" Text=" 27" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim28" runat="server" Text=" 28" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim29" runat="server" Text=" 29" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim30" runat="server" Text=" 30" TextAlign="Left" Width="16px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDiaFim31" runat="server" Text=" 31" TextAlign="Left" Width="16px" AutoPostBack="True" />
                            <%--<asp:ImageButton ID="btnActivarDias" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Activar/Desactivar todos os dias" />&nbsp;&nbsp;
                            <asp:LinkButton ID="btnGravar2" runat="server">Gravar</asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="btnSair2" runat="server">Sair</asp:LinkButton>--%>
                            <br /> <br />
                        </td>
                        </tr>

                </table>
            </asp:Panel>

            </td>
        </tr>

        <tr>
            <td colspan="34" style="text-align: center">
                <asp:GridView ID="grdDadosTurnoData" runat="server" HorizontalAlign="Center" 
                    CellPadding="4" Width="800" AllowPaging="True" PageSize="4" 
                    AutoGenerateColumns="False" Visible="False">
                    <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:TemplateField HeaderText="Horário">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropTurnoDataHorario" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropTurnoDataHorario_Load" 
                                onselectedindexchanged="dropTurnoDataHorario_SelectedIndexChanged" Width="200px" >
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:BoundField DataField="Abreviatura" HeaderText="Abreviatura" />
                        <asp:BoundField DataField="DataInicio" HeaderText="Data Início" />
                        <asp:BoundField DataField="DataFim" HeaderText="Data Fim" />
                        <asp:BoundField DataField="DiasRotacao" HeaderText="Rotação" />
                        <asp:BoundField DataField="ProximaDataInicio" HeaderText="Próxima Data Início" />
                        <asp:BoundField DataField="ProximaDataFim" HeaderText="Próxima Data Fim" />
                        <asp:BoundField DataField="Turno" HeaderText="" />
                        <asp:BoundField DataField="Horario" 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="34" style="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: #d6e0ee">
                    <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="34" style="text-align: center">
                <asp:Panel ID="pnlOpcoesCampos" 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 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="chkVisualizar" runat="server" AutoPostBack="True" OnCheckedChanged="chkVisualizar_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>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            </td>
            </tr>

        <tr>
            <td colspan="20">
                <asp:GridView ID="grdDados" runat="server" CellPadding="4" ForeColor="#333333" 
                    GridLines="Vertical" Width="100%" AllowPaging="True" PageSize="16" 
                    AutoGenerateColumns="False">
                <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="DescOficina" HeaderText="Oficina/Secção" />
            <asp:BoundField HeaderText="Dia" />
            <asp:BoundField DataField="DataVigor" HeaderText="Data em Vigor" />
            <asp:TemplateField HeaderText="Horário">
            <ItemTemplate>
                <asp:DropDownList ID="dropHorario" runat="server" AutoPostBack="True" 
                    Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropHorario_Load" 
                    onselectedindexchanged="dropHorario_SelectedIndexChanged" Width="200px" >
                </asp:DropDownList>
                </span>
            </ItemTemplate>                            
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Turno">
            <ItemTemplate>
                <asp:DropDownList ID="dropTurno" runat="server" AutoPostBack="True" 
                    Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropTurno_Load" 
                    onselectedindexchanged="dropTurno_SelectedIndexChanged"  Width="200px" >
                </asp:DropDownList>
                </span>
            </ItemTemplate>                            
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <table cellpadding="0" cellspacing="0" class="style3">
                        <tr>
                        <td>
                            <asp:imagebutton ID="btnVerHorarioTurno" runat="server"  
                                Height="12px" OnClick="btnVerHorarioTurno_Click" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Consultar / Configurar, Horário / Turno." Width="12px" />
                        </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Activo">
                <ItemTemplate>
                    <asp:CheckBox ID="chkHorarioActivo" runat="server" AutoPostBack="True" OnCheckedChanged="chkHorarioActivo_Clicked" />
                </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="Horario" HeaderText="" />
            <asp:BoundField DataField="Turno" HeaderText="" />
            <asp:BoundField DataField="Activo" HeaderText="" />
            <asp:BoundField DataField="DataVigor" 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 style="height: 10px; background-color: White;"> </td> </tr>
        <tr>
            <td colspan="20" 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: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="Label4" 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="Label6" 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>
    </table>
</asp:Content>

