<%@ page language="VB" masterpagefile="~/MasterPageLogOff.master" autoeventwireup="false" inherits="loginpage, App_Web_cxqzk3b2" title="Cronos - Módulo web" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div align="center" >
    <asp:Panel ID="pnlLoginPicagem" runat="server" style="text-align: center" BorderStyle="None" >
        <asp:ImageButton ID="btnAcessoImagem" runat="server" ImageUrl="~/Imagens/Splash.jpg" TabIndex="1" />
        <table border="0" cellpadding="0" cellspacing="0" align="center">
            <tr >
            <td style="height: 30px; background-color: #4c668b; text-align: center; width: 450px;" align="center" >
                <table border="0" cellpadding="0" cellspacing="0" style="width: 450px" >
                    <tr>
                    <td style="width: 100px; height: 12px" align="center"> 
                        <asp:Label ID="RotuloIdentificador" runat="server" Text="Identificador:" ForeColor="White"></asp:Label>
                    </td>
                    <td style="width: 100px; height: 16px"> 
                        <asp:TextBox ID="txtUID" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" Width="75px"></asp:TextBox>
                    </td>
                    <td style="width: 160px; height: 12px"> 
                        <asp:Label ID="RotuloPalavraPasse" runat="server" Text="Palavra-passe:" ForeColor="White"></asp:Label>
                    </td>
                    <td style="width: 100px; height: 16px"> 
                        <asp:TextBox ID="txtPassword" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" Width="70px" TextMode="Password"></asp:TextBox>
                    </td>
                    <td style="width: 60px; height: 16px"> 
                        <asp:Button ID="btnOk" runat="server" Font-Size="Small" Text="OK" visible="True" Width="45px" EnableTheming="True" UseSubmitBehavior="True" />
                    </td>
                    <td style="width: 60px; height: 16px"> 
                        <asp:Button ID="btnPonto" runat="server" Font-Size="Small" Text="Ponto" visible="False" Width="45px" UseSubmitBehavior="True" />
                    </td>
                    <td style="width: 60px; height: 16px"> 
                        <asp:Button ID="btnObra" runat="server" Font-Size="Small" Text="Obra" visible="False" Width="45px" UseSubmitBehavior="True" />
                    </td>
                    <td style="width: 60px; height: 16px"> 
                        <asp:Button ID="btnBH" runat="server" Font-Size="Small" Text="BH" visible="False" Width="45px" UseSubmitBehavior="True" />
                    </td>
                    <td style="width: 30px; height: 16px"> 
                        <asp:ImageButton ID="btnVoltar" runat="server" ImageUrl="~/Imagens/SetaEsquerda.png" ToolTip="Voltar / Novo registo" Width="40px" visible="False"/>
                    </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="9" style="text-align: center; width: 450px;">
                        <asp:Panel ID="Panel3" runat="server" BackColor="#D6E0EE" Width="450px">                   
                            <br />
                            <asp:Label ID="txtPassWordOld" runat="server" Font-Size="Small" ForeColor="Red" Visible="False"></asp:Label>
                            <asp:Label ID="lblMsg" runat="server" Font-Size="Small" ForeColor="Red" Visible="False"></asp:Label>&nbsp;
                            <asp:LinkButton ID="EmailbtnMailEnvioReconfirmarBH" runat="server" Visible="False">Confirmar</asp:LinkButton>&nbsp;&nbsp;
                            <asp:Label ID="lblUtilizadorRegistado" runat="server" Font-Size="Small" ForeColor="Red" Visible="False"></asp:Label>
                            <asp:Label ID="lblAplicacao" runat="server" Font-Size="Small" ForeColor="Red" Visible="False"></asp:Label>
                            <asp:Label ID="lblAccao" runat="server" Font-Size="Small" ForeColor="Red" Visible="False"></asp:Label>
                            <asp:Label ID="lblFiltro" runat="server" Font-Size="Small" ForeColor="Red" Visible="False"></asp:Label>
                            <asp:Label ID="lblTodasFases" runat="server" Font-Size="Small" ForeColor="Red" Visible="False"></asp:Label>
                            <asp:Label ID="lblObrasSeleccao" runat="server" Font-Size="Small" ForeColor="Red" Visible="False"></asp:Label>
                            <asp:Label ID="lblBHSaldo" runat="server" Font-Size="Small" ForeColor="Red" Visible="False"></asp:Label>
                            <asp:Label ID="lblBHSaldoSinal" runat="server" Font-Size="Small" ForeColor="Red" Visible="False"></asp:Label>
                            <asp:Label ID="lblBHFaltaPeriodo" runat="server" Font-Size="Small" ForeColor="Red" Visible="False"></asp:Label>
                            <asp:Label ID="lblEvento" runat="server" BackColor="White" Visible="False"></asp:Label>
                            <asp:Label ID="lblLoginComLeitor" runat="server" BackColor="White" Visible="False"></asp:Label>
                        </asp:Panel>
                        </td>
                    </tr>

                </table>
            </td>
            </tr>

            <tr>
                <td style="text-align: center; width: 450px;" >
                    <asp:Panel ID="pnlPassWord" runat="server" Visible="False" BackColor="#D6E0EE" Width="450px">                   
                        <br />
                        <asp:Label ID="RotuloAlterarPassWord" runat="server" Height="16px" Text="Alteração da palavra-passe" ></asp:Label>
                        <br />
                        <br />
                        <asp:Label ID="LabelNovaChave" runat="server" Height="16px" 
                                        Text="Nova palavra-passe:" Width="123px"></asp:Label>
                        <asp:TextBox ID="txtNovaPassWord" runat="server" BorderColor="Black" 
                            BorderWidth="1px" Font-Size="X-Small" Width="59px" TextMode="Password"></asp:TextBox>
                        <br />
                        <asp:Label ID="LabelNovaChave0" runat="server" Height="16px" 
                            Text="Confirmação:" Width="123px"></asp:Label>
                        <asp:TextBox ID="txtConfirmacaoPassWord" runat="server" BorderColor="Black" 
                            BorderWidth="1px" Font-Size="X-Small" Width="59px" TextMode="Password"></asp:TextBox>
                        <br /><br />
                        <asp:LinkButton ID="lnkGravarPassWord" runat="server" ForeColor="#336699">Gravar</asp:LinkButton>
                        <br /><br />
                        <asp:Label ID="RotuloNivelPassword" runat="server" Height="16px" Text="" Width="300px"></asp:Label>
                        <br /><br />
                    </asp:Panel>
                </td>
            </tr>
        </table>
    </asp:Panel>

    <asp:Panel ID="pnlObraEmCurso" runat="server" Visible="False">                   
    <table border="0" cellpadding="0" cellspacing="0" >
        <tr>
            <td colspan="8" style="text-align: right; width: 600px;" >
                <asp:Label ID="RotuloObraCurso" runat="server" Text="OT em Curso:" BackColor="#D6E0EE" Visible="True"></asp:Label>&nbsp;
                <asp:TextBox ID="txtObraCurso" runat="server" Font-Size= "Small"  Visible="True" Width="90px"></asp:TextBox>&nbsp;&nbsp;
                <asp:TextBox ID="txtClienteCurso" runat="server" Font-Size= "Small"  Visible="True" Width="90px"></asp:TextBox>&nbsp;&nbsp;
            </td>
        </tr>
    </table>
    </asp:Panel>

    <br />
    <asp:Panel ID="pnlObraEquipa" runat="server" Visible="False" style="text-align: center" BorderStyle="None" BackColor="#D6E0EE" width="600">                   
    <table >

        <tr>
        <td>
            <br />
            <asp:Label ID="RotuloObra" runat="server" BackColor="#D6E0EE" Text="Obra" Visible="False"></asp:Label>&nbsp;
            <asp:DropDownList ID="cboObra" runat="server" AutoPostBack="True" 
                BackColor="White" Font-Size="Medium" Height="20px" style="margin-left: 0px" 
                Visible="False" Width="450px">
            </asp:DropDownList>&nbsp;
            <asp:ImageButton ID="btnTodasObras" runat="server" 
                ImageUrl="~/Imagens/LupaMais.png" ToolTip="Todas as Obras activas." 
                Visible="False" />
            <asp:ImageButton ID="btnObrasEmpregado" runat="server" 
                ImageUrl="~/Imagens/LupaMenos.png" 
                ToolTip="Apenas Obras associadas ao empregado." Visible="False" />&nbsp;&nbsp;
            <br /> <br />
            <asp:Label ID="RotuloCodigoObra" runat="server" BackColor="#D6E0EE" Text="Obra" 
                Visible="False"></asp:Label>&nbsp;
            <asp:TextBox ID="txtCodigoObra" runat="server" Font-Size= "Medium"  Visible="False" Width="90px"></asp:TextBox>&nbsp;&nbsp;
            <asp:Label ID="RotuloFase" runat="server" BackColor="#D6E0EE" Text="Fase" 
                Visible="False"></asp:Label>&nbsp;
            <asp:TextBox ID="txtCodigoFase" runat="server" Font-Size="Medium" Visible="False" Width="30px"></asp:TextBox>
            <asp:DropDownList ID="cboFase" runat="server" AutoPostBack="True" 
                BackColor="White" Font-Size="Medium" Height="20px" style="margin-left: 0px" 
                Visible="False"></asp:DropDownList> &nbsp;
            <asp:ImageButton ID="btnTodasFases" runat="server" 
                ImageUrl="~/Imagens/LupaMais.png" ToolTip="Todas as Fases activas." 
                Visible="False" />
            <asp:ImageButton ID="btnFasesEmpregado" runat="server" 
                ImageUrl="~/Imagens/LupaMenos.png" 
                ToolTip="Apenas Fases associadas ao empregado." Visible="False" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:ImageButton ID="btnAdicionarObras" runat="server" 
                ImageUrl="~/Imagens/EditMais.png" ToolTip="Seleccionar várias obras." 
                Visible="True" />&nbsp;&nbsp;
            <asp:Button ID="btnConfirmar" runat="server" Font-Size="Medium" 
                Text="Confirmar" UseSubmitBehavior="True" visible="False" Width="90px" />
            <br /> <br />
            <asp:ListBox ID="lstObras" runat="server" AutoPostBack="true" Rows="1" 
                Visible="False"></asp:ListBox>
            <asp:ListBox ID="lstObrasFases" runat="server" AutoPostBack="true" Rows="1" 
                Visible="False"></asp:ListBox>
            </td>
        </tr>

    </table>
    <br />
    <table >
            <asp:GridView ID="grdDadosEquipa" runat="server" AllowPaging="True" 
                AutoGenerateColumns="False" CellPadding="4" GridLines="Vertical" PageSize="16" Width="600px">
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <Columns>
                    <asp:TemplateField AccessibleHeaderText="Teste" HeaderText="Empregado">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropEmpregado" runat="server" AutoPostBack="True" 
                                CssClass="drop" Font-Size="Small" Height="19px" onload="dropEmpregado_Load" 
                                onselectedindexchanged="dropEmpregado_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Presente/Ausente" 
                        meta:resourcekey="TemplateFieldResource1">
                        <ItemTemplate>
                            <asp:Button ID="btnActivo" runat="server" BackColor="#D6E0EE" 
                                Font-Size="Small" Height="20px" OnClick="btnActivo_Click" Text="Presente" 
                                Width="80px" />
                        </ItemTemplate>
                        <ItemStyle Width="40px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="NumeroEmpregado" HeaderText="Empregado" />
                    <asp:BoundField DataField="Equipa" HeaderText="Equipa" />
                    <asp:BoundField DataField="Activo" HeaderText="Activo" />
                </Columns>
                <RowStyle BackColor="#D6E0EE" ForeColor="#333333" />
                <EditRowStyle BackColor="#999999" />
                <PagerSettings FirstPageImageUrl="Imagens/SetaPrimeiro.png" 
                    LastPageImageUrl="Imagens/SetaUltimo.png" Mode="NextPreviousFirstLast" 
                    NextPageImageUrl="Imagens/SetaDireita.png" Position="Bottom" 
                    PreviousPageImageUrl="Imagens/SetaEsquerda.png" Visible="true" />
                <PagerStyle BackColor="#F7F6F3" Font-Size="Small" ForeColor="#5D7B9D" 
                    HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="#D6E0EE" ForeColor="#284775" />
            </asp:GridView>
    </table>
        <br />
    <table width="600">
        <tr>
        <td align="center" >
        <asp:Panel ID="Panel2" runat="server" BackColor="#5d7b9d">                   
            <asp:Label ID="RotuloRegistoObra0" runat="server" Text="Registo Obra " ForeColor="White"></asp:Label>&nbsp;
            <asp:DropDownList ID="cboRegistoObra0" runat="server" AutoPostBack="True" 
                BackColor="White" Font-Size="X-Small" ForeColor="Black">
                <asp:ListItem Value="0">Opção 0</asp:ListItem>
                <asp:ListItem Value="1">Opção 1</asp:ListItem>
                <asp:ListItem Value="2">Opção 2</asp:ListItem>
            </asp:DropDownList> &nbsp; 
            <asp:ImageButton ID="btnPesquisarCampos" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
            <asp:ImageButton ID="btnOcultarPesquisarCampos" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
        </asp:Panel>
        </td>
        </tr>

    </table>
    </asp:Panel>

    <asp:Panel ID="pnlObras" runat="server" Visible="False">                   
    <table border="0" cellpadding="0" cellspacing="0" >
        <tr>
            <td style="text-align: right; width: 1000px;" >
                <asp:Button ID="btnConfirmarObrasSeleccao" runat="server" Font-Size="X-Small" Text="Confirmar" visible="False" Height="40px" Width="80px" UseSubmitBehavior="True" />
            </td>
        </tr>
        <tr>
            <td colspan="8" style="text-align: Left; width: 1000px;" >
                <br />
                <asp:GridView ID="grdDadosObrasSeleccao" runat="server" CellPadding="4" 
                        GridLines="Vertical" Width="100%" AllowPaging="True" PageSize="16" 
                        AutoGenerateColumns="False" style="margin-left: 0px" Visible="False">
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <Columns>
                        <asp:CommandField SelectText="" ShowSelectButton="False" ButtonType="Image" 
                            DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                        <asp:BoundField DataField="OT" HeaderText="" />
                        <asp:BoundField DataField="OrdemTrabalho" HeaderText="OT" />
                        <asp:BoundField DataField="Firma" HeaderText="Cliente" />
                        <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                        <asp:BoundField DataField="Emissor" HeaderText="" />
                        <asp:BoundField DataField="OrdemTrabalho" HeaderText="" />
                        <asp:BoundField DataField="Oficina" HeaderText="" />
                    </Columns>
                    <RowStyle BackColor="#D6E0EE" ForeColor="#333333" Font-Size="Large" />
                    <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="#D6E0EE" ForeColor="#284775" />
                </asp:GridView>

                <br />
                <asp:GridView ID="grdDadosObras" runat="server" CellPadding="4" 
                        GridLines="Vertical" Width="100%" AllowPaging="True" PageSize="16" 
                        AutoGenerateColumns="False" style="margin-left: 0px" Visible="False">
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <Columns>
                        <asp:BoundField DataField="OT" HeaderText="" />
                        <asp:BoundField DataField="OrdemTrabalho" HeaderText="OT" />
                        <asp:BoundField DataField="Firma" HeaderText="Cliente" />
                        <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                        <asp:TemplateField meta:resourcekey="TemplateFieldResource1" 
                            HeaderText="" >
                        <ItemTemplate>
                        <asp:Button ID="btnSeleccaoObra" runat="server" BackColor="#D6E0EE" Height="40px" OnClick="btnSeleccaoObra_Click"
                            Text="OK" Font-Size="X-Small" Width="80px"></asp:Button>
                        </ItemTemplate>
                        <ItemStyle Width="40px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Emissor" HeaderText="" />
                        <asp:BoundField DataField="OrdemTrabalho" HeaderText="" />
                        <asp:BoundField DataField="Oficina" HeaderText="" />
                    </Columns>
                    <RowStyle BackColor="#D6E0EE" ForeColor="#333333" Font-Size="Large" />
                    <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="#D6E0EE" ForeColor="#284775" />
                </asp:GridView>

            </td>
        </tr>

        <tr>
            <td colspan="2" style="height: 12px" align="right" >
            <asp:Panel ID="Panel1" runat="server" BackColor="#5D7B9D">
                <asp:ImageButton ID="btnOpcoesCampos" runat="server"  
                    ImageUrl="~/Imagens/Config.png" ToolTip="Configurar ocultação campos/colunas" 
                    Width="16px"/>&nbsp;
                <asp:Label ID="RotuloRegistoObra" runat="server" Text="Registo Obra " ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboRegistoObra" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black" AutoPostBack="True">
                    <asp:ListItem Value="0">Opção 0</asp:ListItem>
                    <asp:ListItem Value="1">Opção 1</asp:ListItem>
                    <asp:ListItem Value="2">Opção 2</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:Label ID="RotuloLinhasPagina" runat="server" Text="Paginação Linhas:" 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:TextBox ID="txtLinhasPagina" runat="server" BorderColor="White" 
                    BorderWidth="0px" Font-Size="X-Small" Height="18px" Width="30px" 
                    BackColor="#5D7B9D" ForeColor="White" ></asp:TextBox>
                <asp:Label ID="Label2" runat="server" Text="Posição: " 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboPaginacaoPosicao" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black">
                    <asp:ListItem Value="0">Em baixo</asp:ListItem>
                    <asp:ListItem Value="1">Em cima</asp:ListItem>
                    <asp:ListItem Value="2">Em ambos</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:Label ID="Label3" runat="server" Text="Tipo: " 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboPaginacaoTipo" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black">
                    <asp:ListItem Value="2">Botões</asp:ListItem>
                    <asp:ListItem Value="3">Nº pág.</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:ImageButton ID="btnGravarOpoes" runat="server"  ImageUrl="~/Imagens/Edit2.png" ToolTip="Gravar opções"/>&nbsp;
            </asp:Panel>
            </td>                 
        </tr>

    </table>
    </asp:Panel>

    <asp:Panel ID="pnlOpcoesCampos" runat="server" Visible="False" Width="650px">
        <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>

    <asp:Panel ID="pnlFases" runat="server" Visible="False">                   
    <table border="0" cellpadding="0" cellspacing="0" >
        <tr>
            <td colspan="8" style="text-align: right; width: 600px;" >
                <asp:Label ID="RotuloVisualizarFases" runat="server" Text="Visualizar:" BackColor="#D6E0EE" Visible="False"></asp:Label>&nbsp;
                <asp:ImageButton ID="btnTodasFases2" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Todas as Fases activas." Visible="False" />
                <asp:ImageButton ID="btnFasesEmpregado2" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Apenas Fases associadas ao empregado." Visible="False" />&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="8" style="text-align: Left; width: 600px;" >
                    <asp:GridView ID="grdDadosFases" runat="server" CellPadding="4" 
                        GridLines="Vertical" Width="100%" AllowPaging="True" PageSize="16" 
                        AutoGenerateColumns="False" style="margin-left: 0px">
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <Columns>
                        <asp:BoundField DataField="Fase" HeaderText="Fase" />
                        <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                        <asp:BoundField DataField="MinutosPrevistosFase" HeaderText="H. Previstas" />
                        <asp:BoundField DataField="NumeroMinutos" HeaderText="H. Realizadas" />
                        <asp:BoundField DataField="Saldo" HeaderText="H. Disponíveis" />
                        <asp:TemplateField meta:resourcekey="TemplateFieldResource1" 
                            HeaderText="" >
                        <ItemTemplate>
                        <asp:Button ID="btnSeleccaoFase" runat="server" BackColor="#D6E0EE" Height="40px" OnClick="btnSeleccaoFase_Click"
                            Text="OK" Font-Size="X-Small" Width="80px"></asp:Button>
                        </ItemTemplate>
                        <ItemStyle Width="40px" />
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle BackColor="#D6E0EE" ForeColor="#333333" Font-Size="Large" />
                    <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="#D6E0EE" ForeColor="#284775" />
                </asp:GridView>

            </td>

        </tr>

    </table>
    </asp:Panel>

    <asp:Panel ID="pnlBH" runat="server" Visible="False" style="text-align: center" BorderStyle="None" BackColor="#D6E0EE" width="750">                   
        <table >
            <asp:Panel ID="pnlEmailResponsavel" runat="server" Visible="False" style="text-align: center" BorderStyle="None" BackColor="#D6E0EE" width="750" Wrap="False">                   
            <tr>
            <td colspan="2" align="right">
                <asp:DropDownList ID="cboJustificacaoExtra" runat="server" Font-Size="Small" 
                    AutoPostBack="True" Enabled="True" BackColor="#d6e0ee" Visible="False"></asp:DropDownList>
                <asp:Label ID="RotuloMailConfirmar" runat="server" Text="Enviar Email para: " BackColor="#D6E0EE" Visible="True" Font-Size="Medium"></asp:Label>&nbsp;
                <asp:Label ID="lblNumeroEmpregadoResponsavel" runat="server" Text="" BackColor="#D6E0EE" Visible="False" Font-Size="Medium"></asp:Label>&nbsp;
                <asp:Label ID="lblEmailResponsavel" runat="server" Text="" BackColor="#D6E0EE" Visible="True" Font-Size="Medium"></asp:Label>&nbsp;
                <asp:Label ID="lblNomeResponsavel" runat="server" Text="" BackColor="#D6E0EE" Visible="False" Font-Size="Medium"></asp:Label>&nbsp;
                <asp:Button ID="BHEmailbtnMailConfirmar" runat="server" BackColor="#D6E0EE" Height="40px" OnClick="BHEmailbtnMailConfirmar_Click"
                    Text="Enviar" Width="55px" Font-Bold="True" Font-Size="small"></asp:Button >&nbsp;&nbsp;
                <br /><br />
            </td>
            </tr>
            </asp:Panel>

            <tr>
            <td >
            <table width="750" >
                <asp:GridView ID="grdDadosBH" runat="server" CellPadding="2" 
                    GridLines="Vertical" Width="746" AllowPaging="True" PageSize="1" 
                    AutoGenerateColumns="False" style="margin-left: 0px" >
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <Columns>
                        <asp:BoundField DataField="Nome" HeaderText="Nome" />
                        <asp:BoundField DataField="Saldo" HeaderText="Saldo Banco Horas" />
                        <asp:BoundField DataField="Sinal" HeaderText="" />
                    </Columns>
                    <RowStyle BackColor="#D6E0EE" ForeColor="#333333" Font-Size="Large" />
                    <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="#D6E0EE" ForeColor="#284775" />
                </asp:GridView>

                <asp:GridView ID="grdDadosFaltas" runat="server" CellPadding="4" 
                    GridLines="Vertical" Width="746" AllowPaging="True" PageSize="5" 
                    AutoGenerateColumns="False" style="margin-left: 0px" >
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <Columns>
                        <asp:BoundField DataField="AbreviaturaFalta" HeaderText="Justificação" ReadOnly="True" />
                        <asp:BoundField HeaderText="Dia" />
                        <asp:BoundField DataField="DataInicio" HeaderText="Início" ReadOnly="True" />
                        <asp:TemplateField HeaderText="Horas">
                            <ItemTemplate>
                                <table >
                                    <tr>
                                        <td>
                                            <asp:Button ID="btnNumeroHorasMenos" runat="server" BackColor="#D6E0EE" Font-Bold="True" Font-Size="Medium"   
                                                Height="40px" OnClick="btnNumeroHorasMenos_Click" Text="- H" 
                                                ToolTip="Diminuir horas." Width="40px" />
                                            <asp:Button ID="btnNumeroHorasMais" runat="server" BackColor="#D6E0EE" Font-Bold="True" Font-Size="Medium"
                                                Height="40px" OnClick="btnNumeroHorasMais_Click" Text="+ H" 
                                                ToolTip="Aumentar." Width="40px" />
                                        </td>
                                        <td style="text-align: center">
                                            <asp:Label ID="lblFaltasHoras" runat="server" Text='<%# Bind("Horas") %>' Width="50px"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Button ID="btnNumeroMinutosMenos" runat="server" BackColor="#D6E0EE" Font-Bold="True" Font-Size="Medium"   
                                                Height="40px" OnClick="btnNumeroMinutosMenos_Click" Text="- M" 
                                                ToolTip="Diminuir minutos." Width="40px" />
                                            <asp:Button ID="btnNumeroMinutosMais" runat="server" BackColor="#D6E0EE" Font-Bold="True" Font-Size="Medium"
                                                Height="40px" OnClick="btnNumeroMinutosMais_Click" Text="+ M" 
                                                ToolTip="Aumentar." Width="40px" />
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Periodo">
                            <ItemTemplate>
                                <asp:DropDownList ID="DropPeriodo" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="DropPeriodo_SelectedIndexChanged" 
                                    SelectedValue='<%# Bind("Periodo") %>' Font-Size="Medium" Height="19px" BackColor="#D6E0EE">
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem Value="0">Todo o Dia</asp:ListItem>
                                    <asp:ListItem Value="1">Manhã</asp:ListItem>
                                    <asp:ListItem Value="2">Tarde</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ConfirmacaoFaltaDesc" HeaderText="Confirmação" ReadOnly="True" />
                        <asp:TemplateField meta:resourcekey="TemplateFieldResource1" 
                            HeaderText="" >
                        <ItemTemplate>
                        <asp:Button ID="btnAnularFalta" runat="server" BackColor="#D6E0EE" Height="40px" OnClick="btnAnularFalta_Click"
                            Text="Anular" Width="55px" Font-Bold="True" Font-Size="small"></asp:Button >
                        </ItemTemplate>
                        <ItemStyle Width="40px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="CodigoFalta" HeaderText="" ReadOnly="True" />
                        <asp:BoundField DataField="DiadeSemana" HeaderText="" ReadOnly="True" />
                        <asp:BoundField DataField="Horas" HeaderText="" DataFormatString="{0:t}"/>
                        <asp:BoundField DataField="Dias" HeaderText="" ReadOnly="True"/>
                        <asp:BoundField DataField="EnviadoPara" HeaderText="" ReadOnly="True"/>
                    </Columns>
                    <RowStyle BackColor="#D6E0EE" ForeColor="#333333" Font-Size="Large" />
                    <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="#D6E0EE" ForeColor="#284775" />
                </asp:GridView>
            </table>
            <table width="750">
                <tr>
                    <td colspan="2" align="right" >
                        <asp:ImageButton ID="btnFaltasOpcoesCampos" runat="server"  
                            ImageUrl="~/Imagens/Config.png" ToolTip="Configurar ocultação campos/colunas" 
                            Width="16px"/>&nbsp;&nbsp;
                        <asp:Label ID="RotuloFalta" runat="server" Text="Falta: " BackColor="#D6E0EE" Visible="True" Font-Size="Small"></asp:Label>&nbsp;
                        <asp:DropDownList ID="cboFalta" runat="server" Font-Size="Small" 
                            AutoPostBack="True" Enabled="True" BackColor="#d6e0ee" Visible="False"></asp:DropDownList>
                        <asp:Label ID="RotuloConfirmacaoFalta" runat="server" Text="Confirmação: " BackColor="#D6E0EE" Visible="True" Font-Size="Small"></asp:Label>&nbsp;
                        <asp:DropDownList ID="cboConfirmacaoFalta" runat="server" Font-Size="Small" 
                            AutoPostBack="True" Enabled="True" BackColor="#d6e0ee" Visible="False"></asp:DropDownList>
                    </td>                 
                </tr>
            </table>
            <table width="750" >
                <tr>
                    <td colspan="2" align="center">
                    <asp:Calendar 
                        ID="Calendario01" runat="server" BackColor="#D6E0EE" ForeColor= "DarkBlue"  
                            Height="335px" Width="746px" 
                            Font-Size= "Large"  NextPrevFormat= "ShortMonth" 
                            Font-Bold="True" >
                        <TitleStyle BackColor="#5D7B9D" />
                    </asp:Calendar>
                    </td>
                </tr>
            </table>

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

    <asp:Panel ID="pnlEmail" runat="server" Visible="False" Width="100%" HorizontalAlign="Center">
        <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                border-top: black 1px solid; border-left: black 1px solid; width: 96%; border-bottom: black 1px solid;
                background-color: #d6e0ee" >
            <tr>
            <td colspan="8" style="height: 20px; background-color: #d6e0ee; text-align: center">
                <br />
                <asp:Label ID="TituloEMail" runat="server" Font-Size="X-Small" 
                    Text="Envio de correio eletrónico"></asp:Label>
                &nbsp;
                <br />
                <br />
                <asp:Label ID="EmailRotuloDe" runat="server" Height="18px" 
                    Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;De:"></asp:Label>
                &nbsp;
                <asp:TextBox ID="EmailtxtDe" runat="server" BorderColor="Black" 
                    BorderWidth="1px" Font-Size="X-Small" Width="320px"></asp:TextBox>
                <asp:TextBox ID="TextBox9" runat="server" BorderColor="#d6e0ee" 
                BorderWidth="1px" Font-Size="X-Small" Width="0px" Wrap="True" BackColor="#d6e0ee"></asp:TextBox>&nbsp;&nbsp;
                <asp:ImageButton ID="btnEmailServidorSmtp" runat="server" 
                    ImageUrl="~/Imagens/Config2.png" 
                    ToolTip="Configuração do Servidor de envio de correio" />
                &nbsp;&nbsp;
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Imagens/Mail.png" 
                    ToolTip="Confirmar Envio de E-Mail" Width="16px" />
                &nbsp;
                <asp:LinkButton ID="EmailbtnSair" runat="server">Sair</asp:LinkButton>
                <br /> <br />
                <asp:Label ID="EmailRotulocc" runat="server" Height="18px" 
                    Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cc:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtEmailcc" runat="server" BorderColor="Black" 
                    BorderWidth="1px" Font-Size="X-Small" Width="320px" Wrap="True"></asp:TextBox>
                &nbsp;
                <asp:TextBox ID="TextBox10" runat="server" BorderColor="#d6e0ee" 
                BorderWidth="1px" Font-Size="X-Small" Width="0px" Wrap="True" BackColor="#d6e0ee"></asp:TextBox>
                <br /> <br />
                <asp:Label ID="EmailRotuloAssunto" runat="server" Height="18px" 
                    Text="&nbsp;Assunto:" ></asp:Label>&nbsp;
                <asp:TextBox ID="EmailtxtAssunto" runat="server" BorderColor="Black" 
                    BorderWidth="1px" Font-Size="X-Small" Width="400px" Wrap="True"></asp:TextBox>
                &nbsp;
                <br /><br />
                <asp:Label ID="RotuloEmailResponsavel" runat="server" Height="18px" 
                    Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E-mail Responsável:" Visible="False"></asp:Label>&nbsp;
                <asp:TextBox ID="txtEmailResponsavel" runat="server" BorderColor="Black" 
                    BorderWidth="1px" Font-Size="X-Small" Width="360px" Wrap="False" Visible="False"></asp:TextBox>
                &nbsp;
                <asp:LinkButton ID="lnkEmailTrabalhoGravar" runat="server" Visible="False">Gravar</asp:LinkButton>
                &nbsp;
                <asp:LinkButton ID="lnkEmailTrabalhoSair" runat="server" Visible="False">Sair</asp:LinkButton>
                <br /><br />
                <asp:GridView ID="grdDadosEmail" runat="server" AutoGenerateColumns="False" 
                    CellPadding="4" HorizontalAlign="Center" PageSize="4" Width="1000px">
                    <Columns>
                        <asp:CommandField ButtonType="Image" DeleteImageUrl="~/Imagens/Delete2.png" 
                            SelectImageUrl="~/Imagens/Edit2.png" SelectText="" ShowDeleteButton="True" 
                            ShowSelectButton="True" HeaderText="_______"  HeaderStyle-ForeColor="#5D7B9D" />
                        <asp:BoundField DataField="NumeroEmpregado" HeaderText="Núm." />
                        <asp:BoundField DataField="Nome" HeaderText="Nome" />
                        <asp:BoundField DataField="EmailResponsavel" HeaderText="Responsável" />
                        <asp:BoundField DataField="Mensagem" HeaderText="Mensagem" />
                        <asp:BoundField DataField="Anexo" HeaderText="Anexo" />
                        <asp:BoundField DataField="Responsavel" HeaderText="" />
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <EditRowStyle BackColor="#999999" />
                    <PagerSettings FirstPageImageUrl="~/Imagens/SetaPrimeiro.png" 
                        LastPageImageUrl="~/Imagens/SetaUltimo.png" Mode="NextPreviousFirstLast" 
                        NextPageImageUrl="~/Imagens/SetaDireita.png" Position="Bottom" 
                        PreviousPageImageUrl="~/Imagens/SetaEsquerda.png" Visible="true" />
                    <PagerStyle BackColor="#F7F6F3" Font-Size="Small" ForeColor="#5D7B9D" 
                        HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
                <br />

            </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel ID="pnlEmailConfiguracao" runat="server" Width="100%" Visible="False">
        <table border="0" cellpadding="0" cellspacing="0" style="width: 96%; background-color: #a6cdcc" >
            <tr>
            <td colspan="34" style="height: 20px; background-color: #d6e0ee; text-align: center">
                <asp:Label ID="Label5" runat="server" Font-Size="X-Small" Text="Configuração do servidor de envio de correio"></asp:Label>
                <br /> <br />
                <asp:Label ID="RotuloConfiguracaoSmtp" runat="server" Height="18px" Text="Servidor de envio de correio (Smtp):" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtConfiguracaoSmtp" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="200px" Wrap="False"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="RotuloConfiguracaoPortaSmtp" runat="server" Height="18px" Text="Porta (Smtp):" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtConfiguracaoPortaSmtp" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" Wrap="False"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="RotuloConfiguracaoDe" runat="server" Height="18px" Text="De:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtConfiguracaoDe" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="200px" Wrap="False"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;
                <br /> <br />
                <asp:Label ID="RotuloConfiguracaoUserName" runat="server" Height="18px" Text="User name:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtConfiguracaoUserName" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="200px" Wrap="False"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloConfiguracaoPassWord" runat="server" Height="18px" Text="PassWord:" ></asp:Label>&nbsp;
                <asp:TextBox ID="TxtPassWord0" runat="server" BorderColor="Black" 
                    BorderWidth="0px" Font-Size="X-Small" Width="0px" TextMode="Password"></asp:TextBox>
                <asp:TextBox ID="txtConfiguracaoPassWord" runat="server" BorderColor="Black" 
                    BorderWidth="1px" Font-Size="X-Small" Width="200px" TextMode="Password"></asp:TextBox>&nbsp;&nbsp;&nbsp;
                <asp:LinkButton ID="lnkConfiguracaoGravar" runat="server">Gravar</asp:LinkButton>&nbsp;
                <asp:LinkButton ID="lnkConfiguracaoSair" runat="server">Sair</asp:LinkButton>
                <br /> <br />
            </td>
            </tr>
        </table>
    </asp:Panel>

</div>

</asp:Content>

