public ActionResult DeleteConfirmed(int id) { 客戶銀行資訊 客戶銀行資訊 = CustomerBankRepo.Find(id); CustomerBankRepo.Delete(客戶銀行資訊); CustomerBankRepo.UnitOfWork.Commit(); return(RedirectToAction("Index")); }
// GET: CustomerBankInformation/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } 客戶銀行資訊 客戶銀行資訊 = CustomerBankRepo.Find(id.Value); if (客戶銀行資訊 == null) { return(HttpNotFound()); } return(View(客戶銀行資訊)); }
// GET: CustomerBankInformation/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } 客戶銀行資訊 客戶銀行資訊 = CustomerBankRepo.Find(id.Value); if (客戶銀行資訊 == null) { return(HttpNotFound()); } ViewBag.客戶Id = new SelectList(CustomerRepo.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id); return(View(客戶銀行資訊)); }