public virtual List <BaseScholarshipsBLL> GetValidScholarships(int EmployeeCodeID, ScholarshipsTypesEnum ScholarshipType) { //return this.GetByEmployeeCodeVacationType(EmployeeCodeID, VacationType).Where(x => x.IsCanceled == true).OrderBy(x => x.VacationStartDate).ToList(); List <BaseScholarshipsBLL> ScholarshipsBLLList = new List <BaseScholarshipsBLL>(); List <Scholarships> ScholarshipsList = new ScholarshipsDAL().GetValidByEmployeeCodeIDScholarshipTypeID(EmployeeCodeID, (int)ScholarshipType).ToList(); foreach (var Scholarship in ScholarshipsList) { ScholarshipsBLLList.Add(this.MapScholarship(Scholarship)); } return(ScholarshipsBLLList); }
public virtual List <BaseScholarshipsBLL> GetByEmployeeCodeScholarshipType(int EmployeeCodeID, ScholarshipsTypesEnum ScholarshipTypeEnum) { try { List <BaseScholarshipsBLL> BaseScholarshipsBLLList = this.GetScholarshipByEmployeeCodeID(EmployeeCodeID).Where(x => x.ScholarshipTypeEnum == ScholarshipTypeEnum).ToList(); return(BaseScholarshipsBLLList.OrderBy(x => x.ScholarshipStartDate).ToList()); } catch { throw; } }