Esempio n. 1
0
 private List<Hre_Profile> LoadProfileStatus(List<Hre_ProfileEntity> listPro, String status, DateTime From, DateTime To)
 {
     List<Hre_Profile> lstProfile = new Hre_ProfileServices().GetWorkingProfile(listPro, From, To);
     if (status == StatusEmployee.E_WORKING.ToString())
     {
         lstProfile = lstProfile.Where(pro => (pro.DateQuit == null || pro.DateQuit > To) && pro.DateHire < From).ToList();
     }
     else if (status == StatusEmployee.E_NEWEMPLOYEE.ToString())
     {
         lstProfile = lstProfile.Where(pro => pro.DateHire < To && pro.DateHire > From).ToList();
     }
     else if (status == StatusEmployee.E_STOPWORKING.ToString())
     {
         lstProfile = lstProfile.Where(pro => pro.DateQuit < To && pro.DateQuit > From).ToList();
     }
     else if (status == StatusEmployee.E_WORKINGANDNEW.ToString())
     {
         lstProfile = lstProfile.Where(pro => pro.DateQuit == null || pro.DateQuit > To).ToList();
     }
     else
     {
         return lstProfile;
     }
     return lstProfile;
 }