public ActionResult Create(AdditionalSurgeries additionalsurgeries) { if (ModelState.IsValid) { additionalsurgeries.ID = Guid.NewGuid(); db.AdditionalSurgeries.Add(additionalsurgeries); db.SaveChanges(); return Content(Boolean.TrueString); } ViewBag.PracticesID = new SelectList(db.Practices, "ID", "Name", additionalsurgeries.PracticesID); return View(additionalsurgeries); }
public ActionResult Edit(AdditionalSurgeries additionalsurgeries) { if (ModelState.IsValid) { db.Entry(additionalsurgeries).State = EntityState.Modified; db.SaveChanges(); return Content(Boolean.TrueString); } ViewBag.PracticesID = new SelectList(db.Practices, "ID", "Name", additionalsurgeries.PracticesID); return View(additionalsurgeries); }