Exemple #1
0
        internal DownloadCVResponse GetCVBecarioByBecarioId(IBecarioRepository becarioRepository, int becarioId)
        {
            var response = new DownloadCVResponse();

            try
            {
                var becario = becarioRepository.GetOne(x => x.BecarioId == becarioId);

                response.IsValid   = true;
                response.UrlCV     = becario.UrlCV;
                response.NombreCV  = becario.NombreCV;
                response.BecarioId = becario.BecarioId;
            }
            catch (Exception ex)
            {
                response.IsValid      = false;
                response.ErrorMessage = ex.Message;
            }

            return(response);
        }
        internal DownloadCVResponse GetCVCandidaturaByCandidaturaId(ICandidaturaRepository candidaturaRepository, int candidaturaId)
        {
            var response = new DownloadCVResponse();

            try
            {
                var candidatura = candidaturaRepository.GetOne(x => x.CandidaturaId == candidaturaId);

                response.IsValid       = true;
                response.UrlCV         = candidatura.UrlCV;
                response.NombreCV      = candidatura.NombreCV;
                response.CandidaturaId = candidatura.CandidaturaId;
            }
            catch (Exception ex)
            {
                response.IsValid      = false;
                response.ErrorMessage = ex.Message;
            }

            return(response);
        }