public ActionResult DeleteConfirmed(int id) { ethnie ethnie = db.ethnie.Find(id); db.ethnie.Remove(ethnie); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id_ethnie,label")] ethnie ethnie) { if (ModelState.IsValid) { db.Entry(ethnie).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ethnie)); }
public ActionResult Create([Bind(Include = "id_ethnie,label")] ethnie ethnie) { if (ModelState.IsValid) { db.ethnie.Add(ethnie); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ethnie)); }
// GET: Ethnie/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ethnie ethnie = db.ethnie.Find(id); if (ethnie == null) { return(HttpNotFound()); } return(View(ethnie)); }
/* *@brief : randomize the player params */ public void randomPlayer() { int lenght = ethnie.GetNames(typeof(ethnie)).Length; int rand = Random.Range(0, lenght); e = (ethnie)rand; lenght = body.GetNames(typeof(body)).Length; rand = Random.Range(0, lenght); b = (body)rand; handicap = false; //handicap = intToBool(Random.Range(0, 2)); gender = intToBool(Random.Range(0, 2)); sexuality = intToBool(Random.Range(0, 2)); scolarSkill = intToBool(Random.Range(0, 2)); }