Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(this.Page);

        if (sm != null)
        {
            sm.Scripts.Add(new ScriptReference(ArquivoJS.CamposData));
        }

        if (!IsPostBack)
        {
            UCComboPais1._Label.Text        = "Nacionalidade";
            UCComboPais1._EnableValidator   = false;
            UCComboPais1._ShowSelectMessage = true;
            UCComboPais1._Load(0);

            UCComboTipoEscolaridade1._Label.Text        = "Escolaridade";
            UCComboTipoEscolaridade1._EnableValidator   = false;
            UCComboTipoEscolaridade1._ShowSelectMessage = true;
            UCComboTipoEscolaridade1._Load(0);


            UCComboTipoDeficiencia1._EnableValidator   = false;
            UCComboTipoDeficiencia1._ShowSelectMessage = true;
            UCComboTipoDeficiencia1._Load(Guid.Empty, 0);

            UCComboEstadoCivil1.Inicialize("Estado civil");
            UCComboEstadoCivil1._EnableValidator = false;

            UCComboSexo1.Inicialize("Sexo");
            UCComboSexo1._EnableValidator = false;
            UCComboSexo1._ValidationGroup = "Pessoa";
        }
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        UtilBO.SetScriptBusca(Page, _btnNovo, new string[] { }, String.Concat(ApplicationWEB._DiretorioVirtual, "AreaAdm/Cidade/Cadastro.aspx?Pesquisar=", _btnPesquisar.ClientID), "Cadastro de cidade", 350, 250);
        UCComboPais1.OnSelectedIndexChange = UCComboPais1__IndexChanged;

        if (!IsPostBack)
        {
            UCComboPais1._ShowSelectMessage = true;
            UCComboPais1._Load(0);
            UCComboUnidadeFederativa1._ShowSelectMessage = true;
            UCComboUnidadeFederativa1._Load(Guid.Empty, 0);

            fdsResultados.Visible = false;

            string parametro = SYS_ParametroBO.ParametroValor(SYS_ParametroBO.eChave.PAIS_PADRAO_BRASIL);
            if (!string.IsNullOrEmpty(parametro))
            {
                UCComboPais1._Combo.SelectedValue = parametro;
                _ChangeComboPais();
                _VS_pais_padrao = parametro;
                UCComboUnidadeFederativa1._Load(new Guid(parametro), 1);
                UCComboUnidadeFederativa1._Combo.Enabled = true;
            }
            else
            {
                UCComboUnidadeFederativa1._Combo.Enabled = false;
            }

            Page.Form.DefaultButton = _btnPesquisar.UniqueID;
            Page.Form.DefaultFocus  = UCComboPais1._Combo.ClientID;
        }
    }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                fdsResultados.Visible = false;

                UCComboPais1._EnableValidator   = false;
                UCComboPais1._ShowSelectMessage = true;
                UCComboPais1._Load(0);

                UCComboUnidadeFederativa1._EnableValidator   = false;
                UCComboUnidadeFederativa1._ShowSelectMessage = true;
                UCComboUnidadeFederativa1._Load(Guid.Empty, 0);
                UCComboUnidadeFederativa1._Combo.Enabled = false;
            }

            UCComboPais1.OnSelectedIndexChange = UCComboPais1_OnSelectedIndexChange1;
        }
Exemplo n.º 4
0
    /// <summary>
    /// Carrega combos da tela.
    /// </summary>
    public void CarregarCombos()
    {
        try
        {
            UCComboPais1.CancelaSelect = false;
            UCComboPais1.Inicialize(true
                                    , "País *"
                                    , String.Format("País é obrigatório.")
                                    , "*"
                                    , String.Empty
                                    , true
                                    , new UCComboSelectItemMessage("-- Selecione um país --", "-1")
                                    , true
                                    , new UCComboItemNotFoundMessage("-- Selecione um país --", "-1"));
            UCComboPais1._EnableValidator = true;
            UCComboPais1._ValidationGroup = "vlgPais";
            UCComboPais1._Load(0);
            UCComboPais1._Combo.SelectedValue = SYS_ParametroBO.ParametroValor(SYS_ParametroBO.eChave.PAIS_PADRAO_BRASIL);



            UCComboUnidadeFederativa1.CancelarBinding = false;
            UCComboUnidadeFederativa1.Inicialize(true
                                                 , "Estado"
                                                 , String.Format("Estado é obrigatório.")
                                                 , "*"
                                                 , String.Empty
                                                 , true
                                                 , new UCComboSelectItemMessage("-- Selecione um estado --", "-1")
                                                 , true
                                                 , new UCComboItemNotFoundMessage("-- Selecione um estado --", "-1"));
            UCComboUnidadeFederativa1._EnableValidator = false;
            UCComboUnidadeFederativa1._ValidationGroup = "vlgPais";
            UCComboUnidadeFederativa1._Load(Guid.Empty, 0);
            UCComboUnidadeFederativa1._Combo.Enabled = false;

            CarregaComboEstado();
        }
        catch (Exception ex)
        {
            ApplicationWEB._GravaErro(ex);
            _lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
        }
    }
Exemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(this);

        if (sm != null)
        {
            sm.Scripts.Add(new ScriptReference(ArquivoJS.JQueryValidation));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.JqueryMask));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.MascarasCampos));
        }

        if (!IsPostBack)
        {
            try
            {
                UCComboPais1.Inicialize("País *");
                UCComboPais1._EnableValidator = true;
                UCComboPais1._ValidationGroup = "vlgPais";
                UCComboPais1._Load(0);

                UCComboUnidadeFederativa1.Inicialize("Estado");
                UCComboUnidadeFederativa1._EnableValidator = true;
                UCComboUnidadeFederativa1._ValidationGroup = "vlgPais";
                UCComboUnidadeFederativa1._Load(Guid.Empty, 0);
                UCComboUnidadeFederativa1._Combo.Enabled = false;
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                _lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
            }

            _btnSalvar.Visible = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_inserir;
            _Limpar();
            _lblMessage.Visible = false;

            Page.Form.DefaultFocus  = UCComboPais1._Combo.ClientID;
            Page.Form.DefaultButton = _btnSalvar.UniqueID;
        }

        UCComboPais1.OnSelectedIndexChange = UCComboPais1__IndexChanged;
    }