Exemple #1
0
        public virtual void StartBlock6(Sungero.RecordManagement.Server.ActionItemSupervisorAssignmentArguments e)
        {
            // Задать тему, исполнителей и срок.
            e.Block.Subject = Functions.ActionItemExecutionTask.GetActionItemExecutionSubject(_obj, ActionItemExecutionTasks.Resources.ControlWorkFromJob);
            var controller = _obj.Supervisor;

            if (controller != null)
            {
                e.Block.Performers.Add(controller);
            }

            var assignmentsDeadLine = 1;

            e.Block.RelativeDeadlineDays = assignmentsDeadLine;

            // Задать состояние поручения.
            _obj.ExecutionState = ExecutionState.OnControl;

            // Заполнить даты поручения.
            e.Block.ScheduledDate = _obj.Deadline;

            // Для подзадач соисполнителям заполнять данными из основной задачи.
            if (_obj.ActionItemType != ActionItemType.Main)
            {
                var mainActionItemExecution = ActionItemExecutionTasks.As(_obj.MainTask);
                if (mainActionItemExecution != null && !(mainActionItemExecution.IsCompoundActionItem ?? false))
                {
                    // Задать автора.
                    e.Block.AssignedBy = mainActionItemExecution.AssignedBy;
                }
            }

            Docflow.PublicFunctions.Module.SynchronizeAddendaAndAttachmentsGroup(_obj.AddendaGroup, _obj.DocumentsGroup.OfficialDocuments.FirstOrDefault());
        }
Exemple #2
0
 public virtual void CompleteAssignment6(Sungero.RecordManagement.IActionItemSupervisorAssignment assignment, Sungero.RecordManagement.Server.ActionItemSupervisorAssignmentArguments e)
 {
     // Переписка.
     _obj.ReportNote = assignment.ActiveText;
 }
Exemple #3
0
        public virtual void StartAssignment6(Sungero.RecordManagement.IActionItemSupervisorAssignment assignment, Sungero.RecordManagement.Server.ActionItemSupervisorAssignmentArguments e)
        {
            assignment.Author      = _obj.Assignee;
            assignment.ActionItem  = _obj.ActionItem;
            assignment.Importance  = _obj.Importance;
            assignment.NewDeadline = _obj.Deadline;
            assignment.AssignedBy  = _obj.AssignedBy;

            // Выдать права на изменение для возможности прекращения подзадач.
            Functions.ActionItemExecutionTask.GrantAccessRightToAssignment(assignment, _obj);
        }