un positionnement de paramètre workflow des pros
This commit is contained in:
parent
fbd352e788
commit
96746fcc0b
322 changed files with 25893 additions and 3844 deletions
119
Yavsc/Controllers/LocationTypesController.cs
Normal file
119
Yavsc/Controllers/LocationTypesController.cs
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
using System.Linq;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
using Models;
|
||||
using Models.Relationship;
|
||||
public class LocationTypesController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public LocationTypesController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: LocationTypes
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View(_context.LocationType.ToList());
|
||||
}
|
||||
|
||||
// GET: LocationTypes/Details/5
|
||||
public IActionResult Details(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
LocationType locationType = _context.LocationType.Single(m => m.Id == id);
|
||||
if (locationType == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(locationType);
|
||||
}
|
||||
|
||||
// GET: LocationTypes/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: LocationTypes/Create
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Create(LocationType locationType)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.LocationType.Add(locationType);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
return View(locationType);
|
||||
}
|
||||
|
||||
// GET: LocationTypes/Edit/5
|
||||
public IActionResult Edit(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
LocationType locationType = _context.LocationType.Single(m => m.Id == id);
|
||||
if (locationType == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
return View(locationType);
|
||||
}
|
||||
|
||||
// POST: LocationTypes/Edit/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Edit(LocationType locationType)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Update(locationType);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
return View(locationType);
|
||||
}
|
||||
|
||||
// GET: LocationTypes/Delete/5
|
||||
[ActionName("Delete")]
|
||||
public IActionResult Delete(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
LocationType locationType = _context.LocationType.Single(m => m.Id == id);
|
||||
if (locationType == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(locationType);
|
||||
}
|
||||
|
||||
// POST: LocationTypes/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult DeleteConfirmed(long id)
|
||||
{
|
||||
LocationType locationType = _context.LocationType.Single(m => m.Id == id);
|
||||
_context.LocationType.Remove(locationType);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue