Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ModuleSubscription moduleSubscription = db.ModuleSubscription.Find(id);

            db.ModuleSubscription.Remove(moduleSubscription);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ID,StudentID,ModuleID")] ModuleSubscription moduleSubscription)
 {
     if (ModelState.IsValid)
     {
         db.Entry(moduleSubscription).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(moduleSubscription));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "ID,StudentID,ModuleID")] ModuleSubscription moduleSubscription)
        {
            if (ModelState.IsValid)
            {
                db.ModuleSubscription.Add(moduleSubscription);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(moduleSubscription));
        }
Exemplo n.º 4
0
        // GET: ModuleSubscriptions/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ModuleSubscription moduleSubscription = db.ModuleSubscription.Find(id);

            if (moduleSubscription == null)
            {
                return(HttpNotFound());
            }
            return(View(moduleSubscription));
        }