Example #1
0
        private void UCBuscaDocenteTurma_IndexChanged_Turma()
        {
            try
            {
                UCComboTurmaDisciplina.Valor         = -1;
                UCComboTurmaDisciplina.PermiteEditar = false;

                if (UCBuscaDocenteTurma.ComboTurma.Valor[0] > 0 && UCBuscaDocenteTurma.ComboTurma.Valor[1] > 0 && UCBuscaDocenteTurma.ComboTurma.Valor[2] > 0)
                {
                    if (UCBuscaDocenteTurma._VS_doc_id <= 0)
                    {
                        UCComboTurmaDisciplina.CarregarTurmaDisciplina(UCBuscaDocenteTurma.ComboTurma.Valor[0], true, 0, true);
                    }
                    else
                    {
                        UCComboTurmaDisciplina.CarregarTurmaDisciplina(UCBuscaDocenteTurma.ComboTurma.Valor[0], UCBuscaDocenteTurma._VS_doc_id, 0, true);
                    }

                    UCComboTurmaDisciplina.SetarFoco();
                    UCComboTurmaDisciplina.PermiteEditar = UCBuscaDocenteTurma.ComboTurma.Combo.SelectedIndex > 0;
                }
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMessage.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.Erro"), UtilBO.TipoMensagem.Erro);
            }
        }
Example #2
0
        private void UCComboTurma_IndexChanged()
        {
            try
            {
                UCComboTurmaDisciplina.Valor               = -1;
                UCComboTurmaDisciplina.PermiteEditar       = false;
                UCComboTurmaDisciplina.VS_MostraTerritorio = false;

                if (UCComboTurma.Valor[0] > 0)
                {
                    if (__SessionWEB.__UsuarioWEB.Grupo.vis_id == SysVisaoID.Individual)
                    {
                        UCComboTurmaDisciplina.CarregarTurmaDisciplina(UCComboTurma.Valor[0], __SessionWEB.__UsuarioWEB.Docente.doc_id);
                    }
                    else
                    {
                        UCComboTurmaDisciplina.CarregarTurmaDisciplina(UCComboTurma.Valor[0]);
                    }
                    UCComboTurmaDisciplina.SetarFoco();
                    UCComboTurmaDisciplina.PermiteEditar = true;
                }
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar os dados.", UtilBO.TipoMensagem.Erro);
            }
        }