public ActionResult DeleteConfirmed(int id) { PartyVisa partyvisa = db.PVisas.Find(id); db.PVisas.Remove(partyvisa); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /PartyVisa/Delete/5 public ActionResult Delete(int id = 0) { PartyVisa partyvisa = db.PVisas.Find(id); if (partyvisa == null) { return(HttpNotFound()); } return(View(partyvisa)); }
public ActionResult Edit(PartyVisa partyvisa) { if (ModelState.IsValid) { db.Entry(partyvisa).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(partyvisa)); }
public ActionResult Create(PartyVisa partyvisa) { if (ModelState.IsValid) { db.PVisas.Add(partyvisa); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(partyvisa)); }