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

            this.currentApproveStep = this.currentApproveStep.NexStep;
        }
Esempio n. 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");
        }
Esempio n. 3
0
 public void SetLeaveType(LeaveType leaveType)
 {
     this.currentApproveStep = leaveType.CreateApproveSequence(this.employee);
 }
Esempio n. 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);
 }