コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ApplicantTable applicantTable = db.ApplicantTables.Find(id);

            db.ApplicantTables.Remove(applicantTable);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "ApplicantTableId,Email,FirstName,LastName,OtherName,MatricNo,FacultyName")] ApplicantTable applicantTable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(applicantTable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(applicantTable));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "ApplicantTableId,Email,FirstName,LastName,OtherName,MatricNo,FacultyName")] ApplicantTable applicantTable)
        {
            if (ModelState.IsValid)
            {
                db.ApplicantTables.Add(applicantTable);
                db.SaveChanges();
                return(RedirectToAction("ApplicantConfirmationPage"));
            }

            return(View(applicantTable));
        }
コード例 #4
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ApplicantTable applicantTable = db.ApplicantTables.Find(id);

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