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

            db.studentMasters.Remove(studentMaster);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "sid,sname,fname,lname,emailid,password,gender,image,college,country,state,city")] studentMaster studentMaster)
 {
     if (ModelState.IsValid)
     {
         db.Entry(studentMaster).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(studentMaster));
 }
Exemplo n.º 3
0
        // GET: studentList/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            studentMaster studentMaster = db.studentMasters.Find(id);

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