mirror of
https://github.com/guilhermewerner/gerencia-projetos
synced 2025-06-16 23:15:05 +00:00
Projeto Controller
This commit is contained in:
35
GerenciaProjetos/Views/Projetos/Form.cshtml
Normal file
35
GerenciaProjetos/Views/Projetos/Form.cshtml
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Novo Projeto";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
@model GerenciaProjetos.Models.Projeto
|
||||
|
||||
<h3>@ViewData["Title"]</h3>
|
||||
<p>Subtitulo.</p>
|
||||
|
||||
<section class="py-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form method="post">
|
||||
<div class="form-group">
|
||||
<label>Nome</label>
|
||||
<input type="text" class="form-control" asp-for="Nome">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Data de Entrega</label>
|
||||
<input type="date" class="form-control" asp-for="DataEntrega">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Solicitante</label>
|
||||
<input type="text" class="form-control" asp-for="Solicitante">
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<a class="btn btn-secondary" asp-area="" asp-controller="Projetos" asp-action="Index" asp-route-id="">Cancelar</a>
|
||||
<button type="submit" class="btn btn-primary">Confirmar</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
57
GerenciaProjetos/Views/Projetos/Index.cshtml
Normal file
57
GerenciaProjetos/Views/Projetos/Index.cshtml
Normal file
@ -0,0 +1,57 @@
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Projetos";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<h3>@ViewData["Title"]</h3>
|
||||
<p>Subtitulo.</p>
|
||||
|
||||
<section class="py-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
1
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="text-right">
|
||||
<a asp-area="" asp-controller="Projetos" asp-action="New">
|
||||
<i class="fas fa-plus-circle"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-borderless table-hover">
|
||||
<thead class="border-bottom">
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Nome</th>
|
||||
<th scope="col">Data de Entrega</th>
|
||||
<th scope="col">Solicitante</th>
|
||||
<th scope="col">Opções</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (Projeto p in ViewBag.Projetos)
|
||||
{
|
||||
<tr>
|
||||
<td>@p.Id</td>
|
||||
<td>@p.Nome</td>
|
||||
<td>@p.DataEntrega</td>
|
||||
<td>@p.Solicitante</td>
|
||||
<td>
|
||||
<a asp-area="" asp-controller="Projetos" asp-action="Edit" asp-route-id="@p.Id">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<a asp-area="" asp-controller="Projetos" asp-action="Del" asp-route-id="@p.Id">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
Reference in New Issue
Block a user