public override void Update() { BugDTO bug = BugService.GetByID(this.BugId); bug.Name = this.EntityName; bug.ProjectID = this.ProjectId; if (IsDescriptionSet) { bug.Description = this.Description; } if (!String.IsNullOrEmpty(this.UserStory) || IsUserStoryIdSet) { bug.UserStoryID = this.UserStoryId; } if (!String.IsNullOrEmpty(this.State)) { bug.EntityStateID = this.StateId; } BugService.Update(bug); foreach (TargetProcessUser user in this.UsersToAssign) { BugService.AssignUser(bug.BugID.Value, user.GetId()); } }
public override void Create() { BugDTO bug = new BugDTO { Name = this.EntityName, ProjectID = this.ProjectId }; if (!String.IsNullOrEmpty(this.UserStory) || IsUserStoryIdSet) { bug.UserStoryID = this.UserStoryId; } if (IsDescriptionSet) { bug.Description = this.Description; } if (!String.IsNullOrEmpty(this.State)) { bug.EntityStateID = this.StateId; } int taskId = BugService.Create(bug); foreach (TargetProcessUser user in this.UsersToAssign) { BugService.AssignUser(taskId, user.GetId()); } }