public ActionResult Delete(string id) { if (Session["Username"] == null) { return(RedirectToAction("Index", "Login")); } student = studentService.GetById(id); studentService.DeleteStudent(student); return(RedirectToAction("Index")); }
public ActionResult Delete(int rollno) { bool isloggedin = Convert.ToBoolean(Session["Isloggedin"]); if (!isloggedin) { return(RedirectToAction("Index", "Login")); } Student student = _service.GetStudentByRollno(rollno); if (student != null) { _service.DeleteStudent(student); } return(RedirectToAction("Index")); }
public APIResponses Delete(int id) { StudentServices.DeleteStudent(id); return(new APIResponses(200, "Success", null)); }
public List <Student> DeleteStudnet(int studentId) { return(_studentService.DeleteStudent(studentId)); }
public static int DeleteStudent(string ID) { return(StudentServices.DeleteStudent(ID)); }
public bool RemoveStudent(string StudentId) { return(_studentManager.DeleteStudent(StudentId)); }