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); }
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; } }
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); }
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); }
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(); }
public ActionResult Edit(Sprint sprint) { if (ModelState.IsValid) { unitOfWork.SprintRepository.InsertOrUpdate(sprint); unitOfWork.Save(); return RedirectToAction("Index", new { @projectId = sprint.ProjectID }); } return View(sprint); }
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); }