Exemplo n.º 1
0
        public static List <Project> GetProjectsList(int page)
        {
            int takeCount = Config.PageItemCount();
            int skipCount = page * takeCount;

            return(ProjectsRepositories.GetProjectsList(skipCount, takeCount));
        }
Exemplo n.º 2
0
        public static List <ProjectUserDetails> GetUserProjectList(int page, int userId)
        {
            int takeCount = Config.PageItemCount();
            int skipCount = page * takeCount;

            return(ProjectsRepositories.GetProjectUserList(userId, skipCount, takeCount));
        }
Exemplo n.º 3
0
 public static CreateSuggestionModel UpdateProjectsList(CreateSuggestionModel model)
 {
     model.Projects = ProjectsRepositories.GetAllProjects();
     model.Projects.Insert(0, (new Project {
         Name = "General", Id = 0
     }));
     return(model);
 }
Exemplo n.º 4
0
        public static List <string> AutocompleteProjects(int sprintId, bool isInSprint)
        {
            if (isInSprint)
            {
                return(ProjectsRepositories.AutocompleteProjectsInSprint(sprintId));
            }

            return(ProjectsRepositories.AutocompleteProjectsNotInSprint(sprintId));
        }
Exemplo n.º 5
0
 public static bool InsertProjectSprint(int sprintId, string projectName, int userId)
 {
     return(ProjectsRepositories.InsertSprintProject(sprintId, new Project()
     {
         CreateDate = DateTimeHelper.Today(),
         UpdateDate = DateTimeHelper.Today(),
         CreatorId = userId,
         Name = projectName
     }));
 }
Exemplo n.º 6
0
        public static CreateSuggestionModel GetEditSuggestionModel(int suggestionId)
        {
            CreateSuggestionModel model = new CreateSuggestionModel();

            model.Projects = ProjectsRepositories.GetAllProjects();
            model.Projects.Insert(0, (new Project {
                Name = "General", Id = 0
            }));
            model.Suggestion = SuggestionsRepositories.GetSuggestionById(suggestionId);
            return(model);
        }
Exemplo n.º 7
0
        public static bool InsertNewSprintProject(int sprintId, string projectName)
        {
            Project project = ProjectsRepositories.GetProjectByName(projectName);

            if (project != null)
            {
                SprintsRepositories.InsertNewSprintProject(new SprintProject
                {
                    SprintId  = sprintId,
                    ProjectId = project.Id
                });
                return(true);
            }
            return(false);
        }
Exemplo n.º 8
0
        public static StoriesIndexModel GetStoriesIndexModel(StoriesFilter storiesFilter, int projectId)
        {
            Project           project = new Project();
            StoriesIndexModel model   = new StoriesIndexModel
            {
                projectId     = projectId,
                OrderedByName = storiesFilter.OrderedByName,
                Reviewed      = storiesFilter.Reviewed,
                SearchText    = storiesFilter.SearchText
            };

            if (projectId != 0)
            {
                project           = ProjectsRepositories.GetProjectById(projectId);
                model.projectName = project.Name;
            }
            return(model);
        }
Exemplo n.º 9
0
 public static void DeleteProject(int id)
 {
     ProjectsRepositories.DeleteProject(id);
 }
Exemplo n.º 10
0
 public static void UpdateProject(Project project)
 {
     ProjectsRepositories.UpdateProject(project);
 }
Exemplo n.º 11
0
 public static void InsertNewProject(Project project)
 {
     ProjectsRepositories.InsertNewProject(project);
 }
Exemplo n.º 12
0
 public static Project GetProjectById(int id)
 {
     return(ProjectsRepositories.GetProjectById(id));
 }
Exemplo n.º 13
0
 public static List <SprintProjectsDetails> GetProjectsBySprintId(int sprintId, string searchTxt)
 {
     return(ProjectsRepositories.GetProjectsBySprintId(sprintId, searchTxt));
 }
Exemplo n.º 14
0
 public static List <Project> GetProjectlist()
 {
     return(ProjectsRepositories.GetProjectlist());
 }
Exemplo n.º 15
0
 public static List <Project> GetProjectsBySprints(int sprintId)
 {
     return(ProjectsRepositories.GetProjectsBySprints(sprintId));
 }
Exemplo n.º 16
0
        public static void UpdateProject(Project project)
        {
            DateTime myDate = DateTimeHelper.Today();

            ProjectsRepositories.UpdateProject(project, myDate);
        }