|
@@ -2,6 +2,7 @@
|
|
|
using System.Web.Mvc;
|
|
using System.Web.Mvc;
|
|
|
using CD67.ModeleMVC.Entity;
|
|
using CD67.ModeleMVC.Entity;
|
|
|
using CD67.ModeleMVC.Factory;
|
|
using CD67.ModeleMVC.Factory;
|
|
|
|
|
+using CD67.ModeleMVC.MVC.Internal;
|
|
|
|
|
|
|
|
namespace CD67.ModeleMVC.MVC.Controllers
|
|
namespace CD67.ModeleMVC.MVC.Controllers
|
|
|
{
|
|
{
|
|
@@ -50,6 +51,10 @@ namespace CD67.ModeleMVC.MVC.Controllers
|
|
|
{
|
|
{
|
|
|
TYPE_VIKINGFactory typeVikingFactory = new TYPE_VIKINGFactory(db);
|
|
TYPE_VIKINGFactory typeVikingFactory = new TYPE_VIKINGFactory(db);
|
|
|
typeVikingFactory.add(ref typeViking);
|
|
typeVikingFactory.add(ref typeViking);
|
|
|
|
|
+
|
|
|
|
|
+ // Ajout d'un message flash
|
|
|
|
|
+ this.Success("Type de viking créé avec succès.");
|
|
|
|
|
+
|
|
|
return RedirectToAction("Index");
|
|
return RedirectToAction("Index");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -83,6 +88,10 @@ namespace CD67.ModeleMVC.MVC.Controllers
|
|
|
{
|
|
{
|
|
|
TYPE_VIKINGFactory typeVikingFactory = new TYPE_VIKINGFactory(db);
|
|
TYPE_VIKINGFactory typeVikingFactory = new TYPE_VIKINGFactory(db);
|
|
|
typeVikingFactory.update(ref typeViking);
|
|
typeVikingFactory.update(ref typeViking);
|
|
|
|
|
+
|
|
|
|
|
+ // Ajout d'un message flash
|
|
|
|
|
+ this.Success("Type de viking edité avec succès.");
|
|
|
|
|
+
|
|
|
return RedirectToAction("Index");
|
|
return RedirectToAction("Index");
|
|
|
}
|
|
}
|
|
|
return View(typeViking);
|
|
return View(typeViking);
|
|
@@ -112,6 +121,10 @@ namespace CD67.ModeleMVC.MVC.Controllers
|
|
|
TYPE_VIKINGFactory typeVikingFactory = new TYPE_VIKINGFactory(db);
|
|
TYPE_VIKINGFactory typeVikingFactory = new TYPE_VIKINGFactory(db);
|
|
|
EXEMPLE_TYPE_VIKING typeViking = typeVikingFactory.getById(id);
|
|
EXEMPLE_TYPE_VIKING typeViking = typeVikingFactory.getById(id);
|
|
|
typeVikingFactory.delete(ref typeViking);
|
|
typeVikingFactory.delete(ref typeViking);
|
|
|
|
|
+
|
|
|
|
|
+ // Ajout d'un message flash
|
|
|
|
|
+ this.Success("Type de viking supprimé avec succès.");
|
|
|
|
|
+
|
|
|
return RedirectToAction("Index");
|
|
return RedirectToAction("Index");
|
|
|
}
|
|
}
|
|
|
|
|
|