Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Lichtrinhcongtac lichtrinhcongtac = db.Lichtrinhcongtacs.Find(id);

            db.Lichtrinhcongtacs.Remove(lichtrinhcongtac);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Malichtrinhcongtac,Manv,Maphongban,Machucvu,Matrinhdochuyenmon,Tungay,Denngay,Noicongtac,Noidungcongtac,Trocap")] Lichtrinhcongtac lichtrinhcongtac)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lichtrinhcongtac).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Machucvu           = new SelectList(db.Chucvus, "Machucvu", "Tenchucvu", lichtrinhcongtac.Machucvu);
     ViewBag.Maphongban         = new SelectList(db.Phongbans, "Maphongban", "Tenphongban", lichtrinhcongtac.Maphongban);
     ViewBag.Manv               = new SelectList(db.Thongtinnhansus, "Manv", "Hoten", lichtrinhcongtac.Manv);
     ViewBag.Matrinhdochuyenmon = new SelectList(db.Trinhdo_chuyenmon, "Matrinhdochuyenmon", "Tentrinhdochuyenmon", lichtrinhcongtac.Matrinhdochuyenmon);
     return(View(lichtrinhcongtac));
 }
Пример #3
0
        // GET: Lichtrinhcongtacs/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Lichtrinhcongtac lichtrinhcongtac = db.Lichtrinhcongtacs.Find(id);

            if (lichtrinhcongtac == null)
            {
                return(HttpNotFound());
            }
            return(View(lichtrinhcongtac));
        }
Пример #4
0
        // GET: Lichtrinhcongtacs/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Lichtrinhcongtac lichtrinhcongtac = db.Lichtrinhcongtacs.Find(id);

            if (lichtrinhcongtac == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Machucvu           = new SelectList(db.Chucvus, "Machucvu", "Tenchucvu", lichtrinhcongtac.Machucvu);
            ViewBag.Maphongban         = new SelectList(db.Phongbans, "Maphongban", "Tenphongban", lichtrinhcongtac.Maphongban);
            ViewBag.Manv               = new SelectList(db.Thongtinnhansus, "Manv", "Hoten", lichtrinhcongtac.Manv);
            ViewBag.Matrinhdochuyenmon = new SelectList(db.Trinhdo_chuyenmon, "Matrinhdochuyenmon", "Tentrinhdochuyenmon", lichtrinhcongtac.Matrinhdochuyenmon);
            return(View(lichtrinhcongtac));
        }