Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Chitietkhenthuong chitietkhenthuong = db.Chitietkhenthuongs.Find(id);

            db.Chitietkhenthuongs.Remove(chitietkhenthuong);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "Machitietkhenthuong,Manv,Makhenthuong,Lydokhenthuong,Tienthuong")] Chitietkhenthuong chitietkhenthuong)
 {
     if (ModelState.IsValid)
     {
         db.Entry(chitietkhenthuong).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Makhenthuong = new SelectList(db.Khenthuongs, "Makhenthuong", "Tenkhenthuong", chitietkhenthuong.Makhenthuong);
     ViewBag.Manv         = new SelectList(db.Thongtinnhansus, "Manv", "Hoten", chitietkhenthuong.Manv);
     return(View(chitietkhenthuong));
 }
Exemple #3
0
        // GET: Chitietkhenthuongs/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Chitietkhenthuong chitietkhenthuong = db.Chitietkhenthuongs.Find(id);

            if (chitietkhenthuong == null)
            {
                return(HttpNotFound());
            }
            return(View(chitietkhenthuong));
        }
Exemple #4
0
        // GET: Chitietkhenthuongs/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Chitietkhenthuong chitietkhenthuong = db.Chitietkhenthuongs.Find(id);

            if (chitietkhenthuong == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Makhenthuong = new SelectList(db.Khenthuongs, "Makhenthuong", "Tenkhenthuong", chitietkhenthuong.Makhenthuong);
            ViewBag.Manv         = new SelectList(db.Thongtinnhansus, "Manv", "Hoten", chitietkhenthuong.Manv);
            return(View(chitietkhenthuong));
        }