示例#1
0
        public async Task <bool> CancelarDisciplinaAsync(CancelamentoMatriculaEntrada cancelamentoMatriculaEntrada)
        {
            IDisciplinaMatricula disciplinaMatricula = await disciplinaMatriculaService.ValidarDisciplinaMatriculaAsync(cancelamentoMatriculaEntrada.IdDisciplina, cancelamentoMatriculaEntrada.IdMatricula);

            if (disciplinaMatricula == null)
            {
                return(false);
            }


            if (disciplinaMatricula.Situacao == Situcao.Cancelado)
            {
                return(false);
            }


            disciplinaMatricula.Situacao = Situcao.Cancelado;

            return(await disciplinaMatriculaService.CancelamentoMatriculaAsync(disciplinaMatricula));
        }
示例#2
0
 public async Task <bool> CancelamentoMatriculaAsync(IDisciplinaMatricula disciplinaMatricula)
 {
     return(await disciplinaMatriculaRepository.CancelamentoMatriculaAsync(disciplinaMatricula));
 }
示例#3
0
        public Task <IDisciplinaMatricula> ValidarDisciplinaMatriculaAsync(int idDisciplina, int idMatricula)
        {
            IDisciplinaMatricula disciplinaMatricula = DataFake.DataFake.disciplinaMatriculas().Where(x => x.Disciplina.IdDisciplina == idDisciplina && x.Matricula.IdMatricula == idMatricula).FirstOrDefault();

            return(Task.FromResult(disciplinaMatricula));
        }
示例#4
0
 public Task <bool> CancelamentoMatriculaAsync(IDisciplinaMatricula disciplinaMatricula)
 {
     return(Task.FromResult(true));
 }