<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Cecam.master" AutoEventWireup="true" CodeBehind="wfCadastroFeriado.aspx.cs" Inherits="Cecam.Domain.WebApp.Shared.Config.wfCadastroFeriado" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphConteudo" runat="server">

    <div class="cabecalho">Datas Especiais</div>
    <asp:UpdatePanel ID="uppProto" runat="server">
        <ContentTemplate>
            <dx:ASPxRoundPanel runat="server" ID="rpnCalendario">
                <PanelCollection>
                    <dx:PanelContent>
                        <ul class="form1col">
                            <li>
                                <span class="titulo">Data:</span>
                                <ccn:DateEdit runat="server" ID="dteFiltro" AutoPostBack="true" Width="20%"
                                    OnValueChanged="dteFiltro_ValueChanged" />
                            </li>
                        </ul>
                    </dx:PanelContent>
                </PanelCollection>
            </dx:ASPxRoundPanel>
            <dx:ASPxRoundPanel runat="server" ID="rpnForm">
                <PanelCollection>
                    <dx:PanelContent>
                        <ul class="form1col">
                            <li>
                                <span class="titulo">* Nome:</span>
                                <ccn:TextBox runat="server" ID="txtNome" Width="60%" IsRequired="true" ValidationGroup="DataEspecial" />
                            </li>
                            <li>
                                <span class="titulo">* Tipo:</span>
                                <ccn:ComboBox runat="server" ID="ddlTipo" Width="20%" IsRequired="true" ValidationGroup="DataEspecial"
                                    OnDataSearch="ddlTipo_DataSearch" ValueField="Key" TextField="Text" />
                            </li>
                            <li>
                                <span class="titulo">* Descrição:</span>
                                <ccn:Memo runat="server" ID="txtDescricao" Width="60%" ValidationGroup="DataEspecial" />
                            </li>
                            <li>
                                <span class="titulo">Horarios:</span>
                                <ccn:CheckBox runat="server" Text="Definir Horario para o Feriado" ID="ckbHora" OnCheckedChanged="ckbHora_CheckedChanged" AutoPostBack="true" />
                            </li>
                            <li runat="server" id="liHora">
                                <ul class="form2col">
                                    <li>
                                        <span class="titulo">De:</span>
                                        <ccn:TimeText runat="server" ID="tmeHoraDe" Width="20%" ValidationGroup="DataEspecial" />
                                    </li>
                                    <li>
                                        <span class="titulo">Ate:</span>
                                        <ccn:TimeText runat="server" ID="tmeHoraAte" Width="20%" ValidationGroup="DataEspecial" />
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </dx:PanelContent>
                </PanelCollection>
            </dx:ASPxRoundPanel>
            <ul class="botoes">
                <li>
                    <ccn:Button runat="server" SkinID="Salvar" ID="btnSalvar" OnClick="btnSalvar_Click" ValidationGroup="DataEspecial" />
                </li>
                <li>
                    <ccn:Button runat="server" SkinID="Cancelar" ID="btnCancelar" OnClick="btnCancelar_Click" />
                </li>
            </ul>
            <dx:ASPxRoundPanel runat="server" ID="rpnGrid" SkinID="Grupo" HeaderText="Feriados">
                <PanelCollection>
                    <dx:PanelContent>
                        <ccn:GridView runat="server" ID="grvDataEspecial" KeyFieldName="Id" SkinID="Pesquisa"
                            OnDataSearch="grvDataEspecial_DataSearch"
                            OnDataSelecting="grvDataEspecial_DataSelecting"
                            OnDataDeleting="grvDataEspecial_DataDeleting">
                            <Columns>
                                <ccn:GridCommandSelectEditColumn />
                                <ccn:GridCommandDeleteColumn />
                                <ccn:GridDataTextColumn Caption="Nome" FieldName="Nome" Width="20%" />
                                <ccn:GridDataTextColumn Caption="Descrição" FieldName="Descricao" Width="40%" />
                                <ccn:GridDataComboBoxColumn Caption="Tipo" FieldName="Tipo" ValueField="Key" TextField="Text" OnDataSearch="ddlTipo_DataSearch" />
                                <ccn:GridDataTimeColumn Caption="De" FieldName="HoraInicioReal" />
                                <ccn:GridDataTimeColumn Caption="Ate" FieldName="HoraFim" />
                            </Columns>
                        </ccn:GridView>
                    </dx:PanelContent>
                </PanelCollection>
            </dx:ASPxRoundPanel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <ccn:LoadingProgress ID="ldpLoading" runat="server" AssociatedUpdatePanelID="uppProto" Text="Aguarde..." />
</asp:Content>