Exemple #1
0
    private void UCFiltroEscolas1__SelecionarEscola()
    {
        try
        {
            if (UCFiltroEscolas1._ComboUnidadeEscola.SelectedValue != "-1;-1")
            {
                UCComboCursoCurriculo1.Obrigatorio = true;
                UCComboCursoCurriculo1.CarregarCursoCurriculoPorEscola(UCFiltroEscolas1._UCComboUnidadeEscola_Esc_ID, UCFiltroEscolas1._UCComboUnidadeEscola_Uni_ID, 0);
                UCComboCursoCurriculo1.PermiteEditar = true;
                UCComboCursoCurriculo1.SetarFoco();
            }
            else
            {
                UCComboCursoCurriculo1.Obrigatorio = true;
                UCComboCursoCurriculo1.CarregarCursoCurriculo();
                UCComboCursoCurriculo1.PermiteEditar = false;
            }

            UCComboCurriculoPeriodo1._Combo.Items.Clear();
            UCComboCurriculoPeriodo1._MostrarMessageSelecione = true;
            UCComboCurriculoPeriodo1._Load(-1, -1);
            UCComboCurriculoPeriodo1._Combo.Enabled = false;
        }
        catch (Exception ex)
        {
            ApplicationWEB._GravaErro(ex);
            lblMessageMatricula.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
        }
        finally
        {
            updMatricula.Update();
        }
    }
Exemple #2
0
        private void UCComboCursoCurriculo1_IndexChanged()
        {
            try
            {
                if (!_VS_PesquisaSalva)
                {
                    UCComboCurriculoPeriodo1.Valor         = new[] { -1, -1, -1 };
                    UCComboCurriculoPeriodo1.PermiteEditar = false;
                    //UCComboCalendario1.Valor = -1;

                    if (UCComboCursoCurriculo1.Valor[0] > 0)
                    {
                        UCComboCurriculoPeriodo1.CarregarPorCursoCurriculo(UCComboCursoCurriculo1.Valor[0], UCComboCursoCurriculo1.Valor[1]);
                        UCComboCurriculoPeriodo1.PermiteEditar = true;
                        UCComboCurriculoPeriodo1.Focus();

                        //UCComboCalendario1.CarregarPorCurso(UCComboCursoCurriculo1.Valor[0]);
                        //UCComboCalendario1.PermiteEditar = true;
                    }

                    UCComboCurriculoPeriodo1__OnSelectedIndexChange();
                }
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                _lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar os dados.", UtilBO.TipoMensagem.Erro);
                _lblMessage.Focus();
            }
        }
Exemple #3
0
        private void LoadFromEntity(int nap_id)
        {
            ORC_NivelAprendizado nivel = new ORC_NivelAprendizado
            {
                nap_id = nap_id
            };

            ORC_NivelAprendizadoBO.GetEntity(nivel);

            VS_cur_id = nivel.cur_id;
            VS_crr_id = nivel.crr_id;
            VS_crp_id = nivel.crp_id;

            txtDescricao.Text = nivel.nap_descricao;
            txtSigla.Text     = nivel.nap_sigla;

            UCComboCursoCurriculo1.Valor = new[] { VS_cur_id, VS_crr_id };

            UCComboCurriculoPeriodo1.CancelSelect = false;
            UCComboCurriculoPeriodo1._LoadBy_cur_id_crr_id_esc_id_uni_id(UCComboCursoCurriculo1.Valor[0], UCComboCursoCurriculo1.Valor[1], -1, -1);
            UCComboCurriculoPeriodo1.Valor = new[] { VS_cur_id, VS_crr_id, VS_crp_id };

            UCComboCursoCurriculo1.PermiteEditar   = false;
            UCComboCurriculoPeriodo1.PermiteEditar = false;
        }
