private static void eventContainer_DeleteUserTasks(UserTaskCollection tasks, Dictionary <object, object> context) { ExceptionHelper.FalseThrow <ArgumentNullException>(tasks != null, "tasks"); InSqlClauseBuilder builder = new InSqlClauseBuilder(); tasks.ForEach(u => builder.AppendItem(u.TaskID)); if (builder.Count > 0) { string sql = string.Format("DELETE WF.USER_TASK WHERE TASK_GUID {0}", builder.ToSqlStringWithInOperator(TSqlBuilder.Instance)); DbHelper.RunSql(sql, GetConnectionName()); } }
private void eventContainer_BeforeDeleteUserTasks(UserTaskCollection tasks, Dictionary <object, object> context) { ExceptionHelper.FalseThrow <ArgumentNullException>(tasks != null, "tasks"); tasks.ForEach(task => TaskChangedUserIDs[task.SendToUserID] = task.SendToUserID); }