//public StudentAddViewModel DeleteStudent(StudentAddViewModel student) //{ // StudentAddViewModel studentDelete = new StudentAddViewModel(); // try // { // if (TokenManager.CheckToken(student._tenantName, student._token)) // { // studentDelete = this.studentRepository.DeleteStudent(student); // } // else // { // studentDelete._failure = true; // studentDelete._message = TOKENINVALID; // } // } // catch (Exception es) // { // studentDelete._failure = true; // studentDelete._message = es.Message; // } // return studentDelete; //} /// <summary> /// Search Sibling For Student /// </summary> /// <param name="studentSiblingListViewModel"></param> /// <returns></returns> public SiblingSearchForStudentListModel SearchSiblingForStudent(SiblingSearchForStudentListModel studentSiblingListViewModel) { SiblingSearchForStudentListModel studentSiblingList = new SiblingSearchForStudentListModel(); if (TokenManager.CheckToken(studentSiblingListViewModel._tenantName + studentSiblingListViewModel._userName, studentSiblingListViewModel._token)) { studentSiblingList = this.studentRepository.SearchSiblingForStudent(studentSiblingListViewModel); } else { studentSiblingList._failure = true; studentSiblingList._message = TOKENINVALID; } return(studentSiblingList); }
public ActionResult <SiblingSearchForStudentListModel> ViewStudentSiblingList(SiblingSearchForStudentListModel studentSiblingListViewModel) { SiblingSearchForStudentListModel studentSiblingsList = new SiblingSearchForStudentListModel(); try { studentSiblingsList = _studentService.SearchSiblingForStudent(studentSiblingListViewModel); } catch (Exception es) { studentSiblingsList._message = es.Message; studentSiblingsList._failure = true; } return(studentSiblingsList); }