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

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