public JSendResponse UpdateTaskDetails(Task task) { return(new JSendResponse() { Data = taskObj.UpdateTaskDetails(task) }); }
public JSendResponse UpdateTaskDetails(Task task) { if (task == null) { throw new ArgumentNullException("Task object is null"); } if (task.Parent_ID < 0) { throw new ArithmeticException("Parent Id of task cannot be negative"); } if (task.Project_ID < 0) { throw new ArithmeticException("Project Id cannot be negative"); } if (task.TaskId < 0) { throw new ArithmeticException("Task id cannot be negative"); } return(new JSendResponse() { Data = taskObj.UpdateTaskDetails(task) }); }