public ActionResult Delete(string id)
 {
     if (Session["Username"] == null)
     {
         return(RedirectToAction("Index", "Login"));
     }
     student = studentService.GetById(id);
     studentService.DeleteStudent(student);
     return(RedirectToAction("Index"));
 }
Beispiel #2
0
        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"));
        }
Beispiel #3
0
        public APIResponses Delete(int id)
        {
            StudentServices.DeleteStudent(id);

            return(new APIResponses(200, "Success", null));
        }
Beispiel #4
0
 public List <Student> DeleteStudnet(int studentId)
 {
     return(_studentService.DeleteStudent(studentId));
 }
Beispiel #5
0
 public static int DeleteStudent(string ID)
 {
     return(StudentServices.DeleteStudent(ID));
 }
Beispiel #6
0
 public bool RemoveStudent(string StudentId)
 {
     return(_studentManager.DeleteStudent(StudentId));
 }