From 8632f544b568952ded8365b5409161f5cb471fa5 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 7 Dec 2018 16:27:10 +0000 Subject: [PATCH] not pertinent --- Yavsc/Controllers/PeriodController.cs | 121 -------------------------- Yavsc/Views/Period/Create.cshtml | 25 ------ Yavsc/Views/Period/Delete.cshtml | 22 ----- Yavsc/Views/Period/Details.cshtml | 18 ---- Yavsc/Views/Period/Edit.cshtml | 27 ------ Yavsc/Views/Period/Index.cshtml | 26 ------ 6 files changed, 239 deletions(-) delete mode 100644 Yavsc/Controllers/PeriodController.cs delete mode 100644 Yavsc/Views/Period/Create.cshtml delete mode 100644 Yavsc/Views/Period/Delete.cshtml delete mode 100644 Yavsc/Views/Period/Details.cshtml delete mode 100644 Yavsc/Views/Period/Edit.cshtml delete mode 100644 Yavsc/Views/Period/Index.cshtml diff --git a/Yavsc/Controllers/PeriodController.cs b/Yavsc/Controllers/PeriodController.cs deleted file mode 100644 index aedf5406..00000000 --- a/Yavsc/Controllers/PeriodController.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.AspNet.Mvc; -using Microsoft.Data.Entity; -using Yavsc.Models; -using Yavsc.Models.Calendar; -using System; - -namespace Yavsc.Controllers -{ - public class PeriodController : Controller - { - private ApplicationDbContext _context; - - public PeriodController(ApplicationDbContext context) - { - _context = context; - } - - // GET: Period - public async Task Index() - { - return View(await _context.Period.ToListAsync()); - } - - // GET: Period/Details/5 - public async Task Details(DateTime id) - { - if (id == null) - { - return HttpNotFound(); - } - - Period period = await _context.Period.SingleAsync(m => m.Start == id); - if (period == null) - { - return HttpNotFound(); - } - - return View(period); - } - - // GET: Period/Create - public IActionResult Create() - { - return View(); - } - - // POST: Period/Create - [HttpPost] - [ValidateAntiForgeryToken] - public async Task Create(Period period) - { - if (ModelState.IsValid) - { - _context.Period.Add(period); - await _context.SaveChangesAsync(); - return RedirectToAction("Index"); - } - return View(period); - } - - // GET: Period/Edit/5 - public async Task Edit(DateTime id) - { - if (id == null) - { - return HttpNotFound(); - } - - Period period = await _context.Period.SingleAsync(m => m.Start == id); - if (period == null) - { - return HttpNotFound(); - } - return View(period); - } - - // POST: Period/Edit/5 - [HttpPost] - [ValidateAntiForgeryToken] - public async Task Edit(Period period) - { - if (ModelState.IsValid) - { - _context.Update(period); - await _context.SaveChangesAsync(); - return RedirectToAction("Index"); - } - return View(period); - } - - // GET: Period/Delete/5 - [ActionName("Delete")] - public async Task Delete(DateTime id) - { - if (id == null) - { - return HttpNotFound(); - } - - Period period = await _context.Period.SingleAsync(m => m.Start == id); - if (period == null) - { - return HttpNotFound(); - } - - return View(period); - } - - // POST: Period/Delete/5 - [HttpPost, ActionName("Delete")] - [ValidateAntiForgeryToken] - public async Task DeleteConfirmed(DateTime id) - { - Period period = await _context.Period.SingleAsync(m => m.Start == id); - _context.Period.Remove(period); - await _context.SaveChangesAsync(); - return RedirectToAction("Index"); - } - } -} diff --git a/Yavsc/Views/Period/Create.cshtml b/Yavsc/Views/Period/Create.cshtml deleted file mode 100644 index 8516c6f9..00000000 --- a/Yavsc/Views/Period/Create.cshtml +++ /dev/null @@ -1,25 +0,0 @@ -@model Yavsc.Models.Calendar.Period - -@{ - ViewData["Title"] = "Create"; -} - -

Create

- -
-
-

Period

-
-
-
-
- -
-
-
-
- - - diff --git a/Yavsc/Views/Period/Delete.cshtml b/Yavsc/Views/Period/Delete.cshtml deleted file mode 100644 index d4d6cb21..00000000 --- a/Yavsc/Views/Period/Delete.cshtml +++ /dev/null @@ -1,22 +0,0 @@ -@model Yavsc.Models.Calendar.Period - -@{ - ViewData["Title"] = "Delete"; -} - -

Delete

- -

Are you sure you want to delete this?

-
-

Period

-
-
-
- -
-
- | - Back to List -
-
-
diff --git a/Yavsc/Views/Period/Details.cshtml b/Yavsc/Views/Period/Details.cshtml deleted file mode 100644 index 4645a84b..00000000 --- a/Yavsc/Views/Period/Details.cshtml +++ /dev/null @@ -1,18 +0,0 @@ -@model Yavsc.Models.Calendar.Period - -@{ - ViewData["Title"] = "Details"; -} - -

Details

- -
-

Period

-
-
-
-
-

- @Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) | - Back to List -

diff --git a/Yavsc/Views/Period/Edit.cshtml b/Yavsc/Views/Period/Edit.cshtml deleted file mode 100644 index 4a7ef38f..00000000 --- a/Yavsc/Views/Period/Edit.cshtml +++ /dev/null @@ -1,27 +0,0 @@ -@model Yavsc.Models.Calendar.Period - -@{ - ViewData["Title"] = "Edit"; -} - -

Edit

- -
-
-

Period

-
-
- - -
-
- -
-
-
-
- - - diff --git a/Yavsc/Views/Period/Index.cshtml b/Yavsc/Views/Period/Index.cshtml deleted file mode 100644 index 8a3c658f..00000000 --- a/Yavsc/Views/Period/Index.cshtml +++ /dev/null @@ -1,26 +0,0 @@ -@model IEnumerable - -@{ - ViewData["Title"] = "Index"; -} - -

Index

- -

- Create New -

- - - - - -@foreach (var item in Model) { - - - -} -
- @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ }) -