Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ClassArrangement classArrangement = db.ClassArrangements.Find(id);

            db.ClassArrangements.Remove(classArrangement);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ClassID,Available,ActivityID,StaffID,Id")] ClassArrangement classArrangement)
 {
     if (ModelState.IsValid)
     {
         db.Entry(classArrangement).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ActivityID = new SelectList(db.Activities, "ActivityID", "Description", classArrangement.ActivityID);
     ViewBag.Id         = new SelectList(db.Clients, "Id", "LastName", classArrangement.Id);
     ViewBag.StaffID    = new SelectList(db.Staffs, "StaffID", "LastName", classArrangement.StaffID);
     return(View(classArrangement));
 }
Ejemplo n.º 3
0
        // GET: ClassArrangements/Details/5

        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClassArrangement classArrangement = db.ClassArrangements.Find(id);

            if (classArrangement == null)
            {
                return(HttpNotFound());
            }
            return(View(classArrangement));
        }
Ejemplo n.º 4
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClassArrangement classArrangement = db.ClassArrangements.Find(id);

            if (classArrangement == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ActivityID = new SelectList(db.Activities, "ActivityID", "Description", classArrangement.ActivityID);
            ViewBag.Id         = new SelectList(db.Clients, "Id", "LastName", classArrangement.Id);
            ViewBag.StaffID    = new SelectList(db.Staffs, "StaffID", "LastName", classArrangement.StaffID);
            return(View(classArrangement));
        }