diff --git a/.vs/GerenciaProjetos/v15/.suo b/.vs/GerenciaProjetos/v15/.suo
index c7ff0e5..e5c3cb9 100644
Binary files a/.vs/GerenciaProjetos/v15/.suo and b/.vs/GerenciaProjetos/v15/.suo differ
diff --git a/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide b/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide
index d768466..198bdeb 100644
Binary files a/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide and b/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide differ
diff --git a/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide-shm b/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide-shm
index aabae24..f6e3d5d 100644
Binary files a/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide-shm and b/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide-shm differ
diff --git a/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide-wal b/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide-wal
index 0512f8e..a8bd619 100644
Binary files a/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide-wal and b/.vs/GerenciaProjetos/v15/Server/sqlite3/storage.ide-wal differ
diff --git a/GerenciaProjetos/Controllers/BugsController.cs b/GerenciaProjetos/Controllers/BugsController.cs
new file mode 100644
index 0000000..8e63293
--- /dev/null
+++ b/GerenciaProjetos/Controllers/BugsController.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using GerenciaProjetos.Models;
+using GerenciaContext = GerenciaProjetos.Data.GerenciaContext;
+
+namespace GerenciaProjetos.Controllers
+{
+ public class BugsController : Controller
+ {
+ private GerenciaContext ctx;
+
+ public BugsController(GerenciaContext ctx)
+ {
+ this.ctx = ctx;
+
+ Desenvolvedor dev = ctx.Desenvolvedores.Find(1);
+ }
+
+ public IActionResult Index()
+ {
+ return View();
+ }
+ }
+}
\ No newline at end of file
diff --git a/GerenciaProjetos/Controllers/DesenvolvedorController.cs b/GerenciaProjetos/Controllers/DesenvolvedorController.cs
new file mode 100644
index 0000000..6205c68
--- /dev/null
+++ b/GerenciaProjetos/Controllers/DesenvolvedorController.cs
@@ -0,0 +1,95 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using GerenciaProjetos.Models;
+using GerenciaContext = GerenciaProjetos.Data.GerenciaContext;
+
+namespace GerenciaProjetos.Controllers
+{
+ public class DesenvolvedorController : Controller
+ {
+ private GerenciaContext ctx;
+
+ public DesenvolvedorController(GerenciaContext ctx)
+ {
+ this.ctx = ctx;
+
+ Desenvolvedor dev = ctx.Desenvolvedores.Find(1);
+ }
+
+ public IActionResult Index()
+ {
+ ViewBag.Desenvolvedores = ctx.Desenvolvedores;
+
+ return View();
+ }
+
+ public IActionResult New()
+ {
+ return View("Form");
+ }
+
+ [HttpPost]
+ public IActionResult New(Desenvolvedor dev)
+ {
+ if (ModelState.IsValid)
+ {
+ ctx.Desenvolvedores.Add(dev);
+ ctx.SaveChanges();
+
+ return RedirectToAction("Index", "Home");
+ }
+ else
+ {
+ return View("Form", dev);
+ }
+ }
+
+ public IActionResult Edit(int id)
+ {
+ Desenvolvedor dev = ctx.Desenvolvedores.Find(id);
+
+ if (dev != null)
+ {
+ return View("Form", dev);
+ }
+ else
+ {
+ return RedirectToAction("Index", "Home");
+ }
+ }
+
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public IActionResult Edit(Desenvolvedor dev)
+ {
+ if (ModelState.IsValid)
+ {
+ ctx.Desenvolvedores.Update(dev);
+ ctx.SaveChanges();
+
+ return RedirectToAction("Index", "Home");
+ }
+ else
+ {
+ return View("Form", dev);
+ }
+ }
+
+ public IActionResult Del(int id)
+ {
+ Desenvolvedor dev = ctx.Desenvolvedores.Find(id);
+
+ if (dev != null)
+ {
+ ctx.Desenvolvedores.Remove(dev);
+ ctx.SaveChanges();
+ }
+
+ return RedirectToAction("Index", "Home");
+ }
+ }
+}
\ No newline at end of file
diff --git a/GerenciaProjetos/Controllers/HomeController.cs b/GerenciaProjetos/Controllers/HomeController.cs
index 6fec36d..28aeb65 100644
--- a/GerenciaProjetos/Controllers/HomeController.cs
+++ b/GerenciaProjetos/Controllers/HomeController.cs
@@ -13,7 +13,6 @@ namespace GerenciaProjetos.Controllers
{
private GerenciaContext ctx;
-
public HomeController(GerenciaContext ctx)
{
this.ctx = ctx;
@@ -24,7 +23,8 @@ namespace GerenciaProjetos.Controllers
public IActionResult Index()
{
ViewBag.Desenvolvedores = ctx.Desenvolvedores;
-
+ ViewBag.Projetos = ctx.Projetos;
+
return View();
}
@@ -32,74 +32,7 @@ namespace GerenciaProjetos.Controllers
{
return View();
}
-
- /* DESENVOLVEDOR */
-
- public IActionResult AddDev()
- {
- return View();
- }
-
- [HttpPost]
- public IActionResult AddDev(Desenvolvedor dev)
- {
- if (ModelState.IsValid)
- {
- ctx.Desenvolvedores.Add(dev);
- ctx.SaveChanges();
-
- return RedirectToAction("Index", "Home");
- }
- else
- {
- return View("AddDev", dev);
- }
- }
-
- public IActionResult EditDev(int id)
- {
- Desenvolvedor dev = ctx.Desenvolvedores.Find(id);
-
- if (dev != null)
- {
- return View("AddDev", dev);
- }
- else
- {
- return RedirectToAction("Index", "Home");
- }
- }
-
- [HttpPost]
- [ValidateAntiForgeryToken]
- public IActionResult EditDev(Desenvolvedor dev)
- {
- if (ModelState.IsValid)
- {
- ctx.Desenvolvedores.Update(dev);
- ctx.SaveChanges();
-
- return RedirectToAction("Index", "Home");
- }
- else
- {
- return View("AddDev", dev);
- }
- }
-
- public IActionResult DelDev(int id)
- {
- Desenvolvedor dev = ctx.Desenvolvedores.Find(id);
-
- if (dev != null)
- {
- ctx.Desenvolvedores.Remove(dev);
- ctx.SaveChanges();
- }
-
- return RedirectToAction("Index", "Home");
- }
-
+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
diff --git a/GerenciaProjetos/Controllers/ProjetosController.cs b/GerenciaProjetos/Controllers/ProjetosController.cs
new file mode 100644
index 0000000..60cfb46
--- /dev/null
+++ b/GerenciaProjetos/Controllers/ProjetosController.cs
@@ -0,0 +1,95 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using GerenciaProjetos.Models;
+using GerenciaContext = GerenciaProjetos.Data.GerenciaContext;
+
+namespace GerenciaProjetos.Controllers
+{
+ public class ProjetosController : Controller
+ {
+ private GerenciaContext ctx;
+
+ public ProjetosController(GerenciaContext ctx)
+ {
+ this.ctx = ctx;
+
+ Desenvolvedor dev = ctx.Desenvolvedores.Find(1);
+ }
+
+ public IActionResult Index()
+ {
+ ViewBag.Projetos = ctx.Projetos;
+
+ return View();
+ }
+
+ public IActionResult New()
+ {
+ return View("Form");
+ }
+
+ [HttpPost]
+ public IActionResult New(Projeto proj)
+ {
+ if (ModelState.IsValid)
+ {
+ ctx.Projetos.Add(proj);
+ ctx.SaveChanges();
+
+ return RedirectToAction("Index", "Home");
+ }
+ else
+ {
+ return View("Form", proj);
+ }
+ }
+
+ public IActionResult Edit(int id)
+ {
+ Projeto proj = ctx.Projetos.Find(id);
+
+ if (proj != null)
+ {
+ return View("Form", proj);
+ }
+ else
+ {
+ return RedirectToAction("Index", "Home");
+ }
+ }
+
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public IActionResult Edit(Projeto proj)
+ {
+ if (ModelState.IsValid)
+ {
+ ctx.Projetos.Update(proj);
+ ctx.SaveChanges();
+
+ return RedirectToAction("Index", "Home");
+ }
+ else
+ {
+ return View("Form", proj);
+ }
+ }
+
+ public IActionResult Del(int id)
+ {
+ Projeto proj = ctx.Projetos.Find(id);
+
+ if (proj != null)
+ {
+ ctx.Projetos.Remove(proj);
+ ctx.SaveChanges();
+ }
+
+ return RedirectToAction("Index", "Home");
+ }
+ }
+}
\ No newline at end of file
diff --git a/GerenciaProjetos/Controllers/RequisitosController.cs b/GerenciaProjetos/Controllers/RequisitosController.cs
new file mode 100644
index 0000000..1ed3c7a
--- /dev/null
+++ b/GerenciaProjetos/Controllers/RequisitosController.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using GerenciaProjetos.Models;
+using GerenciaContext = GerenciaProjetos.Data.GerenciaContext;
+
+namespace GerenciaProjetos.Controllers
+{
+ public class RequisitosController : Controller
+ {
+ private GerenciaContext ctx;
+
+ public RequisitosController(GerenciaContext ctx)
+ {
+ this.ctx = ctx;
+
+ Desenvolvedor dev = ctx.Desenvolvedores.Find(1);
+ }
+
+ public IActionResult Index()
+ {
+ return View();
+ }
+ }
+}
\ No newline at end of file
diff --git a/GerenciaProjetos/GerenciaProjetos.csproj b/GerenciaProjetos/GerenciaProjetos.csproj
index 954a80f..c3b8f79 100644
--- a/GerenciaProjetos/GerenciaProjetos.csproj
+++ b/GerenciaProjetos/GerenciaProjetos.csproj
@@ -10,6 +10,7 @@
Subtitulo.
+ +Subtitulo.
+ +Manage your account settings, and set up social network integration.
+Subtitulo.
Subtitulo.
+ +Subtitulo.
+ +