Example #1
0
        public async Task <ActionResult> Details(int id)
        {
            try
            {
                var task = await taskListRepository.findTask(id);


                TempData["assistant1"] = Convert.ToString(task.Assistant1);

                TempData["assistant2"] = Convert.ToString(task.Assistant2);

                TempData["assistant3"] = Convert.ToString(task.Assistant3);

                TempData["id"] = task.ID;


                //Get info if there are assistants checked from before
                await taskListRepository.getAssistant1Info(id);

                await taskListRepository.getAssistant2Info(id);

                await taskListRepository.getAssistant3Info(id);

                ViewData["assistant1"] = await taskListRepository.assistant1();

                ViewData["assistant2"] = await taskListRepository.assistant2();

                ViewData["assistant3"] = await taskListRepository.assistant3();

                return(View(await taskListRepository.findTask(id)));
            }
            catch (Exception)
            {
                throw;
            }
        }