public string AddTask(string data, Client client, Server server) { string content = data; taskDAO.AddTask(client.MySQLConn, client.GetUserId(), content); return(UpdateTask("", client, server)); }
public void SubmitTask(ModifyTaskViewModel viewModel) { string userId = User.FindFirst(ClaimTypes.NameIdentifier).Value; switch (viewModel.Mode) { case "add": taskDao.AddTask(viewModel.ToTaskModel(), userId); break; case "edit": taskDao.EditTask(viewModel.ToTaskModel(), userId); break; case "delete": taskDao.DeleteTaskById(viewModel.Id, userId); break; } }
public static void AddTask(TASK task) { TaskDAO.AddTask(task); }
// POST: api/Task public IHttpActionResult Post(TaskViewModel task) { taskDao.AddTask(task); return(Ok()); }
public static void AddTask(DAL.Task task) { TaskDAO.AddTask(task); }