public ActionResult ExitGivenPersonnelList() { ViewBag.ExitGivenPersonnelCount = personnelManager.ListQueryable() .Include("PersonnelDegrees").Include("PersonnelPositions").Include("PersonnelTasks") .Where(x => x.ExitOfJobDatetime != null) .OrderByDescending(x => x.CreatedOnDatetime).ToList().Count(); return(View("Index", personnelManager.ListQueryable() .Include("PersonnelDegrees").Include("PersonnelPositions").Include("PersonnelTasks") .Where(x => x.ExitOfJobDatetime != null) .OrderByDescending(x => x.CreatedOnDatetime).ToList())); }
public ActionResult Index() { ViewBag.TotalPersonnel = personnelManager.ListQueryable() .Include("PersonnelDegrees").Include("PersonnelPositions").Include("PersonnelTasks") .Where(m => m.ExitOfJobDatetime == null).Count(); ViewBag.TotalPersonnelPermission = personnelPermissionRequestManager.ListQueryable() .Include("Personnels") .Include("PersonnelPermissionTips") .Include("PermissionStates") .Include("Users") .Where(x => x.PermissionEndDatetime >= DateTime.Today && x.PersonnelPermissionTipsId == 2 && x.PermissionStatesId == 2).Count(); ViewBag.TotalPersonneLReport = personnelPermissionRequestManager.ListQueryable() .Include("Personnels") .Include("PersonnelPermissionTips") .Include("PermissionStates") .Include("Users") .Where(x => x.PermissionEndDatetime >= DateTime.Today && (x.PersonnelPermissionTipsId == 1 || x.PersonnelPermissionTipsId == 3 || x.PersonnelPermissionTipsId == 4) && x.PermissionStatesId == 2).Count(); ViewBag.TotalZone = zoneManager.ListQueryable() .Include("Personnels") .Where(m => m.Personnels.ExitOfJobDatetime == null).Count(); return(View()); }
public static List <Personnels> GetPersonnelsFromCache() { var personnels = WebCache.Get("personnel-cache"); if (personnels == null) { PersonnelManager personnelManager = new PersonnelManager(); personnels = personnelManager.ListQueryable() .Include("PersonnelDegrees").Include("PersonnelPositions").Include("PersonnelTasks") .OrderByDescending(x => x.CreatedOnDatetime).ToList(); WebCache.Set("personnel-cache", personnels, 60, true); } return(personnels); }
public static int GetActivePersonnelsFromCache() { var personnels = WebCache.Get("activepersonnel-cache"); if (personnels == null) { PersonnelManager personnelManager = new PersonnelManager(); personnels = personnelManager.ListQueryable() .Include("PersonnelDegrees").Include("PersonnelPositions").Include("PersonnelTasks") .Where(x => x.ExitOfJobDatetime == null) .OrderByDescending(x => x.CreatedOnDatetime).ToList().Count(); WebCache.Set("activepersonnel-cache", personnels, 60, true); } return(personnels); }