示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Estetica estetica = db.Esteticas.Find(id);

            db.Esteticas.Remove(estetica);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,Nombre")] Estetica estetica)
 {
     if (ModelState.IsValid)
     {
         db.Entry(estetica).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Id = new SelectList(db.Estilistas, "Id", "Nombre", estetica.Id);
     return(View(estetica));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "Id,Nombre")] Estetica estetica)
        {
            if (ModelState.IsValid)
            {
                db.Esteticas.Add(estetica);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Id = new SelectList(db.Estilistas, "Id", "Nombre", estetica.Id);
            return(View(estetica));
        }
示例#4
0
        // GET: Esteticas/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Estetica estetica = db.Esteticas.Find(id);

            if (estetica == null)
            {
                return(HttpNotFound());
            }
            return(View(estetica));
        }
示例#5
0
        // GET: Esteticas/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Estetica estetica = db.Esteticas.Find(id);

            if (estetica == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Id = new SelectList(db.Estilistas, "Id", "Nombre", estetica.Id);
            return(View(estetica));
        }