public MoveTask ( int taskId, int userId ) : void | ||
taskId | int | /// The task id. /// |
userId | int | /// The user id. /// |
return | void |
public void MoveTask(int taskId, int userId)
{
var taskToBeAssigned = this.humanTaskRepository.GetById(taskId);
try
{
this.userRepository.GetById(userId);
taskToBeAssigned.AssigneeId = userId;
}
catch
{
taskToBeAssigned.AssigneeId = null;
}
finally
{
this.humanTaskRepository.Update(taskToBeAssigned);
}
}