예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            客戶銀行資訊 客戶銀行資訊 = db.客戶銀行資訊.Find(id);

            //db.客戶銀行資訊.Remove(客戶銀行資訊);

            客戶銀行資訊.是否已刪除 = true;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 data)
 {
     if (ModelState.IsValid)
     {
         customerBank.Commit();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(customer.GetAll(), "Id", "客戶名稱", data.客戶Id);
     return(View(data));
 }
        // GET: Bank/Details/5
        public ActionResult Details(int?id)
        {
            if (!id.HasValue)
            {
                return(HttpNotFound());
            }
            客戶銀行資訊 客戶銀行資訊 = repoBank.GetOne客戶銀行資訊(id.Value);

            return(View(客戶銀行資訊));
        }
예제 #4
0
 public ActionResult Create(客戶銀行資訊 customerAccount)
 {
     if (ModelState.IsValid)
     {
         repo.Add(customerAccount);
         repo.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     return(View(customerAccount));
 }
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         _客戶銀行資訊Service.Update(客戶銀行資訊);
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(_客戶資料Service.Reads(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
     return(View(客戶銀行資訊));
 }
        public ActionResult DeleteConfirmed(int id)
        {
            客戶銀行資訊 ClientBankInfo = repoClientBankInfo.Find(id);

            ClientBankInfo = repoClientBankInfo.Remove(ClientBankInfo);
            repoClientBankInfo.UnitOfWork.Context.Entry(ClientBankInfo).State = EntityState.Modified;
            //repoClientBankInfo.Delete(ClientBankInfo);
            repoClientBankInfo.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
예제 #7
0
        public ActionResult DeleteConfirmed(int id)
        {
            客戶銀行資訊 客戶銀行資訊 = repo.Find(id);

            客戶銀行資訊.IsDelete = true;
            //repo.Delete(客戶銀行資訊);
            repo.UnitOfWork.Commit();

            return(RedirectToAction("Index"));
        }
예제 #8
0
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         db.Entry(客戶銀行資訊).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(客戶銀行資訊));
 }
예제 #9
0
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         repo.Update(客戶銀行資訊);
         repo.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     InitDropDownList(客戶銀行資訊);
     return(View(客戶銀行資訊));
 }
예제 #10
0
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         ((客戶資料Entities)this._BankInfoRepo.UnitOfWork.Context).Entry(客戶銀行資訊).State = EntityState.Modified;
         this._BankInfoRepo.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(this._CustomerInfoRepo.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
     return(View(客戶銀行資訊));
 }
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 ClientBankInfo)
 {
     if (ModelState.IsValid)
     {
         repoClientBankInfo.UnitOfWork.Context.Entry(ClientBankInfo).State = EntityState.Modified;
         repoClientBankInfo.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(repoClientInfo.All(), "Id", "客戶名稱", ClientBankInfo.客戶Id);
     return(View(ClientBankInfo));
 }
예제 #12
0
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                db.客戶銀行資訊.Add(客戶銀行資訊);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(客戶銀行資訊));
        }
예제 #13
0
        public ActionResult DeleteConfirmed(int id)
        {
            客戶銀行資訊 客戶銀行資訊 = db.客戶銀行資訊.Find(id);

            // Modified for Change status but not really remove
            //db.客戶銀行資訊.Remove(客戶銀行資訊);
            客戶銀行資訊.已刪除 = true;
            // end of modify
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         bankrepo.Update(客戶銀行資訊);
         bankrepo.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(custrepo.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
     return(View(客戶銀行資訊));
 }
        public void Delete(int id)
        {
            客戶銀行資訊 entity = Read(id);

            if (null != entity)
            {
                entity.是否已刪除 = true;
                _客戶銀行資訊Repository.Delete(entity);
                _客戶銀行資訊Repository.SaveChanges();
            }
        }
        //[ValidateAntiForgeryToken]
        public ActionResult Delete(int id, 客戶銀行資訊 data)
        {
            if (ModelState.IsValid)
            {
                var item = CustBankRepo.Find(id);
                CustBankRepo.Delete(item);
                return(RedirectToAction("Details"));
            }

            return(View(data));
        }
예제 #17
0
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼,IsValid")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         db.Entry(客戶銀行資訊).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(db.客戶資料.Where(i => i.IsValid == true), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
     return(View(客戶銀行資訊));
 }
 public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼,是否已刪除")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         repo客戶銀行資訊.Add(客戶銀行資訊);
         repo客戶銀行資訊.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(repo客戶資料.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
     return(View(客戶銀行資訊));
 }
        // GET: Bank/Edit/5
        public ActionResult Edit(int?id)
        {
            if (!id.HasValue)
            {
                return(HttpNotFound());
            }
            客戶銀行資訊 客戶銀行資訊 = repoBank.GetOne客戶銀行資訊(id.Value);

            ViewBag.客戶Id = new SelectList(repo.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }
 public ActionResult Edit(客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         repo.Update(客戶銀行資訊);
         repo.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(repo.Get取得客戶資料選單列表(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
     return(View(客戶銀行資訊));
 }
예제 #21
0
 public ActionResult Create(客戶銀行資訊 bank, FormCollection fc)
 {
     if (ModelState.IsValid)
     {
         bank.客戶Id = Convert.ToInt32(fc.Get("ddlClient"));
         db.客戶銀行資訊.Add(bank);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bank));
 }
 public ActionResult Create(客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         customerBankDatasRepo.Add(客戶銀行資訊);
         customerBankDatasRepo.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     SetCustomerDataDropDown();
     return(View(客戶銀行資訊));
 }
예제 #23
0
 public ActionResult Edit(客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         db.Entry(客戶銀行資訊).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(db.客戶資料, "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
     return(View(客戶銀行資訊));
 }
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         oRepository.UnitOfWork.Context.Entry(客戶銀行資訊).State = EntityState.Modified;
         oRepository.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(o客戶資料Repository.GetAll(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
     return(View(客戶銀行資訊));
 }
예제 #25
0
        public ActionResult DeleteConfirmed(int id)
        {
            //客戶銀行資訊 客戶銀行資訊 = db.客戶銀行資訊.Find(id);
            客戶銀行資訊 客戶銀行資訊 = repo.Find(id);

            客戶銀行資訊.是否已刪除 = true;
            //db.客戶銀行資訊.Remove(客戶銀行資訊);
            //db.SaveChanges();
            repo.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
예제 #26
0
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                db.客戶銀行資訊.Add(客戶銀行資訊);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.客戶Id = new SelectList(db.客戶資料, "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }
예제 #27
0
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                blankRepository.Add(客戶銀行資訊);
                blankRepository.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }

            ViewBag.客戶Id = new SelectList(customeRepository.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }
예제 #28
0
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         var db = 客銀repo.UnitOfWork.Context;
         db.Entry(客戶銀行資訊).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(客戶repo.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
     return(View(客戶銀行資訊));
 }
예제 #29
0
        public ActionResult DeleteConfirmed(int id)
        {
            客戶銀行資訊 bank = repo.Find(id);

            if (bank != null)
            {
                repo.Delete(bank);
                repo.UnitOfWork.Commit();
            }

            return(RedirectToAction("Index"));
        }
예제 #30
0
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼,是否已刪除")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         var dbProduct = (客戶資料Entities)repo客戶銀行資訊.UnitOfWork.Context;
         dbProduct.Entry(客戶銀行資訊).State = EntityState.Modified;
         repo客戶銀行資訊.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(repo客戶資料.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
     return(View(客戶銀行資訊));
 }