Beispiel #1
0
        public Approver CreateChainOfApprovers(List <Approver> approvers)
        {
            var      configValues = relationshipConfig.Values;
            Approver mainApprover = approvers.First(el => !configValues.Contains(el.Id, StringComparer.InvariantCultureIgnoreCase));

            foreach (var approver in approvers)
            {
                if (relationshipConfig.TryGetValue(approver.Id, out string currentApproverId))
                {
                    var activeApprover = approvers.First(el => el.Id == currentApproverId);
                    if (activeApprover != null)
                    {
                        approver.SetSuccessor(activeApprover);
                    }
                }
            }

            return(mainApprover);
        }
 public virtual void setNext(Approver approver)
 {
     Next = approver;
 }
Beispiel #3
0
 public void SetSuccessor(Approver successor)
 {
     this.successor = successor;
 }
Beispiel #4
0
 public void SetSupervisor(Approver supervisor)
 {
     this.Supervisor = supervisor;
 }
Beispiel #5
0
 public void SetNetOnCommand(Approver nextOnCommand) => NextOnCommand = nextOnCommand;
Beispiel #6
0
 public void SetSuccessor(Approver approver)
 {
     this.successor = approver;
 }
 public void SetNextApprover(Approver nextApprover)
 {
     this.NextApprover = nextApprover;
 }
Beispiel #8
0
 public void SetSuccessor(Approver successor)
 {
     this.successor = successor;
 }