Example #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            清單 清單 = db.清單.Find(id);

            db.清單.Remove(清單);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "客戶名稱,客戶銀行數量,客戶聯絡人數量")] 清單 清單)
 {
     if (ModelState.IsValid)
     {
         db.Entry(清單).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(清單));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "客戶名稱,客戶銀行數量,客戶聯絡人數量")] 清單 清單)
        {
            if (ModelState.IsValid)
            {
                db.清單.Add(清單);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(清單));
        }
Example #4
0
        // GET: 清單/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            清單 清單 = db.清單.Find(id);

            if (清單 == null)
            {
                return(HttpNotFound());
            }
            return(View(清單));
        }