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 BaseScholarshipsBLL GetByScholarshipID(int ScholarshipID) { try { Scholarships Scholarship = new ScholarshipsDAL().GetByScholarshipID(ScholarshipID); return(new BaseScholarshipsBLL().MapScholarship(Scholarship)); } catch { throw; } }
public virtual List <BaseScholarshipsBLL> GetScholarshipByEmployeeCodeID(int EmployeeCodeID) { try { List <BaseScholarshipsBLL> BaseScholarshipsBLLList = new List <BaseScholarshipsBLL>(); List <Scholarships> ScholarshipsList = new ScholarshipsDAL().GetScholarshipsByEmployeeCodeID(EmployeeCodeID).ToList(); foreach (var Scholarship in ScholarshipsList) { BaseScholarshipsBLLList.Add(this.MapScholarship(Scholarship)); } return(BaseScholarshipsBLLList.OrderBy(x => x.ScholarshipStartDate).ToList()); } catch { throw; } }
public virtual List <BaseScholarshipsBLL> GetScholarships() { List <BaseScholarshipsBLL> ScholarshipBLLList = new List <BaseScholarshipsBLL>(); List <Scholarships> Scholarships = new ScholarshipsDAL().GetScholarships(); foreach (var item in Scholarships) { BaseScholarshipsBLL ScholarshipBLL = null; switch (item.ScholarshipTypeID) { case (Int32)ScholarshipsTypesEnum.Internal: ScholarshipBLL = new InternalScholarshipsBLL() { Location = item.Location, KSACity = new KSACitiesBLL().MapKSACity(item.KSACities), }; break; case (Int32)ScholarshipsTypesEnum.External: ScholarshipBLL = new ExternalScholarshipsBLL() { Country = new CountriesBLL().MapCountry(item.Countries), }; break; default: break; } ScholarshipBLL.ScholarshipID = item.ScholarshipID; ScholarshipBLL.ScholarshipStartDate = item.ScholarshipStartDate; ScholarshipBLL.ScholarshipEndDate = item.ScholarshipEndDate; ScholarshipBLL.ScholarshipTypeEnum = (ScholarshipsTypesEnum)item.ScholarshipTypeID;//new ScholarshipsTypesBLL().MapScholarshipType(item.ScholarshipsTypes); ScholarshipBLL.ScholarshipType = new ScholarshipsTypesBLL().MapScholarshipType(item.ScholarshipsTypes); ScholarshipBLL.Employee = new EmployeesCodesBLL().MapEmployeeCode(item.EmployeesCodes); ScholarshipBLL.Qualification = new QualificationsBLL().MapQualification(item.Qualifications); ScholarshipBLL.ScholarshipReason = item.ScholarshipReason; ScholarshipBLL.ScholarshipJoinDate = item.ScholarshipJoinDate; ScholarshipBLL.IsPassed = item.IsPassed; ScholarshipBLL.CreatedDate = item.CreatedDate; ScholarshipBLLList.Add(ScholarshipBLL); } return(ScholarshipBLLList); }