public ActionResult CreateTask(Problem _Task, string Status) { _Task.Status = Status; _Task.StartDate = DateTime.Now; repository.CreateTask(_Task); return RedirectToAction("Index"); }
public ActionResult CreateChildTask(Problem _Task, string Status, string ParentTaskId) { Problem ParentTask = repository.FindTask(Convert.ToInt32(ParentTaskId)); _Task.Status = Status; _Task.StartDate = DateTime.Now; _Task.ParentTasks.Add(ParentTask); repository.CreateTask(_Task); return RedirectToAction("Index"); }
public void EditTask(Problem _Task) { Problem Task = FindTask(_Task.Id); Task.Title = _Task.Title; Task.Description = _Task.Description; Task.Laboriousness = _Task.Laboriousness; Task.ActualExecutiontime = _Task.ActualExecutiontime; Task.EndDate = _Task.EndDate; Task.Status = _Task.Status; Task.Performers = _Task.Performers; dbcontex.Entry(Task).State = EntityState.Modified; dbcontex.SaveChanges(); }
public void CreateTask(Problem _Task) { dbcontex.Problems.Add(_Task); dbcontex.SaveChanges(); }
private void AddCht(List<int> Cht, Problem task) { //Cht.Add(task.Id); if (task.ChildTasks.Count!=0) foreach (Problem Childtask in task.ChildTasks) { Cht.Add(Childtask.Id); Problem v = FindTask(Childtask.Id); AddCht(Cht, v); } }
public ActionResult EditTask(Problem _Task) { repository.EditTask(_Task); return RedirectToAction("Index"); }