public ActionResult DeleteConfirmed(int id) { swosta_sewa swosta_sewa = db.swosta_sewa.Find(id); db.swosta_sewa.Remove(swosta_sewa); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "sewaID,khop,mahila_posand,upachar,senior_id")] swosta_sewa swosta_sewa) { if (ModelState.IsValid) { db.Entry(swosta_sewa).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Education", swosta_sewa.senior_id); return(View(swosta_sewa)); }
public ActionResult Create([Bind(Include = "sewaID,khop,mahila_posand,upachar,senior_id")] swosta_sewa swosta_sewa) { if (ModelState.IsValid) { db.swosta_sewa.Add(swosta_sewa); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Home_no", swosta_sewa.senior_id); return(View(swosta_sewa)); }
// GET: swostasewa/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } swosta_sewa swosta_sewa = db.swosta_sewa.Find(id); if (swosta_sewa == null) { return(HttpNotFound()); } return(View(swosta_sewa)); }
// GET: swostasewa/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } swosta_sewa swosta_sewa = db.swosta_sewa.Find(id); if (swosta_sewa == null) { return(HttpNotFound()); } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Education", swosta_sewa.senior_id); return(View(swosta_sewa)); }