Ejemplo n.º 1
0
        public IList <IComplexIssueDTO> GetAllActiveIssues()
        {
            IList <IComplexIssueDTO> issueDTOList = null;
            IComplexIssueDTO         issueDTO     = null;

            try
            {
                using (EmployeePortalEntities portal = new EmployeePortalEntities())
                {
                    var issueList = portal.GetAllIssuesByEmployeeId(null).ToList();
                    if (issueList.Count > 0)
                    {
                        issueDTOList = new List <IComplexIssueDTO>();
                        foreach (var issue in issueList)
                        {
                            issueDTO = (IComplexIssueDTO)DTOFactory.Instance.Create(DTOType.ComplexIssueDTO);
                            EntityConverter.FillDTOFromComplexObject(issue, issueDTO);
                            issueDTOList.Add(issueDTO);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.HandleException(ex);
                throw new DACException(ex.Message);
            }
            return(issueDTOList);
        }