Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ethnie ethnie = db.ethnie.Find(id);

            db.ethnie.Remove(ethnie);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
        // 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));
        }
Ejemplo n.º 5
0
    /*
     *@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));
    }