public override void Create() { UserStoryDTO story = new UserStoryDTO { Name = this.EntityName, ProjectID = this.ProjectId }; if (IsDescriptionSet) { story.Description = this.Description; } if (!String.IsNullOrEmpty(this.State)) { story.EntityStateID = this.StateId; } int storyId = StoryService.Create(story); foreach (TargetProcessUser user in this.UsersToAssign) { StoryService.AssignUser(storyId, user.GetId()); } }
public override void Update() { UserStoryDTO story = StoryService.GetByID(this.UserStoryId); story.Name = this.EntityName; story.ProjectID = this.ProjectId; if (IsDescriptionSet) { story.Description = this.Description; } if (!String.IsNullOrEmpty(this.State)) { story.EntityStateID = this.StateId; } StoryService.Update(story); foreach (TargetProcessUser user in this.UsersToAssign) { StoryService.AssignUser(story.UserStoryID.Value, user.GetId()); } }