Example #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            StudentAlum studentAlum = db.StudentAlums.Find(id);

            db.StudentAlums.Remove(studentAlum);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "MNumber,LastName,FirstName,Gender,Email,AdmitYear,GraduationYear,Country,LinkedIn,Photo")] StudentAlum studentAlum)
 {
     if (ModelState.IsValid)
     {
         db.Entry(studentAlum).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(studentAlum));
 }
Example #3
0
        // GET: StudentAlums/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StudentAlum studentAlum = db.StudentAlums.Find(id);

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