public ActionResult CancelTask(Guid?userTaskId)
        {
            if (userTaskId.HasValue)
            {
                UserTask userTask = UserTasksHelpers.GetUserTask(db, userTaskId.Value);

                switch (userTask.TaskType)
                {
                case TaskTypeEnum.UserOnHold:      //Make AppUser inactive
                    AppUserHelpers.UpdateAppUserEntityStatus(db, userTask.ReferenceKey, EntityStatusEnum.Inactive, User);
                    break;
                }

                //close the Task
                UserTasksHelpers.UpdateEntityStatus(db, userTask.UserTaskId, EntityStatusEnum.Closed);

                return(Json(new { success = true }));
            }
            else
            {
                return(Json(new { success = false }));
            }
        }