public ActionResult Edit(int id)
        {
            var data = BankRepo.Find(id);

            if (data == null)
            {
                throw new InvalidOperationException("操作錯誤");
            }
            return(View(data));
        }
        public ActionResult Details(int id)
        {
            if (id == 0)
            {
                throw new ArgumentException("參數錯誤");
            }
            var data = BankRepo.Find(id);

            if (data == null)
            {
                throw new InvalidOperationException("操作錯誤");
            }
            return(View(data));
        }
        public ActionResult Delete(int id)
        {
            var data   = BankRepo.Find(id);
            var DelMsg = "客戶銀行資訊不存在。";

            if (data != null)
            {
                try
                {
                    BankRepo.Delete(data);
                    BankRepo.UnitOfWork.Commit();
                    DelMsg = "客戶銀行資訊刪除成功。";
                }
                catch (Exception ex)
                {
                    DelMsg = "客戶銀行資訊刪除失敗。錯誤訊息: " + ex.Message;
                }
            }
            TempData["DelMsg"] = DelMsg;
            return(RedirectToAction("Index"));
        }
 public ActionResult Create()
 {
     ViewBag.Company = CompanyRepo.CompanyNameList(0);
     return(View("Edit", BankRepo.Find(0)));
 }