/// <summary>
        /// Method Name     : GetResignationDetails
        /// Author          : Divya Patel
        /// Creation Date   : 18 oct 2019
        /// Purpose         : Acess the Method from DAL Layer to BLL.
        /// </summary>
        /// <param name="resignationId">ResignationId</param>
        /// <returns>List of ResignationEmployeeDetails</returns>
        public EmployeeDetailViewModel GetResignationDetails(int resignationId)
        {
            var resignationDetails = _approvalResignationDAL.GetResignationDetails(resignationId, _claims.UserId);

            if (resignationDetails != null)
            {
                resignationDetails.ProposedNoticePeriod  = _calculations.CalculateProposedNoticePeriod(resignationDetails.ProposedRelievingDate, resignationDetails.RaisedOnDate);
                resignationDetails.ApprovedNoticePeriod  = _calculations.CalculateApprovedNoticePeriod(resignationDetails.ApprovedRelievingDate, resignationDetails.RaisedOnDate);
                resignationDetails.ApprovedRelievingDate = _calculations.CalculateApprovedRelieveningDate(resignationDetails.ProposedRelievingDate, resignationDetails.OnBoardingNoticePeriod);
            }
            return(resignationDetails);
        }
        /// <summary>
        /// Method Name   : GetResignationList
        /// Author        : Yaseen Agwan
        /// Creation Date : 17 October 2019
        /// Purpose       : To get resignation details of particular employee.
        /// </summary>
        /// <returns></returns>
        public List <EmployeeResignationViewModel> GetResignationList()
        {
            var resignationDetails = _employeeResignation.GetResignationList(_employeeResignation.GetEmployeeId(_claims.UserId));

            foreach (var items in resignationDetails)
            {
                items.ProposedNoticePeriod = _calculations.CalculateProposedNoticePeriod(items.ResignationProposedDate, items.RaisedOnDate);
                items.ApprovedNoticePeriod = _calculations.CalculateApprovedNoticePeriod(items.ResignationApprovedDate, items.RaisedOnDate);
                if (_calculations.IsRevoked(items))
                {
                    items.IsApprovedByHr = false;
                    items.IsApprovedByRm = false;
                }
                else
                {
                    items.IsApprovedByHr = _calculations.IsApprovedByHr(items);
                    items.IsApprovedByRm = _calculations.IsApprovedByRm(items);
                }
            }

            return(resignationDetails);
        }