public ActionResult DeleteConfirmed(int id) { MemberFeeType memberFeeType = db.MemberFeeType.Find(id); db.MemberFeeType.Remove(memberFeeType); db.SaveChanges(); return(RedirectToAction("Index")); }
// GET: MemberFeeTypes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MemberFeeType memberFeeType = db.MemberFeeType.Find(id); if (memberFeeType == null) { return(HttpNotFound()); } return(View(memberFeeType)); }
public ActionResult Edit([Bind(Include = "MemberFeeTypeId,FeeCategory,FeeName,Amount,AmountInWords,Description")] MemberFeeType memberFeeType) { if (ModelState.IsValid) { db.Entry(memberFeeType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } var paytype = from PaymentType p in Enum.GetValues(typeof(PaymentType)) select new { ID = p, Name = p.ToString() }; ViewBag.FeeCategory = new SelectList(paytype, "Name", "Name"); return(View(memberFeeType)); }
// GET: MemberFeeTypes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MemberFeeType memberFeeType = db.MemberFeeType.Find(id); if (memberFeeType == null) { return(HttpNotFound()); } var paytype = from PaymentType p in Enum.GetValues(typeof(PaymentType)) select new { ID = p, Name = p.ToString() }; ViewBag.FeeCategory = new SelectList(paytype, "Name", "Name"); return(View(memberFeeType)); }