Exemple #4
0
 private void UCComboCursoCurriculo1_IndexChanged()
 {
     try
     {
         UCComboCurriculoPeriodo1.Valor         = new[] { -1, -1, -1 };
         UCComboCurriculoPeriodo1.PermiteEditar = false;
         if (UCComboCursoCurriculo1.Valor[0] > 0)
         {
             UCComboCurriculoPeriodo1.CarregarPorCursoCurriculo(UCComboCursoCurriculo1.Valor[0], UCComboCursoCurriculo1.Valor[1]);
             UCComboCurriculoPeriodo1.PermiteEditar = true;
             UCComboCurriculoPeriodo1.Focus();
         }
         UCComboCurriculoPeriodo1__OnSelectedIndexChange();
     }
     catch (Exception ex)
     {
         ApplicationWEB._GravaErro(ex);
         lblMessage.Text = UtilBO.GetErroMessage(GetGlobalResourceObject("Relatorios", "AtaFinalResultado.Busca.lblMessage.ErroCarregarDados").ToString(), UtilBO.TipoMensagem.Erro);
     }
 }
Exemple #5
0
        private void UCComboCursoCurriculo1_IndexChanged()
        {
            try
            {
                UCComboCurriculoPeriodo1._Combo.SelectedValue = "-1;-1;-1";
                UCComboCurriculoPeriodo1.PermiteEditar        = true;

                UCComboCurriculoPeriodo1._Combo.Items.Clear();
                UCComboCurriculoPeriodo1._MostrarMessageSelecione = true;
                UCComboCurriculoPeriodo1.CancelSelect             = false;
                UCComboCurriculoPeriodo1._LoadBy_cur_id_crr_id_esc_id_uni_id(UCComboCursoCurriculo1.Valor[0], UCComboCursoCurriculo1.Valor[1], -1, -1);

                UCComboCurriculoPeriodo1._Combo.Enabled = UCComboCursoCurriculo1.Valor[0] > 0;
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMensagem.Text = UtilBO.GetErroMessage("Erro ao tentar carregar os dados.", UtilBO.TipoMensagem.Erro);
            }
        }
Exemple #6
0
    private void UCFiltroEscolas1__Selecionar()
    {
        try
        {
            if (UCFiltroEscolas1._VS_FiltroEscola)
            {
                UCFiltroEscolas1._UnidadeEscola_LoadBy_uad_idSuperior(new Guid(UCFiltroEscolas1._ComboUnidadeAdministrativa.SelectedValue));
            }

            if (UCFiltroEscolas1._ComboUnidadeAdministrativa.SelectedValue == Guid.Empty.ToString())
            {
                UCFiltroEscolas1._ComboUnidadeEscola.Enabled = false;
            }
            else
            {
                UCFiltroEscolas1._ComboUnidadeEscola.Enabled = true;
                UCFiltroEscolas1._ComboUnidadeEscola.Focus();
            }

            UCComboCursoCurriculo1.Obrigatorio = true;
            UCComboCursoCurriculo1.CarregarCursoCurriculo();
            UCComboCursoCurriculo1.PermiteEditar = false;

            UCComboCurriculoPeriodo1._Combo.Items.Clear();
            UCComboCurriculoPeriodo1._MostrarMessageSelecione = true;
            UCComboCurriculoPeriodo1._Load(-1, -1);
            UCComboCurriculoPeriodo1._Combo.Enabled = false;
        }
        catch (Exception ex)
        {
            ApplicationWEB._GravaErro(ex);
            lblMessageMatricula.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
        }
        finally
        {
            updMatricula.Update();
        }
    }
Exemple #7
0
    private void UCComboCursoCurriculo1_IndexChanged()
    {
        try
        {
            if (UCComboCursoCurriculo1.Valor[0] > 0)
            {
                UCComboCurriculoPeriodo1._Combo.Items.Clear();
                UCComboCurriculoPeriodo1._MostrarMessageSelecione = true;
                UCComboCurriculoPeriodo1._LoadBy_cur_id_crr_id_esc_id_uni_id
                (
                    UCComboCursoCurriculo1.Valor[0]
                    , UCComboCursoCurriculo1.Valor[1]
                    , Convert.ToInt32(UCFiltroEscolas1._ComboUnidadeEscola.SelectedValue.Split(';')[0])
                    , Convert.ToInt32(UCFiltroEscolas1._ComboUnidadeEscola.SelectedValue.Split(';')[1])

                );
                UCComboCurriculoPeriodo1._Combo.Enabled = true;
                UCComboCurriculoPeriodo1._Combo.Focus();
            }
            else
            {
                UCComboCurriculoPeriodo1._Combo.Items.Clear();
                UCComboCurriculoPeriodo1._MostrarMessageSelecione = true;
                UCComboCurriculoPeriodo1._Load(-1, -1);
                UCComboCurriculoPeriodo1._Combo.Enabled = false;
            }
        }
        catch (Exception ex)
        {
            ApplicationWEB._GravaErro(ex);
            lblMessageMatricula.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
        }
        finally
        {
            updMatricula.Update();
        }
    }
