Ejemplo n.º 1
0
        public ActionResult Index()
        {
            VMLoggedUser     vmf = Session["LoggedInUser"] as VMLoggedUser;
            VMESSPAttendence vmESSPAttendence = new VMESSPAttendence();

            vmESSPAttendence.VMDailyAttendence = new List <DailyAttendance>();
            vmESSPAttendence.DateStart         = DateTime.Today.AddDays(-7);
            vmESSPAttendence.DateEnd           = DateTime.Today.AddDays(-1);
            vmESSPAttendence.EmpID             = vmf.UserEmpID;
            Expression <Func <DailyAttendance, bool> > SpecificEntries = c => c.AttDate >= vmESSPAttendence.DateStart && c.AttDate <= vmESSPAttendence.DateEnd && c.EmpID == vmESSPAttendence.EmpID;

            vmESSPAttendence.VMDailyAttendence = DailyAttendanceService.GetIndexSpecific(SpecificEntries).OrderByDescending(aa => aa.AttDate).ToList();
            ViewBag.EmpID    = new SelectList(DDService.GetReportingToEmployees(vmf).ToList(), "PEmployeeID", "EmployeeName", vmf.UserEmpID);
            vmESSPAttendence = LoadHeaderValues(vmESSPAttendence);
            return(View(vmESSPAttendence));
        }