Beispiel #1
0
        public IEnumerable <ProjectViewModel> GetAdministratorProjectList()
        {
            // Mapp to backend model
            IEnumerable <ProjectView>      projectViewList = projectRepository.GetCountyProjects();
            IEnumerable <ProjectViewModel> content         = null;

            if (projectViewList != null)
            {
                content = ApplicationMapper.MapProjectContent(projectViewList);
            }
            return(content);
        }
Beispiel #2
0
        //[EnableCors("ori, ori2", "headers,...", "GET")]
        public IEnumerable <ProjectViewModel> GetProjectList()
        {
            // Mapp to backend model
            IEnumerable <ProjectView>      projectViewList = projectRepository.GetProjects(ActiveState.All);
            IEnumerable <ProjectViewModel> content         = null;

            if (projectViewList != null)
            {
                content = ApplicationMapper.MapProjectContent(projectViewList);
            }
            return(content);
        }
Beispiel #3
0
        public ProjectModel GetProject(int id)
        {
            ProjectModel content = null;

            // Get project from DB
            Core.Model.Project project = projectRepository.GetProject(id);


            //Mapp to UI model
            if (project != null)
            {
                content = ApplicationMapper.MapProjectContent(project);
            }
            return(content);
        }
Beispiel #4
0
        //[EnableCors("ori, ori2", "headers,...", "GET")]
        public IEnumerable <ProjectViewModel> GetProjectList(bool active)
        {
            ActiveState state;

            if (active)
            {
                state = ActiveState.Active;
            }
            else
            {
                state = ActiveState.InActive;
            }

            // Mapp to backend model
            IEnumerable <ProjectView>      projectViewList = projectRepository.GetProjects(state);
            IEnumerable <ProjectViewModel> content         = null;

            if (projectViewList != null)
            {
                content = ApplicationMapper.MapProjectContent(projectViewList);
            }
            return(content);
        }