Exemplo n.º 1
0
        // GET: Timesheet (filtered by LocationId)
        public async Task <IActionResult> LocationFilteredIndex(int id)
        {
            var timesheetDbContext = _context.Timesheets.Include(t => t.Client).Include(t => t.Location).Include(t => t.Staff).Where(t => t.LocationId == id);

            var indexVm = new RebootIT.TimesheetApp.ViewModels.TimeSheets.Index(
                await timesheetDbContext.ToListAsync(),
                0,
                id,
                0);

            return(View("LocationIndex", indexVm));
        }
Exemplo n.º 2
0
        // GET: Timesheet
        public async Task <IActionResult> Index()
        {
            var timesheetDbContext = _context.Timesheets.Include(t => t.Client).Include(t => t.Location).Include(t => t.Staff);

            var indexVm = new RebootIT.TimesheetApp.ViewModels.TimeSheets.Index(
                await timesheetDbContext.ToListAsync(),
                0,
                0,
                0);

            return(View("Index", indexVm));
        }