public void EndTask(CommonEntities.Tasks task) { ProjectManagerEntities mockContext = MockDataSetList(); var taskBL = new TaskBL(mockContext); taskBL.EndTask(task); }
public IHttpActionResult EndTask(int taskId) { var taskBL = new TaskBL(_context); taskBL.EndTask(taskId); return(Ok()); }
public void End() { taskBL.EndTask(1); var task = taskBL.GetTaskById(1); Assert.True(task.IsCompleted); }
public IHttpActionResult EndTask(int taskId) { TaskBL blTask = new TaskBL(); try { blTask.EndTask(taskId); } catch (Exception ex) { return(Ok(ex.Message)); } return(Ok(blTask.GetAllTasks())); }
public async Task <IHttpActionResult> Put(int id) { Entities.Task task = new Entities.Task(); task.TaskID = id; if (!ModelState.IsValid) { return(BadRequest(ModelState)); } string result = await taskobj.EndTask(task); if (result == "Task Not Found") { return(NotFound()); } return(Ok(result)); }
public async Task <IHttpActionResult> EndTask(int id) { //Entities.Task task = new Entities.Task(); //task.TaskId = id; if (!ModelState.IsValid) { return(BadRequest(ModelState)); } //if (id != task.TaskId) //{ // return BadRequest(); //} string result = await taskObj.EndTask(id); if (result == "Task Not Found") { return(NotFound()); } return(Ok(result)); }