public ActionResult DeleteConfirmed(int id) { 客戶銀行資訊 客戶銀行資訊 = repo.Find(id); repo.Delete(客戶銀行資訊); repo.UnitOfWork.Commit(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { var CB = ClientBank.Get單一筆客戶銀行資料(id); ClientBank.Delete(CB); ClientBank.UnitOfWork.Commit(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { 客戶銀行資訊 l_CustomerAccount = repo.Find(id); repo.Delete(l_CustomerAccount); repo.UnitOfWork.Commit(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { var 銀行資訊 = _客戶銀行資訊Repository.Find(id); _客戶銀行資訊Repository.Delete(銀行資訊); _客戶銀行資訊Repository.UnitOfWork.Commit(); return(RedirectToAction("Index")); }
public ActionResult Delete(int id, FormCollection form) { var data = repo.Where(p => p.Id == id).FirstOrDefault(); repo.Delete(data); repo.UnitOfWork.Commit(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { var data = _repoBankAccount.GetSingleRecordByBankAccountId(id); _repoBankAccount.Delete(data); _repoBankAccount.UnitOfWork.Commit(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { //客戶銀行資訊 客戶銀行資訊 = db.客戶銀行資訊.Find(id); //客戶銀行資訊.是否已刪除 = true; ////db.客戶銀行資訊.Remove(客戶銀行資訊); //db.SaveChanges(); repo.Delete(repo.Find(id)); repo.UnitOfWork.Commit(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { 客戶銀行資訊 bank = repo.Find(id); if (bank != null) { repo.Delete(bank); repo.UnitOfWork.Commit(); } return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { //客戶銀行資訊 客戶銀行資訊 = db.客戶銀行資訊.Find(id); //db.客戶銀行資訊.Remove(客戶銀行資訊); //db.SaveChanges(); 客戶銀行資訊 客戶銀行資訊 = repo.All().FirstOrDefault(p => p.Id == id); repo.Delete(客戶銀行資訊); repo.UnitOfWork.Commit(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { 客戶資料 客戶資料 = 客戶資料Repo.Find(id); 客戶銀行資訊Repo.Delete(客戶資料.Id); 客戶聯絡人Repo.Delete(客戶資料.Id); 客戶資料Repo.Delete(客戶資料); 客戶資料Repo.UnitOfWork.Commit(); return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { if (ModelState.IsValid) { var tmp = repo.FindById(id); repo.Delete(tmp); repo.UnitOfWork.Commit(); return(RedirectToAction("List")); } return(View(repo.FindById(id))); }
public ActionResult DeleteConfirmed(int id) { //客戶銀行資訊 客戶銀行資訊 = db.客戶銀行資訊.Find(id); //db.客戶銀行資訊.Remove(客戶銀行資訊); //db.SaveChanges(); 客戶銀行資訊 客戶銀行資訊 = repoBank.GetOne客戶銀行資訊(id); repoBank.Delete(客戶銀行資訊); repoBank.UnitOfWork.Commit(); return(RedirectToAction("Index")); }
// GET: 客戶銀行資訊/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } 客戶銀行資訊 data = repo.Find(id.Value); if (data != null) { repo.Delete(id.Value); repo.UnitOfWork.Commit(); return(RedirectToAction("Index")); } return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { //客戶銀行資訊 客戶銀行資訊 = db.客戶銀行資訊.Find(id); //db.客戶銀行資訊.Remove(客戶銀行資訊); 客戶銀行資訊 客戶銀行資訊 = repo.Get單筆資料ById(id); 客戶銀行資訊.是否已刪除 = true; try { //db.SaveChanges(); repo.Delete(客戶銀行資訊); repo.UnitOfWork.Commit(); } catch (DbEntityValidationException ex) { throw ex; } return(RedirectToAction("Index")); }
public ActionResult DeleteConfirm(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var data = repoBankInfo.GetBankInfoById(id.Value); if (data != null) { repoBankInfo.Delete(data); repoBankInfo.UnitOfWork.Commit(); return(RedirectToAction("Index")); } else { return(HttpNotFound()); } }