public ActionResult DeleteConfirmed(int id)
        {
            Bottoms bottoms = db.Bottoms.Find(id);

            db.Bottoms.Remove(bottoms);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "BottomsId,Nickname,Type,Color,Season,Occasion,Photo")] Bottoms bottoms)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bottoms).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bottoms));
 }
Esempio n. 3
0
 public ActionResult Edit([Bind(Include = "BottomsID,BottomsNameDescription,PhotoLink,ColorPrimary,ColorSecondary,ColorTertiary,Season,Occasion")] Bottoms bottoms)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bottoms).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bottoms));
 }
        public ActionResult Create([Bind(Include = "BottomsId,Nickname,Type,Color,Season,Occasion,Photo")] Bottoms bottoms)
        {
            if (ModelState.IsValid)
            {
                db.Bottoms.Add(bottoms);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bottoms));
        }
        // GET: Bottoms/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Bottoms bottoms = db.Bottoms.Find(id);

            if (bottoms == null)
            {
                return(HttpNotFound());
            }
            return(View(bottoms));
        }
Esempio n. 6
0
 public string AssembleAvatarString() => Hair.ToString() + HairColour + "-" + Head.ToString() + HeadColour + "-" + Torso.ToString() + TorsoColour + "-" + Bottoms.ToString() + BottomsColour + "-" + Feet.ToString() + FeetColour;