diff --git a/Yavsc/Controllers/DjSettingsController.cs b/Yavsc/Controllers/DjSettingsController.cs new file mode 100644 index 00000000..7053efcc --- /dev/null +++ b/Yavsc/Controllers/DjSettingsController.cs @@ -0,0 +1,122 @@ +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNet.Mvc; +using Microsoft.AspNet.Mvc.Rendering; +using Microsoft.Data.Entity; +using Yavsc.Models; +using Yavsc.Models.Musical.Profiles; + +namespace Yavsc.Controllers +{ + public class DjSettingsController : Controller + { + private ApplicationDbContext _context; + + public DjSettingsController(ApplicationDbContext context) + { + _context = context; + } + + // GET: DjSettings + public async Task Index() + { + return View(await _context.DjSettings.ToListAsync()); + } + + // GET: DjSettings/Details/5 + public async Task Details(string id) + { + if (id == null) + { + return HttpNotFound(); + } + + DjSettings djSettings = await _context.DjSettings.SingleAsync(m => m.UserId == id); + if (djSettings == null) + { + return HttpNotFound(); + } + + return View(djSettings); + } + + // GET: DjSettings/Create + public IActionResult Create() + { + return View(); + } + + // POST: DjSettings/Create + [HttpPost] + [ValidateAntiForgeryToken] + public async Task Create(DjSettings djSettings) + { + if (ModelState.IsValid) + { + _context.DjSettings.Add(djSettings); + await _context.SaveChangesAsync(); + return RedirectToAction("Index"); + } + return View(djSettings); + } + + // GET: DjSettings/Edit/5 + public async Task Edit(string id) + { + if (id == null) + { + return HttpNotFound(); + } + + DjSettings djSettings = await _context.DjSettings.SingleAsync(m => m.UserId == id); + if (djSettings == null) + { + return HttpNotFound(); + } + return View(djSettings); + } + + // POST: DjSettings/Edit/5 + [HttpPost] + [ValidateAntiForgeryToken] + public async Task Edit(DjSettings djSettings) + { + if (ModelState.IsValid) + { + _context.Update(djSettings); + await _context.SaveChangesAsync(); + return RedirectToAction("Index"); + } + return View(djSettings); + } + + // GET: DjSettings/Delete/5 + [ActionName("Delete")] + public async Task Delete(string id) + { + if (id == null) + { + return HttpNotFound(); + } + + DjSettings djSettings = await _context.DjSettings.SingleAsync(m => m.UserId == id); + if (djSettings == null) + { + return HttpNotFound(); + } + + return View(djSettings); + } + + // POST: DjSettings/Delete/5 + [HttpPost, ActionName("Delete")] + [ValidateAntiForgeryToken] + public async Task DeleteConfirmed(string id) + { + DjSettings djSettings = await _context.DjSettings.SingleAsync(m => m.UserId == id); + _context.DjSettings.Remove(djSettings); + await _context.SaveChangesAsync(); + return RedirectToAction("Index"); + } + } +} diff --git a/Yavsc/Controllers/GeneralSettingsController.cs b/Yavsc/Controllers/GeneralSettingsController.cs new file mode 100644 index 00000000..2cfe8743 --- /dev/null +++ b/Yavsc/Controllers/GeneralSettingsController.cs @@ -0,0 +1,122 @@ +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNet.Mvc; +using Microsoft.AspNet.Mvc.Rendering; +using Microsoft.Data.Entity; +using Yavsc.Models; +using Yavsc.Models.Musical.Profiles; + +namespace Yavsc.Controllers +{ + public class GeneralSettingsController : Controller + { + private ApplicationDbContext _context; + + public GeneralSettingsController(ApplicationDbContext context) + { + _context = context; + } + + // GET: GeneralSettings + public async Task Index() + { + return View(await _context.GeneralSettings.ToListAsync()); + } + + // GET: GeneralSettings/Details/5 + public async Task Details(string id) + { + if (id == null) + { + return HttpNotFound(); + } + + GeneralSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id); + if (generalSettings == null) + { + return HttpNotFound(); + } + + return View(generalSettings); + } + + // GET: GeneralSettings/Create + public IActionResult Create() + { + return View(); + } + + // POST: GeneralSettings/Create + [HttpPost] + [ValidateAntiForgeryToken] + public async Task Create(GeneralSettings generalSettings) + { + if (ModelState.IsValid) + { + _context.GeneralSettings.Add(generalSettings); + await _context.SaveChangesAsync(); + return RedirectToAction("Index"); + } + return View(generalSettings); + } + + // GET: GeneralSettings/Edit/5 + public async Task Edit(string id) + { + if (id == null) + { + return HttpNotFound(); + } + + GeneralSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id); + if (generalSettings == null) + { + return HttpNotFound(); + } + return View(generalSettings); + } + + // POST: GeneralSettings/Edit/5 + [HttpPost] + [ValidateAntiForgeryToken] + public async Task Edit(GeneralSettings generalSettings) + { + if (ModelState.IsValid) + { + _context.Update(generalSettings); + await _context.SaveChangesAsync(); + return RedirectToAction("Index"); + } + return View(generalSettings); + } + + // GET: GeneralSettings/Delete/5 + [ActionName("Delete")] + public async Task Delete(string id) + { + if (id == null) + { + return HttpNotFound(); + } + + GeneralSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id); + if (generalSettings == null) + { + return HttpNotFound(); + } + + return View(generalSettings); + } + + // POST: GeneralSettings/Delete/5 + [HttpPost, ActionName("Delete")] + [ValidateAntiForgeryToken] + public async Task DeleteConfirmed(string id) + { + GeneralSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id); + _context.GeneralSettings.Remove(generalSettings); + await _context.SaveChangesAsync(); + return RedirectToAction("Index"); + } + } +} diff --git a/Yavsc/Views/DjSettings/Create.cshtml b/Yavsc/Views/DjSettings/Create.cshtml new file mode 100644 index 00000000..75416acd --- /dev/null +++ b/Yavsc/Views/DjSettings/Create.cshtml @@ -0,0 +1,32 @@ +@model Yavsc.Models.Musical.Profiles.DjSettings + +@{ + ViewData["Title"] = "Create"; +} + +

Create

+ +
+
+

DjSettings

+
+
+
+ +
+ + +
+
+
+
+ +
+
+
+
+ + + diff --git a/Yavsc/Views/DjSettings/Delete.cshtml b/Yavsc/Views/DjSettings/Delete.cshtml new file mode 100644 index 00000000..d4c94a6b --- /dev/null +++ b/Yavsc/Views/DjSettings/Delete.cshtml @@ -0,0 +1,28 @@ +@model Yavsc.Models.Musical.Profiles.DjSettings + +@{ + ViewData["Title"] = "Delete"; +} + +

Delete

+ +

Are you sure you want to delete this?

+
+

DjSettings

+
+
+
+ @Html.DisplayNameFor(model => model.SoundCloudId) +
+
+ @Html.DisplayFor(model => model.SoundCloudId) +
+
+ +
+
+ | + Back to List +
+
+
diff --git a/Yavsc/Views/DjSettings/Details.cshtml b/Yavsc/Views/DjSettings/Details.cshtml new file mode 100644 index 00000000..51960d13 --- /dev/null +++ b/Yavsc/Views/DjSettings/Details.cshtml @@ -0,0 +1,24 @@ +@model Yavsc.Models.Musical.Profiles.DjSettings + +@{ + ViewData["Title"] = "Details"; +} + +

Details

+ +
+

DjSettings

+
+
+
+ @Html.DisplayNameFor(model => model.SoundCloudId) +
+
+ @Html.DisplayFor(model => model.SoundCloudId) +
+
+
+

+ Edit | + Back to List +

diff --git a/Yavsc/Views/DjSettings/Edit.cshtml b/Yavsc/Views/DjSettings/Edit.cshtml new file mode 100644 index 00000000..50635eba --- /dev/null +++ b/Yavsc/Views/DjSettings/Edit.cshtml @@ -0,0 +1,33 @@ +@model Yavsc.Models.Musical.Profiles.DjSettings + +@{ + ViewData["Title"] = "Edit"; +} + +

Edit

+ +
+
+

DjSettings

+
+
+ +
+ +
+ + +
+
+
+
+ +
+
+
+
+ + + diff --git a/Yavsc/Views/DjSettings/Index.cshtml b/Yavsc/Views/DjSettings/Index.cshtml new file mode 100644 index 00000000..2f752684 --- /dev/null +++ b/Yavsc/Views/DjSettings/Index.cshtml @@ -0,0 +1,32 @@ +@model IEnumerable + +@{ + ViewData["Title"] = "Index"; +} + +

Index

+ +

+ Create New +

+ + + + + + +@foreach (var item in Model) { + + + + +} +
+ @Html.DisplayNameFor(model => model.SoundCloudId) +
+ @Html.DisplayFor(modelItem => item.SoundCloudId) + + Edit | + Details | + Delete +
diff --git a/Yavsc/Views/GeneralSettings/Delete.cshtml b/Yavsc/Views/GeneralSettings/Delete.cshtml new file mode 100644 index 00000000..d4855d22 --- /dev/null +++ b/Yavsc/Views/GeneralSettings/Delete.cshtml @@ -0,0 +1,22 @@ +@model Yavsc.Models.Musical.Profiles.GeneralSettings + +@{ + ViewData["Title"] = "Delete"; +} + +

Delete

+ +

Are you sure you want to delete this?

+
+

GeneralSettings

+
+
+
+ +
+
+ | + Back to List +
+
+
diff --git a/Yavsc/Views/GeneralSettings/Edit.cshtml b/Yavsc/Views/GeneralSettings/Edit.cshtml new file mode 100644 index 00000000..2b5557b0 --- /dev/null +++ b/Yavsc/Views/GeneralSettings/Edit.cshtml @@ -0,0 +1,26 @@ +@model Yavsc.Models.Musical.Profiles.GeneralSettings + +@{ + ViewData["Title"] = "Edit"; +} + +

Edit

+ +
+
+

GeneralSettings

+
+
+ +
+
+ +
+
+
+
+ + + diff --git a/Yavsc/Views/GeneralSettings/Index.cshtml b/Yavsc/Views/GeneralSettings/Index.cshtml new file mode 100644 index 00000000..6fe20f34 --- /dev/null +++ b/Yavsc/Views/GeneralSettings/Index.cshtml @@ -0,0 +1,25 @@ +@model Yavsc.Models.Musical.Profiles.GeneralSettings + +@{ + ViewData["Title"] = "Details"; +} + +

Details

+ +
+

GeneralSettings

+
+ @if (Model!=null) { +
+
+

+ @SR["Delete"] +

+ } + else { +

+ @SR["Aucun profile renseignĂ©"] + @SR["Renseigner ce paramĂȘtrage"] +

+ } +