// GET: PayOrder/Delete/5 public ActionResult Delete(Nullable <int> id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Db db = new Db(DbServices.ConnectionString); PayOrder payOrder = PayOrderServices.Get(id.Value, db); if (payOrder == null) { return(HttpNotFound()); } return(View(payOrder)); }
// GET: PayOrder/Edit/5 public ActionResult Edit(Nullable <int> id) { Db db = new Db(DbServices.ConnectionString); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PayOrder payOrder = PayOrderServices.Get(id.Value, db); if (payOrder == null) { return(HttpNotFound()); } ViewBag.PaymentGroupList = new SelectList(PaymentGroupServices.List(db), "Id", "Name", payOrder.PaymentGroup); ViewBag.EmployeeList = new SelectList(EmployeeServices.List(db), "Id", "FirstName", payOrder.Employee); return(View(payOrder)); }