<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Cecam.Master" AutoEventWireup="true" CodeBehind="wfFolhaPagamentoCargoFuncao.aspx.cs"
    Inherits="Cecam.PortalTransparencia.Web.Pages.wfFolhaPagamentoCargoFuncao" %>

<%@ Register Src="~/UserControls/ucDownload.ascx" TagPrefix="uc" TagName="Download" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphConteudo" runat="server">
    <div class="cabecalho">
        Folha de Pagamento por Cargo/Função 
    </div>
    <asp:UpdatePanel ID="uppFolhaPagamentoCargoFuncao" runat="server">
        <ContentTemplate>
            <dx:ASPxRoundPanel ID="rpnCadastro" runat="server">
                <PanelCollection>
                    <dx:PanelContent>
                        <ul class="form1col">
                            <li>
                                <span class="titulo">*Exercício:</span>
                                <ccn:ComboBox runat="server" ID="cbxExercicio" OnDataSearch="cbxExercicio_DataSearch" ValidationGroup="FolhaPagamentoCargoFuncao" IsRequired="true" />
                            </li>
                            <li>
                                <span class="titulo">*Período:</span>
                                <ccn:ComboBox runat="server" ID="cbxMes" OnDataSearch="cbxMes_DataSearch" ValidationGroup="FolhaPagamentoCargoFuncao" IsRequired="true" />
                            </li>
                        </ul>
                        <ul class="form1col">
                            <li>
                                <ccn:LinkedSearch ID="lksCargoFuncao" runat="server" LabelCaption="Cargo/Função:" PopupCaption="Cargos/Funções" KeyFieldName="Codigo"
                                    ValueFieldName="Codigo" Width="20%|15%|40%" TextFieldName="Descricao" ColumnCaption="Código|Descricao" ColumnFieldName="Codigo|Descricao"
                                    ColumnWidth="20%|80%" OnDataSearch="lksCargoFuncao_DataSearch" IsAccentInsensitiveFilter="true" />
                            </li>
                        </ul>
                    </dx:PanelContent>
                </PanelCollection>
            </dx:ASPxRoundPanel>
            <ul class="botoes">
                <li>
                    <ccn:Button ID="btnPesquisar" SkinID="Pesquisar" runat="server" ValidationGroup="FolhaPagamentoCargoFuncao" OnClick="btnPesquisar_Click" />
                </li>
                <li>
                    <ccn:Button ID="btnLimpar" SkinID="Limpar" runat="server" OnClick="btnLimpar_Click" />
                </li>
            </ul>
            <asp:UpdatePanel runat="server">
                <ContentTemplate>
                    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" HeaderText="FolhaPagamentoCargoFuncaos">
                        <PanelCollection>
                            <dx:PanelContent>
                                <li style="float: left;">
                                    <asp:Label runat="server" ID="lblFiltro"></asp:Label>
                                </li>
                                <li style="float: right;">
                                    <asp:Label runat="server" Text="Exportar Listagem: pdf, txt, jpg, csv e URI" />
                                    <ccn:Button runat="server" ID="btnExportar" Image-Url="~/UI/img/bt-exportar.png" ToolTip="Exportar" ClientEnabled="false"
                                        OnClick="btnExportar_Click" />
                                </li>
                                <ccn:GridView runat="server" ID="gvwFolhaPagamentoCargoFuncao" OnDataSearch="gvwFolhaPagamentoCargoFuncao_DataSearch" Width="100%"
                                    OnDataCommand="gvwFolhaPagamentoCargoFuncao_DataCommand">
                                    <Columns>
                                        <ccn:GridCommandCustomColumn ButtonId="Detalhes" Name="Detalhes" ButtonType="Image" Width="3%" VisibleIndex="0"
                                            ImageUrl="~/UI/img/ico-detalhe.png" />
                                        <ccn:GridDataColumn FieldName="CodigoCargoFuncao" Visible="false" />
                                        <ccn:GridDataColumn Caption="Cargo/Função" FieldName="NomeCargoFuncao" Width="30%" />
                                        <ccn:GridDataColumn Caption="Quantidade" FieldName="Quantidade" Width="10%" />
                                        <ccn:GridDataSpinTextColumn FieldName="ValorBase" Caption="Valor Base (R$)" Width="10%" DisplayFormatString="#,##0.00"
                                            Precision="18|2" />
                                        <ccn:GridDataSpinTextColumn FieldName="ValorBruto" Caption="Valor Bruto (R$)" Width="10%" DisplayFormatString="#,##0.00"
                                            Precision="18|2" />
                                        <ccn:GridDataSpinTextColumn FieldName="ValorAdiantamento" Caption="Valor Adiantamento (R$)" Width="10%" DisplayFormatString="#,##0.00"
                                            Precision="18|2" />
                                        <ccn:GridDataSpinTextColumn FieldName="ValorLiquido" Caption="Valor Líquido (R$)" Width="10%" DisplayFormatString="#,##0.00"
                                            Precision="18|2" />
                                    </Columns>
                                    <Settings ShowFooter="True" />
                                    <TotalSummary>
                                        <dx:ASPxSummaryItem FieldName="Quantidade" DisplayFormat="Total: {0}" SummaryType="Sum" />
                                        <dx:ASPxSummaryItem FieldName="ValorBase" DisplayFormat="Total: {0:#,##0.00}" SummaryType="Sum" />
                                        <dx:ASPxSummaryItem FieldName="ValorBruto" DisplayFormat="Total: {0:#,##0.00}" SummaryType="Sum" />
                                        <dx:ASPxSummaryItem FieldName="ValorAdiantamento" DisplayFormat="Total: {0:#,##0.00}" SummaryType="Sum" />
                                        <dx:ASPxSummaryItem FieldName="ValorLiquido" DisplayFormat="Total: {0:#,##0.00}" SummaryType="Sum" />                                        
                                    </TotalSummary>
                                </ccn:GridView>
                            </dx:PanelContent>
                        </PanelCollection>
                    </dx:ASPxRoundPanel>
                </ContentTemplate>
            </asp:UpdatePanel>
            <uc:Download ID="ucFormatoDownload" runat="server" Titulo="Download" OnSucess="ucFormatoDownload_Sucess" />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
