// GET: Installment/Delete/5 public ActionResult Delete(Nullable <int> id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Db db = new Db(DbServices.ConnectionString); Installment installment = InstallmentServices.Get(id.Value, db); if (installment == null) { return(HttpNotFound()); } return(View(installment)); }
// GET: Installment/Edit/5 public ActionResult Edit(Nullable <int> id) { Db db = new Db(DbServices.ConnectionString); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Installment installment = InstallmentServices.Get(id.Value, db); if (installment == null) { return(HttpNotFound()); } ViewBag.RefundableProductList = new SelectList(RefundableProductServices.List(db), "Product", "Name", installment.RefundableProduct); return(View(installment)); }