예제 #1
0
        // Attendee details including workshop hours : Get
        public ActionResult Details(int id = 0, int p = 1, int ps = 50, string sv = "")
        {
            if (id <= 0)
            {
                return(RedirectToAction(nameof(Index)));
            }

            // Store paging info
            StorePaging(p, ps, sv);

            var model = _attendeeService.GetAttendeeWithWorkshopHours(id);

            // Ensure attendee was found by checking id > 0
            if (model.Id <= 0)
            {
                return(RedirectToAction(nameof(Index)));
            }

            return(View(model));
        }