public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                //db.客戶銀行資訊.Add(客戶銀行資訊);
                //db.SaveChanges();
                customerBankInfoRepo.Add(客戶銀行資訊);
                customerBankInfoRepo.UnitOfWork.Commit();

                return(RedirectToAction("Index"));
            }

            //ViewBag.客戶Id = new SelectList(db.客戶資料, "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            ViewBag.客戶Id = new SelectList(customerRepo.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }
Example #2
0
 public ActionResult Create(客戶銀行資訊 customerAccount)
 {
     if (ModelState.IsValid)
     {
         repo.Add(customerAccount);
         repo.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     return(View(customerAccount));
 }
Example #3
0
 public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         rep.Add(客戶銀行資訊);
         rep.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     return(View(客戶銀行資訊));
 }
 public ActionResult Create(客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         customerBankDatasRepo.Add(客戶銀行資訊);
         customerBankDatasRepo.UnitOfWork.Commit();
         return(RedirectToAction("Index"));
     }
     SetCustomerDataDropDown();
     return(View(客戶銀行資訊));
 }
Example #5
0
        public ActionResult Create(客戶銀行資訊 data)
        {
            if (ModelState.IsValid)
            {
                repo.Add(data);
                repo.UnitOfWork.Commit();

                return(RedirectToAction("List"));
            }
            ViewBag.客戶Id = new SelectList(客戶資料repo.All(), "Id", "客戶名稱");
            return(View(data));
        }
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                oRepository.Add(客戶銀行資訊);
                oRepository.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }

            ViewBag.客戶Id = new SelectList(o客戶資料Repository.GetAll(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼,是否已刪除")] 客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                BankRepo.Add(客戶銀行資訊);
                BankRepo.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }

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

            ViewBag.客戶Id = new SelectList(repo.All().AsQueryable(), "Id", "客戶名稱");
            return(View(客戶銀行資訊));
        }
        public ActionResult Create(客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                ClientBank.Add(客戶銀行資訊);
                ClientBank.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }

            ViewBag.客戶Id = new SelectList(ClientData.All().OrderBy(p => p.客戶名稱), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 ClientBankInfo)
        {
            if (ModelState.IsValid)
            {
                repoClientBankInfo.Add(ClientBankInfo);
                repoClientBankInfo.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }

            ViewBag.客戶Id = new SelectList(repoClientInfo.All(), "Id", "客戶名稱", ClientBankInfo.客戶Id);
            return(View(ClientBankInfo));
        }
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                repo.Add(客戶銀行資訊);
                repo.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }

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

            ViewBag.客戶Id = new SelectList(rep客戶資料.fn取得所有資料(), "Id", "客戶名稱");
            return(View(客戶銀行資訊));
        }
        public ActionResult Create(客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                repo.Add(客戶銀行資訊);
                repo.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }

            ViewBag.客戶Id = new SelectList(repo.Get取得客戶資料選單列表(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼,IsDeleted")] 客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                Repo.Add(客戶銀行資訊);
                Repo.UnitOfWork.Commit();
                TempData["Msg"] = "新增成功";
                return(RedirectToAction("Index"));
            }

            ViewBag.客戶Id = new SelectList(Repo.Get客戶資料List(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")]
                                   客戶銀行資訊 bank)
        {
            if (ModelState.IsValid)
            {
                bankRepo.Add(bank);
                bankRepo.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }

            ViewBag.客戶Id = new SelectList(customerRepo.All(), "Id", "客戶名稱", bank.客戶Id);
            return(View(bank));
        }
        public ActionResult Create(客戶銀行資訊 Bank)
        {
            if (ModelState.IsValid)
            {
                repo_Bank.Add(Bank);
                repo_Bank.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }

            ViewBag.客戶Id = new SelectList(repo.All().Where(p => p.isDelete == false), "Id", "客戶名稱");

            return(View(Bank));
        }
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼,刪除")] 客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                客戶銀行資訊.刪除 = false;
                db客戶銀行.Add(客戶銀行資訊);
                db客戶銀行.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }

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

            var bank = customerRepo.All();

            ViewBag.客戶Id = new SelectList(bank, "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }
        public ActionResult Create(客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                repoBank.Add(客戶銀行資訊);
                repoBank.UnitOfWork.Commit();
                //db.客戶銀行資訊.Add(客戶銀行資訊);
                //db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.客戶Id = new SelectList(repo.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }
        public ActionResult Create(客戶銀行資訊 bankInfo)
        {
            if (ModelState.IsValid)
            {
                if (repoCustomer.IsExist(bankInfo.客戶Id))
                {
                    repoBankInfo.Add(bankInfo);
                    repoBankInfo.UnitOfWork.Commit();

                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }
            }

            ViewBag.客戶Id = new SelectList(repoCustomer.All(), "Id", "客戶名稱", bankInfo.客戶Id);

            ViewData.Model = bankInfo;

            return(View());
        }
Example #21
0
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 bankAccount)
        {
            if (ModelState.IsValid)
            {
                _repoBankAccount.Add(bankAccount);
                _repoBankAccount.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }

            SetViewBagCustomers(includeDelete: false);

            ViewData.Model = bankAccount;

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

            //ViewBag.客戶Id = new SelectList(db.客戶資料.Where(c => c.是否已刪除 == false), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            ViewBag.客戶Id = new SelectList(repo.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }
Example #23
0
        public ActionResult Create([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼,isDeleted")] 客戶銀行資訊 客戶銀行資訊)
        {
            if (ModelState.IsValid)
            {
                //db.客戶銀行資訊.Add(客戶銀行資訊);
                //db.SaveChanges();

                custBankRepo.Add(客戶銀行資訊);
                custBankRepo.UnitOfWork.Commit();

                return(RedirectToAction("Index"));
            }

            var custData = RepositoryHelper.Get客戶資料Repository();

            ViewBag.客戶Id = new SelectList(custData.All(), "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }