// GET: GrantPayment/Delete/5 public ActionResult Delete(Nullable <int> id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Db db = new Db(DbServices.ConnectionString); GrantPayment grantPayment = GrantPaymentServices.Get(id.Value, db); if (grantPayment == null) { return(HttpNotFound()); } return(View(grantPayment)); }
// GET: GrantPayment/Edit/5 public ActionResult Edit(Nullable <int> id) { Db db = new Db(DbServices.ConnectionString); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GrantPayment grantPayment = GrantPaymentServices.Get(id.Value, db); if (grantPayment == null) { return(HttpNotFound()); } ViewBag.GrantList = new SelectList(GrantServices.List(db), "Product", "Name", grantPayment.Grant); ViewBag.GrantPaymentOrderList = new SelectList(GrantPaymentOrderServices.List(db), "Id", "Notes", grantPayment.GrantPaymentOrder); return(View(grantPayment)); }