public ActionResult DeleteConfirmed(int id) { SalonData salonData = db.SalonDatas.Find(id); db.SalonDatas.Remove(salonData); db.SaveChanges(); return(RedirectToAction("Index")); }
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)); }
public ActionResult Create([Bind(Include = "SalonId,SalonName")] SalonData salonData) { if (ModelState.IsValid) { db.SalonDatas.Add(salonData); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(salonData)); }
// 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)); }