public async Task <NewResponseModel> AddTask(SharedServicesModule.Models.Task task) { try { string json = JsonConvert.SerializeObject(task); return(await RequestService.Post(Consts.BaseAddress + "api/tasks/new", json)); } catch { throw; } }
public async Task <NewResponseModel> AddTask(SharedServicesModule.Models.Task task) { try { string json = JsonConvert.SerializeObject(task); return(await RequestService.Post("https://localhost:44316/api/tasks/new", json)); } catch { throw; } }
public async System.Threading.Tasks.Task ChangeTask(SharedServicesModule.Models.Task task, string taskName, string taskDescription, int userId, DateTime taskFinishDate) { try { UpdateTaskModel updateTaskModel = new UpdateTaskModel() { Task = task, TaskName = taskName, TaskDescription = taskDescription, UserId = userId, TaskFinishDate = taskFinishDate }; string json = JsonConvert.SerializeObject(updateTaskModel); await RequestService.Put("https://localhost:44316/api/tasks/", json); } catch { throw; } }
public async Task ChangeTask(SharedServicesModule.Models.Task task, string taskName, string taskDescription, int userId, int statusId, DateTime taskFinishDate) { try { UpdateTaskModel updateTaskModel = new UpdateTaskModel() { Task = task, TaskName = taskName, TaskDescription = taskDescription, UserId = userId, StatusId = statusId, TaskFinishDate = taskFinishDate }; string json = JsonConvert.SerializeObject(updateTaskModel); await RequestService.Put(Consts.BaseAddress + "api/tasks/", json); } catch { throw; } }