public ActionResult DeleteConfirmed(int id) { ZonalExco zonalExco = db.ZonalExco.Find(id); db.ZonalExco.Remove(zonalExco); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(ZonalExco zonalExco) { if (ModelState.IsValid) { db.Entry(zonalExco).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ActiveMemberId = new SelectList(db.ActiveMember, "ActiveMemberId", "Fullname", zonalExco.ActiveMemberId); ViewBag.PortfolioId = new SelectList(db.Portfolio, "Id", "PortfolioName", zonalExco.PortfolioId); ViewBag.ZoneId = new SelectList(db.ZonalChapter, "Id", "ZoneName", zonalExco.ZoneId); return(View(zonalExco)); }
// GET: ZonalExco/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ZonalExco zonalExco = db.ZonalExco.Find(id); if (zonalExco == null) { return(HttpNotFound()); } return(View(zonalExco)); }
// GET: ZonalExco/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ZonalExco zonalExco = db.ZonalExco.Find(id); if (zonalExco == null) { return(HttpNotFound()); } ViewBag.ActiveMemberId = new SelectList(db.ActiveMember, "ActiveMemberId", "Fullname", zonalExco.ActiveMemberId); ViewBag.PortfolioId = new SelectList(db.Portfolio, "Id", "PortfolioName", zonalExco.PortfolioId); ViewBag.ZoneId = new SelectList(db.ZonalChapter, "Id", "ZoneName", zonalExco.ZoneId); return(View(zonalExco)); }