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

<asp:Content ID="Content1" ContentPlaceHolderID="cphConteudo" runat="server">
    <div class="cabecalho">
        Instituição
    </div>
    <asp:UpdatePanel ID="uppInstituicao" runat="server">
        <ContentTemplate>
            <dx:ASPxRoundPanel ID="rpnInstituicao" runat="server">
                <PanelCollection>
                    <dx:PanelContent>
                        <ul class="form1col">
                            <li>
                                <span class="titulo">Tipo de Unidade Gestora:</span>
                                <ccn:ComboBox ID="ddlTipoInstituicao" runat="server" Width="40%"
                                    ValueField="Key" TextField="Value"
                                    OnDataSearch="cmbTipoInstituicao_DataSearch" />

                                <span class="titulo">CNAE:</span>
                                <ccn:SpinText ID="txtCnae" runat="server" Width="10%" />
                            </li>
                            <li>
                                <span class="titulo">CNPJ:</span>
                                <ccn:TextBox ID="txtCnpj" runat="server"
                                    Width="15%" Mask="99,999,999/9999-99" />

                                <span class="titulo">Razão Social:</span>
                                <ccn:TextBox ID="txtRazaoSocial" runat="server" Width="35%" ClientEnabled="false" />
                            </li>
                            <li>
                                <span class="titulo">Nome Fantasia:</span>
                                <ccn:TextBox ID="txtNomeFantasia" runat="server"
                                    Width="71%" />
                            </li>
                            <li>
                                <span class="titulo">CPF do Responsável:</span>
                                <ccn:TextBox ID="txtCpfResponsavel" runat="server"
                                    Width="15%" Mask="999,999,999-99" />

                                <span class="titulo">Nome do Responsável:</span>
                                <ccn:TextBox ID="txtNomeResponsavel" runat="server"
                                    Width="35%" />
                            </li>
                            <li>
                                <span class="titulo">Telefone:</span>
                                <ccn:TextBox ID="txtTelefone" runat="server"
                                    Width="15%" Mask="(99)9999-9999" />
                            </li>
                            <li>
                                <span class="titulo">CEP:</span>
                                <uc:Cep ID="pcCep" runat="server"
                                    Width="15%"
                                    OnDataSelected="pcCep_DataSelected" />
                            </li>
                            <li>
                                <span class="titulo">Estado:</span>
                                <ccn:ComboBox ID="ddlEstado" runat="server" AutoPostBack="true"
                                    Width="20%" DropDownStyle="DropDown" IncrementalFilteringMode="Contains"
                                    ValueField="Key" TextField="Value"
                                    OnDataSearch="ddlEstado_DataSearch"
                                    OnSelectedIndexChanged="ddlEstado_SelectedIndexChanged" />

                                <span class="titulo">Município:</span>
                                <ccn:ComboSelection ID="cbsMunicipio" runat="server"
                                    Width="280px" KeyFieldName="Codigo" ValueFieldName="Nome" Mode="Single"
                                    ColumnCaption="Nome" ColumnFieldName="Nome" ColumnWidth="100%"
                                    OnDataSearch="cbsMunicipio_DataSearch" GridViewWidth="280px" />
                            </li>
                            <li>
                                <span class="titulo">Logradouro:</span>
                                <ccn:TextBox ID="txtLogradouro" runat="server"
                                    Width="40%" />

                                <span class="titulo">Número:</span>
                                <ccn:TextBox ID="txtNumero" runat="server"
                                    Width="10%" />
                            </li>
                            <li>
                                <span class="titulo">Bairro:</span>
                                <ccn:TextBox ID="txtBairro" runat="server"
                                    Width="71%" />
                            </li>
                            <li>
                                <span class="titulo">Complemento:</span>
                                <ccn:TextBox ID="txtComplemento" runat="server"
                                    Width="71%" />
                            </li>
                            <li>
                                <span class="titulo">Logo:</span>
                                <ccn:Image runat="server" ID="imgLogo" ImageMode="Binary" OnClick="imgLogo_Click" Width="90px" Height="60px" />
                                <ccn:QuickUpload runat="server" ID="uplLogo" FileExtensions=".jpg|.png" MaxFileSize="5" FileSizeUnit="Megabytes"
                                    OnUploadComplete="uplLogo_UploadComplete" OnUploadCompleted="uplLogo_UploadCompleted" />
                            </li>
                        </ul>
                    </dx:PanelContent>
                </PanelCollection>
            </dx:ASPxRoundPanel>
            <ul class="botoes">
                <li>
                    <ccn:Button ID="btnSalvar" SkinID="Salvar" runat="server" ValidationGroup="Instituicao" OnClick="btnSalvar_Click" />
                </li>

                <li>
                    <ccn:Button ID="btnCancelar" SkinID="Cancelar" runat="server" OnClick="btnCancelar_Click" />
                </li>
            </ul>
        </ContentTemplate>
    </asp:UpdatePanel>
    <ccn:LoadingProgress ID="ldpProgress" runat="server" AssociatedUpdatePanelID="uppInstituicao" Text="Aguarde..." />
</asp:Content>