public ActionResult InsertNewStudent(StudentModel newStudent) { StudentsDataController dc = new StudentsDataController(); string studentSuccessCode = dc.InsertStudent(newStudent); return(Content(studentSuccessCode)); }
public SelectList GetStudentDropDownList() { SelectList studentsSelectList; StudentsDataController dataController = new StudentsDataController(); studentsSelectList = dataController.GetStudentsList(); return(new SelectList(studentsSelectList, "Value", "Text", new StudentModel().studentsID)); }
public ActionResult GetStudent(int studentID) { StudentModel student = new StudentModel(); StudentsDataController dataController = new StudentsDataController(); student = dataController.GetStudent(studentID); // staffMember = dataController.getStudentModelMember(Convert.ToInt32(staffMember.staffID)); System.Web.HttpContext.Current.Session["thisStudent"] = student; //ViewBag.statusList = GetStatusList(); return(View("UpdateStudentView")); }
public ActionResult GetAllStudents() { List <StudentModel> students = new List <StudentModel>(); StudentsDataController dc = new StudentsDataController(); students = dc.GetStudents(); System.Web.HttpContext.Current.Session["studentsList"] = students; string newString = String.Concat(students); ViewBag.studentsList = GetStudentDropDownList(); return(Content(newString)); }