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