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)); }
public async Task <bool> CancelamentoMatriculaAsync(IDisciplinaMatricula disciplinaMatricula) { return(await disciplinaMatriculaRepository.CancelamentoMatriculaAsync(disciplinaMatricula)); }
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)); }
public Task <bool> CancelamentoMatriculaAsync(IDisciplinaMatricula disciplinaMatricula) { return(Task.FromResult(true)); }