예제 #1
0
        // GET: Groups/Details/5
        public IActionResult Details(int?id)
        {
            if (id == null)
            {
                return(HttpNotFound());
            }

            ViewData["Message"] = HttpContext.Session.GetString("Message");
            HttpContext.Session.Remove("Message");

            ProjectAndFolderAndGroupAndRun projectAndFolderAndGroupAndRun = new ProjectAndFolderAndGroupAndRun();

            projectAndFolderAndGroupAndRun.Group = _context.Group.Single(m => m.GroupID == id);
            if (projectAndFolderAndGroupAndRun.Group == null)
            {
                return(HttpNotFound());
            }

            projectAndFolderAndGroupAndRun.Group.TestRunnerGroup =
                _context.TestRunnerGroup.SingleOrDefault(t => t.TestRunnerGroupID == projectAndFolderAndGroupAndRun.Group.TestRunnerGroupID);

            projectAndFolderAndGroupAndRun.Folder =
                _context.Folder.Single(m => m.FolderID == projectAndFolderAndGroupAndRun.Group.FolderID);

            projectAndFolderAndGroupAndRun.Project =
                _context.Project.Single(m => m.ID == projectAndFolderAndGroupAndRun.Folder.ProjectID);

            projectAndFolderAndGroupAndRun.Run  = new Run();
            projectAndFolderAndGroupAndRun.Runs = _context.Run.Where(l => l.GroupID == id);

            return(View(projectAndFolderAndGroupAndRun));
        }
예제 #2
0
        // GET: Groups/Details/5
        public IActionResult Details(int? id)
        {
            if (id == null)
            {
                return HttpNotFound();
            }

            ViewData["Message"] = HttpContext.Session.GetString("Message");
            HttpContext.Session.Remove("Message");

            ProjectAndFolderAndGroupAndRun projectAndFolderAndGroupAndRun = new ProjectAndFolderAndGroupAndRun();
            projectAndFolderAndGroupAndRun.Group = _context.Group.Single(m => m.GroupID == id);
            if (projectAndFolderAndGroupAndRun.Group == null)
            {
                return HttpNotFound();
            }

            projectAndFolderAndGroupAndRun.Group.TestRunnerGroup =
                _context.TestRunnerGroup.SingleOrDefault(t => t.TestRunnerGroupID == projectAndFolderAndGroupAndRun.Group.TestRunnerGroupID);

            projectAndFolderAndGroupAndRun.Folder =
                _context.Folder.Single(m => m.FolderID == projectAndFolderAndGroupAndRun.Group.FolderID);

            projectAndFolderAndGroupAndRun.Project =
                _context.Project.Single(m => m.ID == projectAndFolderAndGroupAndRun.Folder.ProjectID);

            projectAndFolderAndGroupAndRun.Run = new Run();
            projectAndFolderAndGroupAndRun.Runs = _context.Run.Where(l => l.GroupID == id);

            return View(projectAndFolderAndGroupAndRun);
        }