Example #1
0
 public ActionResult Edit([Bind(Include = "Id,客戶Id,銀行名稱,銀行代碼,分行代碼,帳戶名稱,帳戶號碼")] 客戶銀行資訊 客戶銀行資訊)
 {
     if (ModelState.IsValid)
     {
         db.Entry(客戶銀行資訊).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.客戶Id = new SelectList(db.客戶資料, "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
     return(View(客戶銀行資訊));
 }
Example #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            客戶銀行資訊 客戶銀行資訊 = db.客戶銀行資訊.Find(id);

            if (客戶銀行資訊 != null)
            {
                客戶銀行資訊.IsDelete = true;
                db.SaveChanges();
            }
            return(RedirectToAction("Index"));
        }
Example #3
0
        // GET: 客戶銀行資訊/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            客戶銀行資訊 客戶銀行資訊 = db.客戶銀行資訊.Find(id);

            if (客戶銀行資訊 == null)
            {
                return(HttpNotFound());
            }
            return(View(客戶銀行資訊));
        }
Example #4
0
        // GET: 客戶銀行資訊/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            客戶銀行資訊 客戶銀行資訊 = db.客戶銀行資訊.Find(id);

            if (客戶銀行資訊 == null)
            {
                return(HttpNotFound());
            }
            ViewBag.客戶Id = new SelectList(db.客戶資料, "Id", "客戶名稱", 客戶銀行資訊.客戶Id);
            return(View(客戶銀行資訊));
        }