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