// GET: Groups/Edit/5
        public IActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(HttpNotFound());
            }

            ProjectAndFolderAndGroup projectAndFolderAndGroup = new ProjectAndFolderAndGroup();

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

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

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

            ViewBag.TestRunnerGroups = new SelectList(_context.TestRunnerGroup, "TestRunnerGroupID", "Name").ToList();

            ViewBag.Folders = new SelectList(_context.Folder, "FolderID", "Name", projectAndFolderAndGroup.Group.FolderID);

            return(View(projectAndFolderAndGroup));
        }
Example #2
0
        // GET: Folders/Details/5
        public IActionResult Details(int?id)
        {
            if (id == null)
            {
                return(HttpNotFound());
            }

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

            ProjectAndFolderAndGroup projectAndFolderAndGroup = new ProjectAndFolderAndGroup();

            projectAndFolderAndGroup.Folder = _context.Folder.Single(m => m.FolderID == id);
            if (projectAndFolderAndGroup.Folder == null)
            {
                return(HttpNotFound());
            }

            projectAndFolderAndGroup.Folder.TestRunnerGroup =
                _context.TestRunnerGroup.SingleOrDefault(t => t.TestRunnerGroupID == projectAndFolderAndGroup.Folder.TestRunnerGroupID);

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

            projectAndFolderAndGroup.Group  = new Group();
            projectAndFolderAndGroup.Groups = _context.Group.Where(l => l.FolderID == id);

            return(View(projectAndFolderAndGroup));
        }
        public IActionResult Delete(int? id)
        {
            if (id == null)
            {
                return HttpNotFound();
            }

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

            int intFolderID = projectAndFolderAndGroup.Group.FolderID;
            projectAndFolderAndGroup.Folder = _context.Folder.Single(m => m.FolderID == intFolderID);

            return View(projectAndFolderAndGroup);
        }
        public IActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(HttpNotFound());
            }

            ProjectAndFolderAndGroup projectAndFolderAndGroup = new ProjectAndFolderAndGroup();

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

            int intFolderID = projectAndFolderAndGroup.Group.FolderID;

            projectAndFolderAndGroup.Folder = _context.Folder.Single(m => m.FolderID == intFolderID);

            return(View(projectAndFolderAndGroup));
        }
        // GET: Groups/Edit/5
        public IActionResult Edit(int? id)
        {
            if (id == null)
            {
                return HttpNotFound();
            }

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

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

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

            ViewBag.TestRunnerGroups = new SelectList(_context.TestRunnerGroup, "TestRunnerGroupID", "Name").ToList();

            ViewBag.Folders = new SelectList(_context.Folder, "FolderID", "Name", projectAndFolderAndGroup.Group.FolderID);

            return View(projectAndFolderAndGroup);
        }
        // GET: Folders/Details/5
        public IActionResult Details(int? id)
        {
            if (id == null)
            {
                return HttpNotFound();
            }

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

            ProjectAndFolderAndGroup projectAndFolderAndGroup = new ProjectAndFolderAndGroup();
            projectAndFolderAndGroup.Folder = _context.Folder.Single(m => m.FolderID == id);
            if (projectAndFolderAndGroup.Folder == null)
            {
                return HttpNotFound();
            }

            projectAndFolderAndGroup.Folder.TestRunnerGroup =
                _context.TestRunnerGroup.SingleOrDefault(t => t.TestRunnerGroupID == projectAndFolderAndGroup.Folder.TestRunnerGroupID);

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

            projectAndFolderAndGroup.Group = new Group();
            projectAndFolderAndGroup.Groups = _context.Group.Where(l => l.FolderID == id);

            return View(projectAndFolderAndGroup);
        }