public int UpdateEndTask(TaskModel task) { int result = 0; if (ModelState.IsValid) { taskMgrBusiness = new TaskManagerBusiness(); result = taskMgrBusiness.UpdateTask(task); } return(result); }
public void updateTask([FromBody] TASK task) { TaskManagerBusiness TBL = new TaskManagerBusiness(); TBL.UpdateTask(new TASK() { Task_id = task.Task_id, TaskName = task.TaskName, parent_id = task.parent_id, Startdate = Convert.ToDateTime(task.Startdate), Enddate = Convert.ToDateTime(task.Enddate), task_priority = task.task_priority }); }
public HttpResponseMessage UpdateTask([FromBody] TaskRequest request, int TaskId) { var tmBusiness = new TaskManagerBusiness(); if (request == null) { return(Request.CreateResponse(HttpStatusCode.BadRequest, "Unable to process your request, Please enter a valid request.")); } request.TaskId = TaskId; var response = tmBusiness.UpdateTask(request); if (response != null) { return(Request.CreateResponse(HttpStatusCode.OK, response)); } return(Request.CreateResponse(HttpStatusCode.BadRequest, "Unable to get task details,Please try again later")); }