public ActionResult DeleteConfirmed(int id) { VDN vDN = db.VDN.Find(id); db.VDN.Remove(vDN); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Value,Description,IdCampaing")] VDN vDN) { if (ModelState.IsValid) { db.Entry(vDN).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdCampaing = new SelectList(db.Campaing, "Id", "Code", vDN.IdCampaing); return(View(vDN)); }
public ActionResult Create([Bind(Include = "Id,Value,Description,IdCampaing")] VDN vDN) { if (ModelState.IsValid) { db.VDN.Add(vDN); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdCampaing = new SelectList(db.Campaing, "Id", "Code", vDN.IdCampaing); return(View(vDN)); }
// GET: VDNs/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VDN vDN = db.VDN.Find(id); if (vDN == null) { return(HttpNotFound()); } return(View(vDN)); }
// GET: VDNs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VDN vDN = db.VDN.Find(id); if (vDN == null) { return(HttpNotFound()); } ViewBag.IdCampaing = new SelectList(db.Campaing, "Id", "Code", vDN.IdCampaing); return(View(vDN)); }