internal static void UpdateProject(int todoId, int projectId, bool checkAccess) { if (checkAccess && !ToDo.CanChangeProject(todoId)) { throw new AccessDeniedException(); } UpdateProjectAndManager(todoId, projectId, 0); }
// Batch #region UpdateWithProject() public static void UpdateWithProject(int todoId, int projectId, int managerId, string title, string description, DateTime startDate, DateTime finishDate, int priorityId, int activationTypeId, int completionTypeId, bool mustBeConfirmed, int taskTime, ArrayList categories, PrimaryKeyId contactUid, PrimaryKeyId orgUid) { VerifyCanUpdate(todoId); int oldProjectId = DBToDo.GetProject(todoId); if (oldProjectId != projectId && !ToDo.CanChangeProject(todoId)) { throw new AccessDeniedException(); } using (DbTransaction tran = DbTransaction.Begin()) { UpdateGeneralInfo(todoId, title, description, false); UpdateProjectAndManager(todoId, projectId, managerId); UpdateTimeline(todoId, startDate, finishDate, taskTime); UpdatePriority(todoId, priorityId, false); UpdateCategories(ListAction.Set, todoId, categories, false); UpdateConfigurationInfo(todoId, activationTypeId, completionTypeId, mustBeConfirmed, false); UpdateClient(todoId, contactUid, orgUid, false); tran.Commit(); } }