// GET: Wookie/Create public ActionResult Create() { List <Planete> listePlanetes = new PlaneteDataLayer().Select(); ViewBag.listePlanetes = listePlanetes; return(View()); }
// GET: Wookie/Edit/5 public ActionResult Edit(int id) { Wookie wookie = _dataLayer.Select().Find(item => item.ID == id); List <Planete> listePlanetes = new PlaneteDataLayer().Select(); ViewBag.listePlanetes = listePlanetes; return(View(wookie)); }
// GET: Resultat public ActionResult Resultat(Attaque attaque) { ActionResult result = this.RedirectToAction("Login", "Player"); if (this.Session["USER_LOGIN"] != null && !string.IsNullOrEmpty(this.Session["USER_LOGIN"].ToString())) { Planete p = new PlaneteDataLayer().Select("", (int)attaque.PlaneteID)[0]; ViewBag.planete = p; result = this.View(attaque); } return(result); }
public ActionResult Create(Wookie wookie) { try { // TODO: Add insert logic here this._dataLayer.UpdateOrInsertOne(wookie); return(RedirectToAction("Index")); } catch { List <Planete> listePlanetes = new PlaneteDataLayer().Select(); ViewBag.listePlanetes = listePlanetes; return(View()); } }
// GET: Planete public ActionResult Index() { List <Planete> listePlanetes = new PlaneteDataLayer().Select(); return(View(listePlanetes)); }