Пример #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);
 }