예제 #1
0
 /// <summary>
 /// Removes the given issue from the user
 /// </summary>
 /// <param name="issue">The issue to be removed from the user</param>
 public void RemoveIssueFromUser(IssueModel issue)
 {
     if (_issues != null)
     {
         _issues.Remove(issue);
     }
 }
 /// <summary>
 /// Creates a notification and adds it to a user
 /// </summary>
 /// <param name="message">Text of the notification</param>
 /// <param name="nType">Type of the notification (NotificationType enumeration)</param>
 /// <param name="owner">The user the notification has to be added to</param>
 /// <param name="issue">The issue the notification is connected to</param>
 public NotificationModel(string message, NotificationType nType, UserModel owner, IssueModel issue = null)
 {
     _message   = message;
     _notifType = nType;
     _date      = DateTime.Today;
     _issue     = issue;
     owner.AddNotification(this);
 }
예제 #3
0
 /// <summary>
 /// Adds an issue to the user
 /// </summary>
 /// <param name="issue">The issue to be added to the user</param>
 public void AddIssue(IssueModel issue)
 {
     if (_issues == null)
     {
         _issues = new List <IssueModel>();
     }
     _issues.Add(issue);
 }
예제 #4
0
 /// <summary>
 /// Adds a subissue to this issue
 /// </summary>
 /// <param name="issue">The issue</param>
 public void AddSubIssue(IssueModel issue)
 {
     if (_subIssues == null)
     {
         _subIssues = new List <IssueModel>();
     }
     _subIssues.Add(issue);
     calcProgress();
 }
예제 #5
0
 /// <summary>
 /// Constructor of an issue
 /// </summary>
 /// <param name="name">Name of the issue</param>
 /// <param name="description">Description of the issue</param>
 /// <param name="owner">Owner of the issue</param>
 /// <param name="parentIssue">The root issue to whis this will be added (if this is not a root issue itself)</param>
 /// <param name="difficulty">Difficulty of the issue</param>
 /// <param name="status">Status of the issue</param>
 /// <param name="priority">Priority of the issue</param>
 public IssueModel(string name, string description, UserModel owner, IssueModel parentIssue = null,
                   IssueDifficulty difficulty = IssueDifficulty.Normal, IssueStatus status = IssueStatus.Created,
                   IssuePriority priority     = IssuePriority.Normal)
 {
     // set values
     _issueName          = name;
     _description        = description;
     _difficulty         = difficulty;
     _status             = status;
     _priority           = priority;
     _progressPercentage = 0.0;
     _creationDate       = DateTime.Today;
     // add owner to the issue, add the issue to the owner
     _addedUsers = new List <UserModel>();
     _addedUsers.Add(owner);
     owner.AddIssue(this);
     // add parent issue
     if (parentIssue != null)
     {
         _parentIssue = parentIssue;
         parentIssue.AddSubIssue(this);
     }
 }
예제 #6
0
 public ActionResult SaveIssue(IssueModel pIssue)
 {
     return RedirectToAction("Index");
 }
예제 #7
0
 public ActionResult Edit(IssueModel pIssue)
 {
     return View(pIssue);
 }
예제 #8
0
        public ActionResult Add(IssueModel pIssue)
        {
            Issues.Add(pIssue);

            return RedirectToAction("Index");
        }