예제 #1
0
        public ActionResult CreateSprintFromKanban(long id)
        {
            Sprint sprint = new Sprint();
            sprint.StartDate = DateTime.Now;
            sprint.EndDate = DateTime.Now;
            sprint.ProjectID = id;
            sprint.Project = unitOfWork.ProjectRepository.Find(sprint.ProjectID);

            return PartialView(sprint);
        }
예제 #2
0
 public void InsertOrUpdate(Sprint sprint)
 {
     if (sprint.SprintID == default(long)) {
         // New entity
         context.Sprints.Add(sprint);
     } else {
         // Existing entity
         context.Entry(sprint).State = System.Data.Entity.EntityState.Modified;
     }
 }
예제 #3
0
        public ActionResult CreateSprint(long projectId)
        {
            Sprint sprint = new Sprint();
            sprint.StartDate = DateTime.Now;
            sprint.EndDate = DateTime.Now;
            sprint.ProjectID = projectId;
            sprint.Project = unitOfWork.ProjectRepository.Find(sprint.ProjectID);


            return View(sprint);
        }
예제 #4
0
 public void InsertOrUpdate(Sprint sprint)
 {
     if (sprint.SprintID == default(long))
     {
         // New entity
         context.Sprints.Add(sprint);
     }
     else
     {
         // Existing entity
         context.Entry(sprint).State = System.Data.Entity.EntityState.Modified;
     }
 }
예제 #5
0
        public PartialViewResult CreateSprintFromKanban(Sprint sprint)
        {

            if (ModelState.IsValid)
            {
                unitOfWork.SprintRepository.InsertOrUpdate(sprint);
                unitOfWork.Save();
            }

            Project project = unitOfWork.ProjectRepository.Find(sprint.ProjectID);
            ViewBag.CurrentProject = project;
            List<Task> taskList = new List<Task>();
            taskList = unitOfWork.TaskRepository.GetTasksBySprintID(sprint.SprintID);

            return PartialView("~/Views/Tasks/_Kanban", taskList);
        }
예제 #6
0
        public ActionResult CreateSprint(Sprint sprint)
        {

            if (ModelState.IsValid)
            {
                unitOfWork.SprintRepository.InsertOrUpdate(sprint);
                unitOfWork.Save();
                //return RedirectToAction("Sprint", new { @projectId = sprint.ProjectID });
                return RedirectToAction("Index", new { @projectId = sprint.ProjectID });
            }

            Project project = unitOfWork.ProjectRepository.Find(sprint.ProjectID);
            ViewBag.CurrentProject = project;
            List<Task> taskList = new List<Task>();
            taskList = unitOfWork.TaskRepository.GetTasksBySprintID(sprint.SprintID);

            //return RedirectToAction("Sprint", new { @projectId = sprint.ProjectID });
            return RedirectToAction("Index", new { @projectId = sprint.ProjectID });

            //return PartialView();
        }
예제 #7
0
        public ActionResult Edit(Sprint sprint)
        {
            if (ModelState.IsValid)
            {
                unitOfWork.SprintRepository.InsertOrUpdate(sprint);
                unitOfWork.Save();
                return RedirectToAction("Index", new { @projectId = sprint.ProjectID });
            }

            return View(sprint);
        }
예제 #8
0
 public PartialViewResult EditSprint(Sprint sprint)
 {
     unitOfWork.SprintRepository.InsertOrUpdate(sprint);
     unitOfWork.Save();
     List<Task> taskList = unitOfWork.TaskRepository.ByProjectIncluding(sprint.ProjectID, task => task.Project).Include(task => task.Priority).Include(task => task.ChildTask).Include(task => task.Users).Include(task => task.Followers).Include(task => task.Labels).ToList();
     ViewBag.CurrentProject = unitOfWork.ProjectRepository.Find(sprint.ProjectID);
     return PartialView("_Kanban", taskList);
 }