Exemple #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(this);

        if (sm != null)
        {
            sm.Scripts.Add(new ScriptReference(ArquivoJS.UiAriaTabs));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.Tabs));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.JQueryValidation));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.JqueryMask));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.MascarasCampos));
            sm.Scripts.Add(new ScriptReference("~/Includes/jsCadastroPessoa.js"));
            sm.Scripts.Add(new ScriptReference("~/Includes/jsUCCadastroEndereco.js"));
            sm.Scripts.Add(new ScriptReference("~/Includes/jsCadastroCertidaoCivil.js"));
            sm.Services.Add(new ServiceReference("~/WSServicos.asmx"));
        }

        if (!IsPostBack)
        {
            cvDataNascimento.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de nascimento do aluno");
            CustomValidator1.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de emissão da certidão de nascimento");

            string message = __SessionWEB.PostMessages;
            if (!String.IsNullOrEmpty(message))
            {
                lblMessage.Text = message;
            }

            lblMatriculaEstadual.Text         = GestaoEscolarUtilBO.nomePadraoMatriculaEstadual() + " *";
            rfvMatriculaEstadual.ErrorMessage = GestaoEscolarUtilBO.nomePadraoMatriculaEstadual() + " é obrigatório.";

            UCComboTipoDeficiencia1._MostrarMessageSelecione = true;
            UCComboTipoDeficiencia1._Load(Guid.Empty, 0);

            UCEnderecos1.Inicializar(false, true, string.Empty);

            UCFiltroEscolas1.SelecionaCombosAutomatico             = false;
            UCFiltroEscolas1.UnidadeAdministrativaCampoObrigatorio = true;
            UCFiltroEscolas1.EscolaCampoObrigatorio = true;
            UCFiltroEscolas1._LoadInicial();

            UCComboCursoCurriculo1.Obrigatorio = true;
            UCComboCursoCurriculo1.CarregarCursoCurriculo();
            UCComboCursoCurriculo1.PermiteEditar = false;

            UCComboCurriculoPeriodo1._Label.Text += " *";
            UCComboCurriculoPeriodo1._MostrarMessageSelecione = true;
            UCComboCurriculoPeriodo1._Load(-1, -1);
            UCComboCurriculoPeriodo1._Combo.Enabled      = false;
            UCComboCurriculoPeriodo1.ExibeFormatoPeriodo = true;
            cvCurriculoPeriodo.ErrorMessage = GestaoEscolarUtilBO.nomePadraoPeriodo() + " é obrigatório.";

            try
            {
                if (__SessionWEB._cid_id != Guid.Empty)
                {
                    END_Cidade cid = new END_Cidade {
                        cid_id = __SessionWEB._cid_id
                    };
                    END_CidadeBO.GetEntity(cid);

                    _txtCid_id.Value     = cid.cid_id.ToString();
                    txtNaturalidade.Text = cid.cid_nome;

                    _txtCid_idCertidao.Value = cid.cid_id.ToString();
                    txtCidadeCertidao.Text   = cid.cid_nome;
                }
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
            }

            UCGridContato1._CarregarContato();

            UCComboTipoDeficiencia1._Label.Text = "Necessidade educacional especial";
            UCComboEstadoCivil1._Label.Text     = "Estado civil *";
            UCComboRacaCor1._Label.Text         = "Raça / cor *";
            UCComboSexo1._Label.Text            = "Sexo *";

            UCComboEstadoCivil1._Combo.SelectedValue = "1";
            _ddlSituacao.SelectedValue = "1";

            Page.Form.DefaultFocus  = txtMatriculaEstadual.ClientID;
            Page.Form.DefaultButton = btnSalvarNovo.UniqueID;
            btnSalvarNovo.Visible   = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_inserir;
        }

        UCFiltroEscolas1._Selecionar        += UCFiltroEscolas1__Selecionar;
        UCFiltroEscolas1._SelecionarEscola  += UCFiltroEscolas1__SelecionarEscola;
        UCComboCursoCurriculo1.IndexChanged += UCComboCursoCurriculo1_IndexChanged;
    }