// GET: MembershipBills/Edit/5 //public ActionResult Edit(int? id) //{ // if (id == null) // { // return new HttpStatusCodeResult(HttpStatusCode.BadRequest); // } // MembershipBill membershipBill = db.MembershipBills.Find(id); // if (membershipBill == null) // { // return HttpNotFound(); // } // ViewBag.EmployeesID = new SelectList(db.Employees, "EmployeesID", "fname", membershipBill.EmployeesID); // ViewBag.MemberID = new SelectList(db.Members, "MemberID", "fname", membershipBill.MemberID); // return View(membershipBill); //} // POST: MembershipBills/Edit/5 // To protect from overposting attacks, please enable the specific properties you want to bind to, for // more details see http://go.microsoft.com/fwlink/?LinkId=317598. //[HttpPost] //[ValidateAntiForgeryToken] //public ActionResult Edit([Bind(Include = "MembershipBillID,MemberID,EmployeesID,Amount,datesold")] MembershipBill membershipBill) //{ // if (ModelState.IsValid) // { // db.Entry(membershipBill).State = EntityState.Modified; // db.SaveChanges(); // return RedirectToAction("Index"); // } // ViewBag.EmployeesID = new SelectList(db.Employees, "EmployeesID", "fname", membershipBill.EmployeesID); // ViewBag.MemberID = new SelectList(db.Members, "MemberID", "fname", membershipBill.MemberID); // return View(membershipBill); //} // GET: MembershipBills/Delete/5 //public ActionResult Delete(int? id) //{ // if (id == null) // { // return new HttpStatusCodeResult(HttpStatusCode.BadRequest); // } // MembershipBill membershipBill = db.MembershipBills.Find(id); // if (membershipBill == null) // { // return HttpNotFound(); // } // return View(membershipBill); //} // POST: MembershipBills/Delete/5 //[HttpPost, ActionName("Delete")] //[ValidateAntiForgeryToken] //public ActionResult DeleteConfirmed(int id) //{ // MembershipBill membershipBill = db.MembershipBills.Find(id); // db.MembershipBills.Remove(membershipBill); // db.SaveChanges(); // return RedirectToAction("Index"); //} protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
public void Dispose() { _context.Dispose(); }