Exemplo n.º 1
0
        // GET: Projects/Details/5
        public IActionResult Details(int?id)
        {
            if (id == null)
            {
                return(HttpNotFound());
            }

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

            ProjectAndFolder projectAndFolder = new ProjectAndFolder();

            projectAndFolder.Project = _context.Project.Single(m => m.ID == id);
            if (projectAndFolder.Project == null)
            {
                return(HttpNotFound());
            }

            projectAndFolder.Project.TestRunnerGroup =
                _context.TestRunnerGroup.SingleOrDefault(t => t.TestRunnerGroupID == projectAndFolder.Project.TestRunnerGroupID);
            projectAndFolder.Folder  = new Folder();
            projectAndFolder.Folders = _context.Folder.Where(l => l.ProjectID == id);

            return(View(projectAndFolder));
        }
Exemplo n.º 2
0
        // GET: Folders/Edit/5
        public IActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(HttpNotFound());
            }

            ProjectAndFolder projectAndFolder = new ProjectAndFolder();

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

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

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

            ViewBag.Projects = new SelectList(_context.Project, "ID", "Name", projectAndFolder.Folder.ProjectID);

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

            return(View(projectAndFolder));
        }
Exemplo n.º 3
0
        public IActionResult Delete(int? id)
        {
            if (id == null)
            {
                return HttpNotFound();
            }

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

            int intProjectID = projectAndFolder.Folder.ProjectID;
            projectAndFolder.Project = _context.Project.Single(m => m.ID == intProjectID);

            return View(projectAndFolder);
        }
Exemplo n.º 4
0
        public IActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(HttpNotFound());
            }

            ProjectAndFolder projectAndFolder = new ProjectAndFolder();

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

            int intProjectID = projectAndFolder.Folder.ProjectID;

            projectAndFolder.Project = _context.Project.Single(m => m.ID == intProjectID);

            return(View(projectAndFolder));
        }
Exemplo n.º 5
0
        // GET: Projects/Details/5
        public IActionResult Details(int? id)
        {
            if (id == null)
            {
                return HttpNotFound();
            }

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

            ProjectAndFolder projectAndFolder = new ProjectAndFolder();
            projectAndFolder.Project = _context.Project.Single(m => m.ID == id);
            if (projectAndFolder.Project == null)
            {
                return HttpNotFound();
            }

            projectAndFolder.Project.TestRunnerGroup =
                _context.TestRunnerGroup.SingleOrDefault(t => t.TestRunnerGroupID == projectAndFolder.Project.TestRunnerGroupID);
            projectAndFolder.Folder = new Folder();
            projectAndFolder.Folders = _context.Folder.Where(l => l.ProjectID == id);

            return View(projectAndFolder);
        }
Exemplo n.º 6
0
        // GET: Folders/Edit/5
        public IActionResult Edit(int? id)
        {
            if (id == null)
            {
                return HttpNotFound();
            }

            ProjectAndFolder projectAndFolder = new ProjectAndFolder();
            projectAndFolder.Folder = _context.Folder.SingleOrDefault(m => m.FolderID == id);
            if (projectAndFolder.Folder == null)
            {
                return HttpNotFound();
            }

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

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

            ViewBag.Projects = new SelectList(_context.Project, "ID", "Name", projectAndFolder.Folder.ProjectID);

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

            return View(projectAndFolder);
        }