public ContentResult AddProject(Task task) { string json; _ganttService.InsertTask(task); json = JsonConvert.SerializeObject(new { id = 0, success = true, message = "Post added successfully." }); return Content(json, "application/json"); }
public void UpdateTask(Task task) { Task t = _taskRepository.GetById(task.Id); t.Text = task.Text; t.Type = task.Type; t.StartDate = task.StartDate; t.SortOrder = task.SortOrder; t.Progress = task.Progress; t.ParentId = task.ParentId; t.Duration = task.Duration; _taskRepository.Update(t); }
public void DeleteTask(Task task) { _taskRepository.Delete(task); }
public void InsertTask(Task task) { _taskRepository.Insert(task); }