<%@ page language="VB" masterpagefile="~/MasterPage.master" autoeventwireup="false" inherits="Refeicoes, App_Web_fmz2idm1" 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="34" style="height: 20px; background-color: #5d7b9d; text-align: center">
            <asp:Label ID="TituloRefeicoes" runat="server" Font-Bold="True" Font-Size="X-Small" ForeColor="Yellow" Text="Refeições"></asp:Label></td>
        </tr>
        <tr>
            <td style="height: 20px; background-color: #5d7b9d; text-align: left" >
                <asp:Label ID="Label1" 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;&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: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: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: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: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: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>&nbsp;
                <asp:ImageButton ID="Pesquisar" runat="server" ImageUrl="~/Imagens/Lupa2.png" ToolTip="Executar filtro" OnClientClick="target=''" Width="24px"/>
            </td>
            <td style="height: 20px; background-color: #5d7b9d; text-align: Right" >
                <asp:ImageButton ID="btnMarcacaoRefeicoes" runat="server" ImageUrl="~/Imagens/Refeicoes3.png" ToolTip="Marcação de refeições." Width="30px"/>
                <asp:ImageButton ID="btnEfectuarRefeicoes" runat="server" ImageUrl="~/Imagens/Refeicoes2.png" ToolTip="Efectuar refeições." Width="30px"/>
                <asp:ImageButton ID="btnTabelasAuxiliares" runat="server" ImageUrl="~/Imagens/Tabelas.png" ToolTip="Configurar tabelas auxiliares" Width="30px" Visible="True"/>
                <asp:ImageButton ID="btnOpenOffice" runat="server" ImageUrl="~/Imagens/OpenOffice.png" ToolTip="Exportar para Csv / Open Office" Width="30px"/>
                <asp:ImageButton ID="btnExcel" runat="server" ImageUrl="~/Imagens/Excel.png" ToolTip="Exportar para Excel" Width="30px"/>
                <asp:ImageButton ID="btnWord" runat="server" ImageUrl="~/Imagens/Word.png" ToolTip="Exportar para Word" Width="30px"/>
                <asp:ImageButton ID="btnImprimir" runat="server" ImageUrl="~/Imagens/print.gif" ToolTip="Imprimir" OnClientClick="target=''" Width="30px"/>
            </td>
        </tr>
        <tr>
            <td colspan="2" 
                style="height: 20px; background-color: White; text-align: center"> 
                <asp:Label ID="lblMsg" runat="server" Visible="False" BackColor="White"></asp:Label> 
                <asp:Label ID="lblAccao" runat="server" Visible="False" BackColor="White"></asp:Label> 
                <asp:Label ID="lblIndex" runat="server" Visible="False">NumeroEmpregado</asp:Label>&nbsp;&nbsp;
                <asp:Label ID="lblMarcacoes" runat="server" Visible="False">Marcacoes</asp:Label>&nbsp;&nbsp;
            </td>
        </tr>

        <tr>
            <td colspan="2" style="text-align: center">  
            <asp:Panel ID="pnlEditRefeicao" runat="server" Visible="False" Width="100%">
                <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                        border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                        background-color: #d6e0ee">
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="RotuloRefeicoes" runat="server" Text="Refeições"></asp:Label>
                        </td>
                    </tr> 
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:ImageButton ID="btnDiaMenosDia1" runat="server" 
                                ImageUrl="~/Imagens/EditMenos.png" ToolTip="Alterar Data para dia anterior." />&nbsp;&nbsp;
                            <asp:Label ID="RotuloData" runat="server" Text="Data:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtData" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small" Width="66px" AutoPostBack="True"></asp:TextBox>&nbsp;&nbsp;
                            <%--<asp:TextBox ID="txtData" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Font-Size="X-Small" Width="60px" Wrap="False" 
                                ToolTip="Data de processamento"></asp:TextBox>&nbsp;&nbsp;--%>
                            <asp:ImageButton ID="btnDiaMaisDia1" runat="server" 
                                ImageUrl="~/Imagens/EditMais.png" ToolTip="Alterar Data para dia seguinte." />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Label ID="RotuloUtenteRefeicao" runat="server" Text="Utente:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboUtenteRefeicao" runat="server" Font-Size="X-Small" 
                                Width="120px"></asp:DropDownList>&nbsp;
                            <asp:ImageButton ID="btnIndex" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar ordenação." Width="16px" />&nbsp;&nbsp;
                            <asp:Label ID="RotuloRefeicao" runat="server" Text="Refeição p/ hoje:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboRefeicao" runat="server" Font-Size="X-Small" 
                                Width="120px"></asp:DropDownList>&nbsp;&nbsp;
                            <asp:Label ID="RotuloProximaRefeicao" runat="server" Text="Próxima Refeição:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboProximaRefeicao" runat="server" Font-Size="X-Small" 
                                Width="120px"></asp:DropDownList>&nbsp;&nbsp;
                            <asp:ImageButton ID="btnRefeicaoHoje" runat="server" 
                                ImageUrl="~/Imagens/EditMenos.png" ToolTip="Refeição p/ hoje." 
                                Visible="False" />&nbsp;&nbsp;
                            <asp:ImageButton ID="btnProximaRefeicao" runat="server" 
                                ImageUrl="~/Imagens/EditMais.png" ToolTip="Próxima Refeição." 
                                Visible="False" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:ImageButton ID="btnConfirmarRefeicao" runat="server" 
                                ImageUrl="~/Imagens/Ok.png" ToolTip="Confirmar Refeição p/ Hoje e/ou Próxima Refeição." />
                            <%--<asp:LinkButton ID="lnkGravar" runat="server">Gravar</asp:LinkButton>&nbsp;&nbsp;--%>
                            <asp:LinkButton ID="lnkCancelar" runat="server">Sair</asp:LinkButton>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="RotuloTipoRefeicao" runat="server" Text="Tipo Refeição:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboTipoRefeicao" runat="server" Font-Size="X-Small" 
                                Width="120px" AutoPostBack="True"></asp:DropDownList>&nbsp;&nbsp;
                                <asp:Label ID="RotuloDataProximaRefeicao" runat="server" Text="Data Próxima Refeição:"></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:TextBox ID="txtDataProximaRefeicao" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Font-Size="X-Small" 
                                ToolTip="Data de refeição" Width="60px" Wrap="False"></asp:TextBox>
                        </td>
                    </tr> 

                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:GridView ID="grdDadosRefeicoesUtente" runat="server" 
                                AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                                    PageSize="4" Width="680px">
                                <Columns>
                                    <asp:CommandField ButtonType="Image" DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="False" />
                                    <asp:BoundField DataField="NumeroEmpregado" HeaderText="Utente" />
                                    <asp:BoundField DataField="Nome" HeaderText="Nome" />
                                    <asp:BoundField DataField="Data" HeaderText="Data" />
                                    <asp:BoundField DataField="DescRefeicao" HeaderText="Refeição p/ Hoje" />
                                    <asp:BoundField DataField="ProximaRefeicao" HeaderText="Próxima Refeição" />
                                    <asp:TemplateField HeaderText="Anular">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkRefeicoesAnular" runat="server" AutoPostBack="True" OnCheckedChanged="chkRefeicoesAnular_Clicked" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="Refeicao" HeaderText="" />
                                    <asp:BoundField DataField="DataHora" HeaderText="" />
                                    <asp:BoundField DataField="Anulada" 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>

                <%--<asp:Panel ID="pnlEditRefeicaoHoje" runat="server" Visible="False" Width="100%">
                <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                        border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                        background-color: #d6e0ee">
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="TituloRefeicaoHoje" runat="server" Text="Acessos / permissões por Centro Custo"></asp:Label>
                        </td>
                    </tr> 
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="Label7" runat="server" Text="Utente:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="DropDownList1" runat="server" Font-Size="X-Small" 
                                Width="120px"></asp:DropDownList>&nbsp;&nbsp;
                            <asp:Label ID="Label8" runat="server" Text="Refeição p/ hoje:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="DropDownList2" runat="server" Font-Size="X-Small" 
                                Width="120px"></asp:DropDownList>&nbsp;&nbsp;
                            <asp:Label ID="Label9" runat="server" Text="Próxima Refeição:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="DropDownList3" runat="server" Font-Size="X-Small" 
                                Width="120px"></asp:DropDownList>&nbsp;&nbsp;
                            <asp:LinkButton ID="LinkButton1" runat="server">Gravar</asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="LinkButton2" runat="server">Sair</asp:LinkButton>
                        </td>
                    </tr>

                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:GridView ID="GridView1" runat="server" 
                                AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                                    PageSize="4" Width="680px">
                                <Columns>
                                    <asp:CommandField ButtonType="Image" DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                                    <asp:BoundField DataField="NumeroEmpregado" HeaderText="Utente" />
                                    <asp:BoundField DataField="Nome" HeaderText="Nome" />
                                    <asp:BoundField DataField="Refeicao" HeaderText="Refeição p/ Hoje" />
                                    <asp:BoundField DataField="ProximaRefeicao" HeaderText="Próxima Refeição" />
                                </Columns>
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <EditRowStyle BackColor="#999999" />
                                <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                                <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                            </asp:GridView>
                        </td>
                    </tr>

                    </table>
                </asp:Panel>

                <asp:Panel ID="pnlEditProximaRefeicao" runat="server" Visible="False" Width="100%">
                <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                        border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                        background-color: #d6e0ee">
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="TituloProximaRefeicao" runat="server" Text="Acessos / permissões por Centro Custo"></asp:Label>
                        </td>
                    </tr> 
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="Label11" runat="server" Text="Utente:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="DropDownList4" runat="server" Font-Size="X-Small" 
                                Width="120px"></asp:DropDownList>&nbsp;&nbsp;
                            <asp:Label ID="Label12" runat="server" Text="Refeição p/ hoje:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="DropDownList5" runat="server" Font-Size="X-Small" 
                                Width="120px"></asp:DropDownList>&nbsp;&nbsp;
                            <asp:Label ID="Label13" runat="server" Text="Próxima Refeição:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="DropDownList6" runat="server" Font-Size="X-Small" 
                                Width="120px"></asp:DropDownList>&nbsp;&nbsp;
                            <asp:LinkButton ID="LinkButton3" runat="server">Gravar</asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="LinkButton4" runat="server">Sair</asp:LinkButton>
                        </td>
                    </tr>

                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:GridView ID="GridView2" runat="server" 
                                AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                                    PageSize="4" Width="680px">
                                <Columns>
                                    <asp:CommandField ButtonType="Image" DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                                    <asp:BoundField DataField="NumeroEmpregado" HeaderText="Utente" />
                                    <asp:BoundField DataField="Nome" HeaderText="Nome" />
                                    <asp:BoundField DataField="Refeicao" HeaderText="Refeição p/ Hoje" />
                                    <asp:BoundField DataField="ProximaRefeicao" HeaderText="Próxima Refeição" />
                                </Columns>
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <EditRowStyle BackColor="#999999" />
                                <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="~/Imagens/SetaPrimeiro.png" PreviousPageImageUrl="~/Imagens/SetaEsquerda.png" NextPageImageUrl="~/Imagens/SetaDireita.png" LastPageImageUrl="~/Imagens/SetaUltimo.png" />
                                <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                            </asp:GridView>
                        </td>
                    </tr>

                    </table>
                </asp:Panel>--%>

            </td>
            </tr>

            <tr>
            <td colspan="2" style="text-align: center">
                <asp:Panel ID="pnlTabelasAuxiliares" runat="server" Visible="False" Width="100%">
                <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                        border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                        background-color: #d6e0ee">
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="RotuloTabela" runat="server" Font-Size="X-Small" Text="Tabela:"></asp:Label>&nbsp;&nbsp;
                            <asp:DropDownList ID="cboTabela" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" Width="200px" Height="20px"> </asp:DropDownList>
                            <%--<asp:Label ID="Label6" runat="server" Text="Centros de Custo"></asp:Label>--%>
                        </td>
                    </tr> 
                    <tr>
                        <td style="height: 30px; background-color: #d6e0ee; text-align: center">
                            <br /> 
                            <asp:Label ID="RotuloTabelaAuxiliarCodigo" runat="server" Text="Código:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtTabelaAuxiliarCodigo" runat="server" BorderColor="Black" BorderWidth="1px" 
                                Font-Size="X-Small" Width="100px"></asp:TextBox>&nbsp;
                            <asp:Label ID="RotuloTabelaAuxiliarDescricao" runat="server" Text="Descrição:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtTabelaAuxiliarDescricao" runat="server" BorderColor="Black" BorderWidth="1px" 
                                Font-Size="X-Small" Width="235px"></asp:TextBox>&nbsp;
                            <asp:Label ID="RotuloTabelaAuxiliarAbreviatura" runat="server" Text="Descrição:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtTabelaAuxiliarAbreviatura" runat="server" BorderColor="Black" BorderWidth="1px" 
                                Font-Size="X-Small" Width="100px"></asp:TextBox>&nbsp;

                            <%--<asp:Label ID="RotuloCorTabelaAuxiliar" runat="server" Text="Cor:" 
                                Visible="False" ></asp:Label>&nbsp;
                            <asp:TextBox ID="txtCorTabelaAuxiliar" runat="server" BorderColor="Black" BorderWidth="1px" 
                                Font-Size="X-Small" Width="60px" Visible="False" ></asp:TextBox>&nbsp;&nbsp;
                            <asp:ImageButton ID="btnCorTabelaAuxiliar" runat="server" 
                                    ImageUrl="~/Imagens/Edit2.png" ToolTip="Escolher cor" Width="16px" />&nbsp;&nbsp;--%>

                            <asp:Label ID="RotuloTabelaAuxiliarHoraInicio" runat="server" Text="Hora Início:" 
                                Visible="False" ></asp:Label>&nbsp;
                            <asp:TextBox ID="txtTabelaAuxiliarHoraInicio" runat="server" BorderColor="Black" BorderWidth="1px" 
                                Font-Size="X-Small" Width="15px" Visible="False" ></asp:TextBox>&nbsp;&nbsp;
                            <asp:Label ID="RotuloTabelaAuxiliarHoraFim" runat="server" Text="Hora Início:" 
                                Visible="False" ></asp:Label>&nbsp;
                            <asp:TextBox ID="txtTabelaAuxiliarHoraFim" runat="server" BorderColor="Black" BorderWidth="1px" 
                                Font-Size="X-Small" Width="15px" Visible="False" ></asp:TextBox>&nbsp;&nbsp;

                            <asp:LinkButton ID="lnkTabelaAuxiliarGravar" runat="server">Gravar</asp:LinkButton>&nbsp;&nbsp;
                            <asp:ImageButton ID="btnTabelaAuxiliarNovoFiltro" runat="server" 
                                ImageUrl="~/Imagens/Add2.png" ToolTip="Novo filtro." />&nbsp;&nbsp;
                            <asp:ImageButton ID="btnTabelaAuxiliarAlterarFiltro" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar filtro." Width="16px" />&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkTabelaAuxiliarSair" runat="server">Sair</asp:LinkButton>
                            <br /> <br />
                            <asp:Label ID="RotuloOrdenacao" runat="server" Text="Ordenação dos dados:" Visible="False"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboCampo1Ordenacao" runat="server" Font-Size="X-Small" 
                                        Visible="False"> </asp:DropDownList>&nbsp;
                            <br />  <br />

                        <asp:GridView ID="grdDadosTabelasAuxiliares" runat="server" CellPadding="4" HorizontalAlign="Center" 
                                AllowPaging="True" PageSize="18" Width="702px" AutoGenerateColumns="False" RowStyle-HorizontalAlign="Left">
                            <Columns>
                                <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                                    SelectImageUrl="~/Imagens/Edit2.png" 
                                    DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                                <asp:BoundField DataField="Codigo" HeaderText="Código" />
                                <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                                <asp:BoundField DataField="Abreviatura" HeaderText="Abreviatura" />
                                <asp:BoundField DataField="Valor" HeaderText="Valor" />
                                <asp:TemplateField HeaderText="Tipo Refeição">
                                <ItemTemplate>
                                    <asp:DropDownList ID="dropTipoRefeicao" runat="server" AutoPostBack="True" 
                                        Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropTipoRefeicao_Load" 
                                        onselectedindexchanged="dropTipoRefeicao_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    </span>
                                </ItemTemplate>                            
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Activo">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkTipoRefeicaoActivo" runat="server" AutoPostBack="True" OnCheckedChanged="chkTipoRefeicaoActivo_Clicked" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="HoraInicio" HeaderText="Hora Início" />
                                <asp:BoundField DataField="HoraFim" HeaderText="Hora Fim" />
                                <asp:BoundField DataField="TipoRefeicao" 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>
                            <%--<asp:GridView ID="grdDadosTabelasAuxiliares" runat="server" CellPadding="4" HorizontalAlign="Center" 
                                    PageSize="4" Width="702px" Visible="False" RowStyle-HorizontalAlign="Left">
                                <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>--%>
                    </td>
                    </tr>


                    <tr>
                    <td>
                        <asp:GridView ID="grdDadosOpcoesFiltros" runat="server"  
                                AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                                    PageSize="4" Width="600px">
                        <Columns>
                            <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Imagens/Edit2.png" 
                                        DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                            <asp:BoundField DataField="Descricao" HeaderText="Filtro" />
                            <asp:TemplateField HeaderText="Activo">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkFiltroActivo" runat="server" AutoPostBack="True" OnCheckedChanged="chkFiltroActivo_Clicked" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Filtro" HeaderText="" />
                            <asp:BoundField DataField="Activo" HeaderText="" />
                        </Columns>
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <EditRowStyle BackColor="#999999" />
                        <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="~/Imagens/SetaPrimeiro.png" PreviousPageImageUrl="~/Imagens/SetaEsquerda.png" NextPageImageUrl="~/Imagens/SetaDireita.png" LastPageImageUrl="~/Imagens/SetaUltimo.png" />
                        <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>

                        <br />  
                        <asp:Label ID="RotuloContador" runat="server" Text="Ordem:" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtContador" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                    Width="25px" Visible="False"></asp:TextBox>&nbsp;
                        <asp:TextBox ID="txtParenteses1" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                    Width="10px" Visible="False"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotulocboCamposOpcoesFiltros" runat="server" Text="Campo:" Visible="False"></asp:Label>&nbsp;
                        <asp:DropDownList ID="cboCamposOpcoesFiltros" runat="server" Font-Size="X-Small" 
                                    Visible="False"> </asp:DropDownList>&nbsp;
                        <asp:Label ID="RotuloOperador" runat="server" Text="Operador:" Visible="False"></asp:Label>&nbsp;
                        <asp:DropDownList ID="cboOperadores" runat="server" Font-Size="X-Small" 
                                    Visible="False"> </asp:DropDownList>&nbsp;
                        <asp:Label ID="RotuloValor" runat="server" Text="Valor:" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtValor" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                    Width="80px" Visible="False"></asp:TextBox>&nbsp;
                        <asp:TextBox ID="txtParenteses2" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                    Width="10px" Visible="False"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloCondicao" runat="server" Text="Condição:" Visible="False"></asp:Label>&nbsp;
                        <asp:DropDownList ID="cboCondicao" runat="server" Font-Size="X-Small" 
                                    Visible="False"> </asp:DropDownList>&nbsp;&nbsp;
                        <asp:ImageButton ID="btnNovoCampo" runat="server" 
                            ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir Novo registo." Visible="False" />&nbsp;
                        <asp:ImageButton ID="btnAlterarCampo" runat="server" 
                            ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar filtro." Width="16px" Visible="False" />
                        <br /> <br />

                        <asp:GridView ID="grdDadosOpcoesFiltrosCampos" runat="server"  
                                AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                                    PageSize="4" Width="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">
            <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="&gt;" ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Imagens/Selecao.png" />
                    <asp:BoundField DataField="Utente" HeaderText="Utente" />
                    <asp:BoundField DataField="Nome" HeaderText="Nome" />
                    <asp:BoundField DataField="CentroCusto" HeaderText="Centro Custo" />
                    <asp:BoundField DataField="DiaRegisto" HeaderText="Dia" />
                    <asp:BoundField DataField="DataHora" HeaderText="Data registo" />
                    <asp:BoundField DataField="DiaRefeicao" HeaderText="Dia" />
                    <asp:BoundField DataField="Data" HeaderText="Data refeição" />
                    <asp:BoundField DataField="DescRefeicao" HeaderText="refeição" />
                    <asp:BoundField DataField="Situacao" HeaderText="Situação" />
                    <asp:BoundField DataField="DescTipoRefeicao" HeaderText="Tipo Refeição" />
                    <%--<asp:TemplateField HeaderText="Tipo Refeição">
                    <ItemTemplate>
                        <asp:DropDownList ID="dropTipoRefeicao" runat="server" AutoPostBack="True" 
                            Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropTipoRefeicao_Load" 
                            onselectedindexchanged="dropTipoRefeicao_SelectedIndexChanged">
                        </asp:DropDownList>
                        </span>
                    </ItemTemplate>                            
                    </asp:TemplateField>--%>
                    <asp:BoundField DataField="TipoRefeicao" 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="2" style="height: 12px" align="right" >
            <asp:Panel ID="pnlOpcoesRodape" runat="server" Visible="True" Width="100%" BackColor="#5d7b9d">
                <asp:Label ID="RotuloGrelha" runat="server" Text="Grelha: " 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboGrelha" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black">
                    <asp:ListItem Value="0">Vertical</asp:ListItem>
                    <asp:ListItem Value="1">Horizontal</asp:ListItem>
                    <asp:ListItem Value="2">Ambos</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:Label ID="RotuloLinhasPagina" runat="server" Text="Paginação Linhas:" 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:TextBox ID="txtLinhasPagina" runat="server" BorderColor="White" 
                    BorderWidth="0px" Font-Size="X-Small" Height="18px" Width="30px" 
                    BackColor="#5D7B9D" ForeColor="White" ></asp:TextBox>
                <asp:Label ID="Label2" runat="server" Text="Posição: " 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboPaginacaoPosicao" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black">
                    <asp:ListItem Value="0">Em baixo</asp:ListItem>
                    <asp:ListItem Value="1">Em cima</asp:ListItem>
                    <asp:ListItem Value="2">Em ambos</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:Label ID="Label3" runat="server" Text="Tipo: " 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboPaginacaoTipo" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black">
                    <asp:ListItem Value="2">Botões</asp:ListItem>
                    <asp:ListItem Value="3">Nº pág.</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:ImageButton ID="btnGravarOpoes" runat="server"  ImageUrl="~/Imagens/Edit2.png" ToolTip="Gravar opções"/>&nbsp;
            </asp:Panel>
            </td>                 
        </tr>
    </table>
</asp:Content>

