Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            NGroupMessageTeacher nGroupMessageTeacher = db.NGroupMessageTeachers.Find(id);

            db.NGroupMessageTeachers.Remove(nGroupMessageTeacher);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "GroupID,TID,message,Time,Media")] NGroupMessageTeacher nGroupMessageTeacher)
 {
     if (ModelState.IsValid)
     {
         db.Entry(nGroupMessageTeacher).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.GroupID = new SelectList(db.Groups, "GroupID", "GroupName", nGroupMessageTeacher.GroupID);
     ViewBag.TID     = new SelectList(db.Teachers, "TID", "Name", nGroupMessageTeacher.TID);
     return(View(nGroupMessageTeacher));
 }
Exemple #3
0
        // GET: NGroupMessageTeachers/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            NGroupMessageTeacher nGroupMessageTeacher = db.NGroupMessageTeachers.Find(id);

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

            if (nGroupMessageTeacher == null)
            {
                return(HttpNotFound());
            }
            ViewBag.GroupID = new SelectList(db.Groups, "GroupID", "GroupName", nGroupMessageTeacher.GroupID);
            ViewBag.TID     = new SelectList(db.Teachers, "TID", "Name", nGroupMessageTeacher.TID);
            return(View(nGroupMessageTeacher));
        }