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 leaveType) { this.currentApproveStep = leaveType.CreateApproveSequence(this.employee); }
public void SetLeaveType(LeaveType type) { this.leaveType = type; //change 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"); }