public ActionResult DeleteConfirmed(int id) { AspNetFeeType aspNetFeeType = db.AspNetFeeTypes.Find(id); db.AspNetFeeTypes.Remove(aspNetFeeType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,TypeName")] AspNetFeeType aspNetFeeType) { if (ModelState.IsValid) { db.Entry(aspNetFeeType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aspNetFeeType)); }
public ActionResult Create([Bind(Include = "Id,TypeName")] AspNetFeeType aspNetFeeType) { if (ModelState.IsValid) { db.AspNetFeeTypes.Add(aspNetFeeType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aspNetFeeType)); }
public ActionResult Edit([Bind(Include = "Id,LedgerID")] AspNetFeeType aspNetFeeType) { if (ModelState.IsValid) { db.Entry(aspNetFeeType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.LedgerID = new SelectList(db.AspNetFinanceLedgers, "Id", "Name", aspNetFeeType.LedgerID); return(View(aspNetFeeType)); }
public ActionResult Create([Bind(Include = "Id,LedgerID")] AspNetFeeType aspNetFeeType) { if (ModelState.IsValid) { db.AspNetFeeTypes.Add(aspNetFeeType); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.LedgerID = new SelectList(db.AspNetFinanceLedgers, "Id", "Name", aspNetFeeType.LedgerID); return(View(aspNetFeeType)); }
// GET: AspNetFeeType/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AspNetFeeType aspNetFeeType = db.AspNetFeeTypes.Find(id); if (aspNetFeeType == null) { return(HttpNotFound()); } return(View(aspNetFeeType)); }
// GET: AspNetFeeType/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AspNetFeeType aspNetFeeType = db.AspNetFeeTypes.Find(id); if (aspNetFeeType == null) { return(HttpNotFound()); } ViewBag.LedgerID = new SelectList(db.AspNetFinanceLedgers, "Id", "Name", aspNetFeeType.LedgerID); return(View(aspNetFeeType)); }
public ActionResult DeleteCnfm(int id) { AspNetFeeType aspNetFeeType = db.AspNetFeeTypes.Find(id); try { db.AspNetFeeTypes.Remove(aspNetFeeType); db.SaveChanges(); return(RedirectToAction("Index")); } catch { ViewBag.Error = "This fee can't be deleted."; return(View("Details", aspNetFeeType)); } }