Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Phieugiaodetai phieugiaodetai = db.Phieugiaodetais.Find(id);

            db.Phieugiaodetais.Remove(phieugiaodetai);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        //GET: Sinhvien/Details/PhieuGiaoDeTai
        public ActionResult ChitietSV_DT_GV(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Phieugiaodetai sv_dt = db.Phieugiaodetais.Find(id);

            return(View());
        }
Пример #3
0
 public ActionResult Edit([Bind(Include = "SoPGDT,Ngaygiao,Hannop,MASV,MADT,MAGV")] Phieugiaodetai phieugiaodetai)
 {
     if (ModelState.IsValid)
     {
         db.Entry(phieugiaodetai).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MASV = new SelectList(db.Sinhviens, "MASV", "HOSV", phieugiaodetai.MASV);
     ViewBag.MADT = new SelectList(db.Detais, "MADT", "TENDT", phieugiaodetai.MADT);
     ViewBag.MAGV = new SelectList(db.Giangviens, "MAGV", "HOGV", phieugiaodetai.MAGV);
     return(View(phieugiaodetai));
 }
Пример #4
0
        // GET: Phieugiaodetai/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Phieugiaodetai phieugiaodetai = db.Phieugiaodetais.Find(id);

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

            if (phieugiaodetai == null)
            {
                return(HttpNotFound());
            }
            ViewBag.MASV = new SelectList(db.Sinhviens, "MASV", "HOSV", phieugiaodetai.MASV);
            ViewBag.MADT = new SelectList(db.Detais, "MADT", "TENDT", phieugiaodetai.MADT);
            ViewBag.MAGV = new SelectList(db.Giangviens, "MAGV", "HOGV", phieugiaodetai.MAGV);
            return(View(phieugiaodetai));
        }