public ActionResult DeleteConfirmed(string id) { StudentLC studentLC = db.StudentLCs.Find(id); db.StudentLCs.Remove(studentLC); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "AdmissionID,AadharCard,FirstName,FatherName,LastName,MotherName,Nationality,MotherTongue,Religion,Cast,SubCast,BirthPlace,Taluka,District,State,DOB,DOB_In_Words,PreviousSchool,Division,AdmissionDate,AdmissionDivision,Performance,Behaviour,SchoolLeaveDate,CurrentDivision,Reason")] StudentLC studentLC) { if (ModelState.IsValid) { db.Entry(studentLC).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(studentLC)); }
// GET: StudentLCs/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } StudentLC studentLC = db.StudentLCs.Find(id); if (studentLC == null) { return(HttpNotFound()); } return(View(studentLC)); }
public ActionResult Details(int?id) { StudentLC dpt = Db.StudentLCs.FirstOrDefault(d => d.RollNo == id); return(View(dpt)); }