Beispiel #1
0
        public void Escalate()
        {
            if (this.currentApproveStep.NexStep == null)
            {
                throw new Exception("Cannot Escalate");
            }

            this.currentApproveStep = this.currentApproveStep.NexStep;
        }
Beispiel #2
0
        public void Approve(Employee approver)
        {
            if (this.IsApproved)
            {
                return;
            }

            if (approver == this.currentApproveStep.Approver)
            {
                this.currentApproveStep = null;
            }

            throw new Exception("Not Allowed #YOLO");
        }
Beispiel #3
0
 public void SetLeaveType(LeaveType leaveType)
 {
     this.currentApproveStep = leaveType.CreateApproveSequence(this.employee);
 }
Beispiel #4
0
 public void SetLeaveType(LeaveType type)
 {
     this.leaveType          = type; //change
     this.currentApproveStep = leaveType.CreateApproveSequence(this.employee);
 }
 public void SetLeaveType(LeaveType leaveType)
 {
     this.currentApproveStep = leaveType.CreateApproveSequence(this.employee);
 }
        public void Escalate()
        {
            if(this.currentApproveStep.NexStep == null)
            {
                throw new Exception("Cannot Escalate");
            }

            this.currentApproveStep = this.currentApproveStep.NexStep;
        }
        public void Approve(Employee approver)
        {
            if(this.IsApproved)
            {
                return;
            }

            if(approver == this.currentApproveStep.Approver)
            {
                this.currentApproveStep = null;
            }

            throw new Exception("Not Allowed #YOLO");
        }
 public void SetLeaveType(LeaveType type)
 {
     this.leaveType = type; //change
     this.currentApproveStep = leaveType.CreateApproveSequence(this.employee);
 }