예제 #1
0
        public IEnumerable<ScrumStoryServiceModel> getStoriesByClassification(string text)
        {
            ScrumStoryRepository repo = new ScrumStoryRepository(entities);
            IEnumerable<ScrumStory> stories = repo.getStoriesByClassification(ScrumUtil.mapClassificationToScrum(text));
            List<ScrumStoryServiceModel> models = new List<ScrumStoryServiceModel>();

            foreach (ScrumStory story in stories) {
                models.Add(ScrumUtil.mapScrumStoryEntityToModel(story));
            }

            return models;
        }
예제 #2
0
        public IEnumerable<ScrumStoryServiceModel> getStoriesByKeywordAcceptanceCriteria(string text)
        {
            ScrumStoryRepository repo = new ScrumStoryRepository(entities);
            IEnumerable<ScrumStory> stories = repo.getStoriesByKeywordAcceptanceCriteria(text);
            List<ScrumStoryServiceModel> models = new List<ScrumStoryServiceModel>();

            foreach (ScrumStory story in stories) {
                models.Add(ScrumUtil.mapScrumStoryEntityToModel(story));
            }

            return models;
        }
예제 #3
0
        public IEnumerable<ScrumStoryServiceModel> getStoriesByBlocked(bool blocked)
        {
            ScrumStoryRepository repo = new ScrumStoryRepository(entities);
            IEnumerable<ScrumStory> stories = repo.getStoriesByBlocked(blocked);
            List<ScrumStoryServiceModel> models = new List<ScrumStoryServiceModel>();

            foreach (ScrumStory story in stories) {
                models.Add(ScrumUtil.mapScrumStoryEntityToModel(story));
            }

            return models;
        }
예제 #4
0
 public bool deleteScrumStory(int id)
 {
     ScrumStoryRepository repo = new ScrumStoryRepository(entities);
     ScrumStory story = repo.Get(id);
     try {
         repo.Delete(story);
         return true;
     }
     catch (Exception ex) {
         _errorMessage = ex.Message;
         return false;
     }
 }
예제 #5
0
 public ScrumStoryServiceModel getScrumStory(int id)
 {
     ScrumStoryRepository repo = new ScrumStoryRepository(entities);
     ScrumStory story = repo.Get(id);
     return ScrumUtil.mapScrumStoryEntityToModel(story);
 }
예제 #6
0
 public int updateScrumStory(ScrumStoryServiceModel scrumStory)
 {
     ScrumStoryRepository repo = new ScrumStoryRepository(entities);
     throw new NotImplementedException();
 }
예제 #7
0
 public int insertScrumStory(ScrumStoryServiceModel scrumStory)
 {
     ScrumStoryRepository repo = new ScrumStoryRepository();
     ScrumStory model = new ScrumStory();
     model.AcceptanceCriteria = scrumStory.acceptanceCriteria;
     model.Blocked = scrumStory.blocked;
     model.Classification = ScrumUtil.mapClassificationToScrum(scrumStory.classification);
     model.CreateDate = DateTime.Now;
     model.Description = scrumStory.description;
     model.Id = 0;
     model.LastUpdatedDate = DateTime.Now;
     model.Points = scrumStory.points;
     model.Priority = ScrumUtil.mapPriorityToScrum(scrumStory.priority);
     model.Release = scrumStory.release;
     model.Sprint = scrumStory.sprint;
     model.Status = ScrumUtil.mapStatusToScrum(scrumStory.status);
     model.Subject = scrumStory.subject;
     model.Type = ScrumUtil.mapTypeToScrum(scrumStory.status);
     model.WorkNotes = scrumStory.workNotes;
     return repo.Insert(model);
 }