Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            hdPhuLucHD2 hdphuluchd2 = db.hdPhuLucHD2.Find(id);

            db.hdPhuLucHD2.Remove(hdphuluchd2);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        //
        // GET: /ThemMoiPLHD/Details/5

        public ActionResult Details(int id = 0)
        {
            hdPhuLucHD2 hdphuluchd2 = db.hdPhuLucHD2.Find(id);

            if (hdphuluchd2 == null)
            {
                return(HttpNotFound());
            }
            return(View(hdphuluchd2));
        }
Beispiel #3
0
 public ActionResult Create_PLHDSo2(hdPhuLucHD2 hdphuluchd2)
 {
     if (ModelState.IsValid)
     {
         db.hdPhuLucHD2.Add(hdphuluchd2);
         db.SaveChanges();
         TempData["Details"] = Request.Form["Details"];
         return(RedirectToAction("Details_PLHDSo2", "ThemMoiPLHD", new { id = hdphuluchd2.id }));
     }
     return(View(hdphuluchd2));
 }
Beispiel #4
0
 public ActionResult Edit(hdPhuLucHD2 hdphuluchd2)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hdphuluchd2).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.HD_id = new SelectList(db.hdChiTietHDLD, "id", "HotenNLD", hdphuluchd2.HD_id);
     return(View(hdphuluchd2));
 }
Beispiel #5
0
        //
        // GET: /ThemMoiPLHD/Edit/5

        public ActionResult Edit(int id = 0)
        {
            hdPhuLucHD2 hdphuluchd2 = db.hdPhuLucHD2.Find(id);

            if (hdphuluchd2 == null)
            {
                return(HttpNotFound());
            }
            ViewBag.HD_id = new SelectList(db.hdChiTietHDLD, "id", "HotenNLD", hdphuluchd2.HD_id);
            return(View(hdphuluchd2));
        }