public ActionResult DeleteConfirmed(int id) { DoctorChember doctorchember = db.DoctorChembers.Find(id); db.DoctorChembers.Remove(doctorchember); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,DoctorId,ChemberName,ChembeAddress,ChembeCity,ChembeCountry,ChembeMobileNo,ChembeEmail,IsActive,IsDeleted,NotDeletable,CreationDate,UpdateDate,UserId,CompanyId")] DoctorChember doctorchember) { if (ModelState.IsValid) { db.Entry(doctorchember).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DoctorId = new SelectList(db.Doctors, "Id", "DoctorName", doctorchember.DoctorId); return(View(doctorchember)); }
// GET: /DoctorChember/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DoctorChember doctorchember = db.DoctorChembers.Find(id); if (doctorchember == null) { return(HttpNotFound()); } return(View(doctorchember)); }
// GET: /DoctorChember/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DoctorChember doctorchember = db.DoctorChembers.Find(id); if (doctorchember == null) { return(HttpNotFound()); } ViewBag.DoctorId = new SelectList(db.Doctors, "Id", "DoctorName", doctorchember.DoctorId); return(View(doctorchember)); }