Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id, int idht)
        {
            QUANLYHT qUANLYHT = db.QUANLYHTs.Find(id, idht);

            db.QUANLYHTs.Remove(qUANLYHT);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ID,IDHT,GHICHU")] QUANLYHT qUANLYHT)
 {
     if (ModelState.IsValid)
     {
         db.Entry(qUANLYHT).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ID   = new SelectList(db.CBQUANLies, "ID", "TENCB", qUANLYHT.ID);
     ViewBag.IDHT = new SelectList(db.HOITHAOs, "IDHT", "TENHT", qUANLYHT.IDHT);
     return(View(qUANLYHT));
 }
Exemplo n.º 3
0
        // GET: Admin/QUANLYHTs/Details/5
        public ActionResult Details(int?id, int?idht)
        {
            if (id == null || idht == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            QUANLYHT qUANLYHT = db.QUANLYHTs.Find(id, idht);

            if (qUANLYHT == null)
            {
                return(HttpNotFound());
            }
            return(View(qUANLYHT));
        }
Exemplo n.º 4
0
        // GET: Admin/QUANLYHTs/Edit/5
        public ActionResult Edit(int?id, int?idht)
        {
            if (id == null || idht == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            QUANLYHT qUANLYHT = db.QUANLYHTs.Find(id, idht);

            if (qUANLYHT == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ID   = new SelectList(db.CBQUANLies, "ID", "TENCB", qUANLYHT.ID);
            ViewBag.IDHT = new SelectList(db.HOITHAOs, "IDHT", "TENHT", qUANLYHT.IDHT);
            return(View(qUANLYHT));
        }