Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(string id)
        {
            BangThuThu bangThuThu = db.BangThuThus.Find(id);

            db.BangThuThus.Remove(bangThuThu);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "MaThuThu,TenThuThu,DiaChi,MatKhau")] BangThuThu bangThuThu)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bangThuThu).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bangThuThu));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "MaThuThu,TenThuThu,DiaChi,MatKhau")] BangThuThu bangThuThu)
        {
            if (ModelState.IsValid)
            {
                db.BangThuThus.Add(bangThuThu);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bangThuThu));
        }
Exemplo n.º 4
0
        // GET: BangThuThus/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BangThuThu bangThuThu = db.BangThuThus.Find(id);

            if (bangThuThu == null)
            {
                return(HttpNotFound());
            }
            return(View(bangThuThu));
        }