示例#1
0
        public ActionResult CompleteBacklog(int id)
        {
            if (UserRepository.IsUserSigned())
            {
                if (ProjectRepository.CompleteBacklog(id, null))
                {
                    var existBacklog = db.ProductBacklogs.FirstOrDefault(x => x.ProductBacklogId == id);

                    ActivityRepository.ActivityCreator
                        ("completed " + existBacklog.Name + " backlog.",
                        existBacklog.ProjectId, existBacklog.ProductBacklogId);

                    return(RedirectToAction("IndexBacklog", "Project", new { projectId = existBacklog.ProjectId }));
                }
                return(Content("There are errors, you cannot unassign from this backlog."));
            }
            return(RedirectToAction("Login", "User"));
        }