Ejemplo n.º 1
0
        public async Task <IActionResult> GetAllProjectDeliverablesByProjectId(string projectAltId)

        {
            var prjId = _armsProjectRepo.GetArmsProjectByProjAltId(int.Parse(projectAltId)).ProjId;
            var CustomDeliverablesByIDFromRepo = await _customDeliverableRepo.GetDeliverablesByProjIdAsync(prjId);

            if (CustomDeliverablesByIDFromRepo == null)
            {
                return(BadRequest());
            }
            return(Ok(CustomDeliverablesByIDFromRepo));
        }
Ejemplo n.º 2
0
        public IActionResult GetArmsProjectByProjAltId(string projAltId)
        {
            var projId = Guid.Empty;

            if (projAltId == String.Empty)
            {
                return(BadRequest());
            }
            int projAltID = Int32.Parse(projAltId);
            var project   = _armsProjectRepository.GetArmsProjectByProjAltId(projAltID);
            var result    = _mapper.Map <DTOs.ArmsProjectForDD>(project);

            if (result != null)
            {
                projId = result.ProjId;
            }
            return(Ok(projId));
        }
Ejemplo n.º 3
0
        public IActionResult GetProjectHeaderByProjAltId(string projAltId)
        {
            if (string.IsNullOrEmpty(projAltId))
            {
                return(BadRequest());
            }
            int projAltID  = int.Parse(projAltId);
            var project    = _armsProjectRepository.GetArmsProjectByProjAltId(projAltID);
            var projectDto = _mapper.Map <DTOs.ProjectHeader>(project);

            return(Ok(projectDto));
        }