示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SalonData salonData = db.SalonDatas.Find(id);

            db.SalonDatas.Remove(salonData);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "SalonId,SalonName")] SalonData salonData)
 {
     if (ModelState.IsValid)
     {
         db.Entry(salonData).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(salonData));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "SalonId,SalonName")] SalonData salonData)
        {
            if (ModelState.IsValid)
            {
                db.SalonDatas.Add(salonData);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(salonData));
        }
示例#4
0
        // GET: SalonDatas/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SalonData salonData = db.SalonDatas.Find(id);

            if (salonData == null)
            {
                return(HttpNotFound());
            }
            return(View(salonData));
        }
        public ActionResult About(int id)
        {
            Stylist       thisStylist = Stylist.Find(id);
            List <Client> clientList  = new List <Client>();

            clientList = thisStylist.GetClients();
            List <Specialty> thisSpec = thisStylist.GetSpecialties();

            SalonData newSalonData = new SalonData();

            newSalonData.FindStylist(id);
            newSalonData.AllClients     = clientList;
            newSalonData.AllSpecialties = thisSpec;

            return(View("Details", newSalonData));
        }