public double GetTotalExperienceDaysBasedOnSectorType(int EmployeeCodeID, SectorsTypesEnum SectorType)
        {
            List <EmployeeExperiencesWithDetails> EmployeeExperienceDetailList = new EmployeeExperiencesWithDetailsDAL().GetEmployeeExperiencesByEmployeeCodeID(EmployeeCodeID, (int)SectorType);
            int TotalDays = GetTotalDaysByEmployeeExperience(EmployeeExperienceDetailList);

            return(TotalDays);
        }
        /// <summary>
        /// TASK # 268
        /// This function calculate the total experience in Years, Months and Days
        /// </summary>
        /// <param name="EmployeeCodeID"></param>
        /// <param name="year"></param>
        /// <param name="month"></param>
        /// <param name="days"></param>
        public void GetTotalEmployeeExperienceInYMD(int EmployeeCodeID, out int year, out int month, out int days)
        {
            List <EmployeeExperiencesWithDetails> EmployeeExperienceDetailList = new EmployeeExperiencesWithDetailsDAL().GetEmployeeExperiencesByEmployeeCodeID(EmployeeCodeID);
            int TotalDays = this.GetTotalDaysByEmployeeExperience(EmployeeExperienceDetailList);

            year = month = days = 0;

            year  = Convert.ToInt32(Math.Floor(Convert.ToDecimal(TotalDays) / this.DaysCountInGregYear));
            month = Convert.ToInt32(Math.Floor((Convert.ToDecimal(TotalDays) % this.DaysCountInGregYear) / this.DaysCountInGregMonth));
            days  = Convert.ToInt32(Math.Floor((Convert.ToDecimal(TotalDays) % this.DaysCountInGregYear) % this.DaysCountInGregMonth));
        }
        //public int GetTotalDaysByEmployeeExperience(EmployeeExperiencesWithDetailsBLL EmployeesExperience)
        //{
        //    int TotalExperience = 0;
        //    decimal totExpWithDecimals = 0;
        //    //EmployeesExperiences EmployeesExperience = new EmployeesExperiencesDAL().GetEmployeeExperiencesByEmployeeCodeID(EmployeeCodeID).FirstOrDefault();

        //    if (EmployeesExperience != null && EmployeesExperience.EmployeeExperienceID > 0)
        //    {
        //        totExpWithDecimals = Convert.ToDecimal((EmployeesExperience.TotalYears * DaysCountInUmAlquraYear)) + (EmployeesExperience.TotalMonths * DaysCountInUmAlquraMonth) + Convert.ToDecimal(EmployeesExperience.TotalDays);
        //        TotalExperience = Convert.ToInt32(Math.Floor(totExpWithDecimals));
        //    }

        //    return TotalExperience;
        //}

        public virtual EmployeeExperiencesWithDetailsBLL GetByEmployeesExperiencesWithDetailID(int EmployeesExperiencesWithDetailID)
        {
            try
            {
                EmployeeExperiencesWithDetails EmployeeExperience = new EmployeeExperiencesWithDetailsDAL().GetByEmployeeExperienceWithDetailID(EmployeesExperiencesWithDetailID);
                return(new EmployeeExperiencesWithDetailsBLL().MapEmployeeExperienceWithDetail(EmployeeExperience));
            }
            catch
            {
                throw;
            }
        }
 public virtual List <EmployeeExperiencesWithDetailsBLL> GetEmployeesExperiencesWithDetailByEmployeeCodeID(int EmployeeCodeID)
 {
     try
     {
         List <EmployeeExperiencesWithDetails>    EmployeesExperiencesWithDetailsList        = new EmployeeExperiencesWithDetailsDAL().GetEmployeeExperiencesByEmployeeCodeID(EmployeeCodeID);
         List <EmployeeExperiencesWithDetailsBLL> EmployeesExperiencesWithDetailsListBLLList = new List <EmployeeExperiencesWithDetailsBLL>();
         foreach (var item in EmployeesExperiencesWithDetailsList)
         {
             EmployeesExperiencesWithDetailsListBLLList.Add(new EmployeeExperiencesWithDetailsBLL().MapEmployeeExperienceWithDetail(item));
         }
         return(EmployeesExperiencesWithDetailsListBLLList);
     }
     catch
     {
         throw;
     }
 }