Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            APPROGRAM aPPROGRAM = db.APPROGRAMs.Find(id);

            db.APPROGRAMs.Remove(aPPROGRAM);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "ID,PROG_NAME,SEM_CURRCULUM")] APPROGRAM aPPROGRAM)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aPPROGRAM).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aPPROGRAM));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "ID,PROG_NAME,SEM_CURRCULUM")] APPROGRAM aPPROGRAM)
        {
            if (ModelState.IsValid)
            {
                db.APPROGRAMs.Add(aPPROGRAM);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(aPPROGRAM));
        }
Esempio n. 4
0
        // GET: ApPorgram/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            APPROGRAM aPPROGRAM = db.APPROGRAMs.Find(id);

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