Пример #1
0
        public static List <Project> GetProjectsList(int page)
        {
            int takeCount = Config.PageItemCount();
            int skipCount = page * takeCount;

            return(ProjectsRepositories.GetProjectsList(skipCount, takeCount));
        }
Пример #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));
        }
Пример #3
0
 public static CreateSuggestionModel UpdateProjectsList(CreateSuggestionModel model)
 {
     model.Projects = ProjectsRepositories.GetAllProjects();
     model.Projects.Insert(0, (new Project {
         Name = "General", Id = 0
     }));
     return(model);
 }
Пример #4
0
        public static List <string> AutocompleteProjects(int sprintId, bool isInSprint)
        {
            if (isInSprint)
            {
                return(ProjectsRepositories.AutocompleteProjectsInSprint(sprintId));
            }

            return(ProjectsRepositories.AutocompleteProjectsNotInSprint(sprintId));
        }
Пример #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
     }));
 }
Пример #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);
        }
Пример #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);
        }
Пример #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);
        }
Пример #9
0
 public static void DeleteProject(int id)
 {
     ProjectsRepositories.DeleteProject(id);
 }
Пример #10
0
 public static void UpdateProject(Project project)
 {
     ProjectsRepositories.UpdateProject(project);
 }
Пример #11
0
 public static void InsertNewProject(Project project)
 {
     ProjectsRepositories.InsertNewProject(project);
 }
Пример #12
0
 public static Project GetProjectById(int id)
 {
     return(ProjectsRepositories.GetProjectById(id));
 }
Пример #13
0
 public static List <SprintProjectsDetails> GetProjectsBySprintId(int sprintId, string searchTxt)
 {
     return(ProjectsRepositories.GetProjectsBySprintId(sprintId, searchTxt));
 }
Пример #14
0
 public static List <Project> GetProjectlist()
 {
     return(ProjectsRepositories.GetProjectlist());
 }
Пример #15
0
 public static List <Project> GetProjectsBySprints(int sprintId)
 {
     return(ProjectsRepositories.GetProjectsBySprints(sprintId));
 }
Пример #16
0
        public static void UpdateProject(Project project)
        {
            DateTime myDate = DateTimeHelper.Today();

            ProjectsRepositories.UpdateProject(project, myDate);
        }