public ActionResult DeleteConfirmed(int id) { VisaTypes visaTypes = db.VisaTypes1.Find(id); db.VisaTypes1.Remove(visaTypes); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "VisaID,VisaType")] VisaTypes visaTypes) { if (ModelState.IsValid) { db.Entry(visaTypes).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(visaTypes)); }
public ActionResult Create([Bind(Include = "VisaID,VisaType")] VisaTypes visaTypes) { if (ModelState.IsValid) { db.VisaTypes1.Add(visaTypes); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(visaTypes)); }
// GET: VisaTypes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VisaTypes visaTypes = db.VisaTypes1.Find(id); if (visaTypes == null) { return(HttpNotFound()); } return(View(visaTypes)); }