public ActionResult Delete(int id)
        {
            TeacherDataController controller = new TeacherDataController();

            controller.DeleteTeacher(id);
            return(RedirectToAction("List"));
        }
        //GET : /Teacher/List
        public ActionResult List(string SearchKey = null)
        {
            TeacherDataController controller = new TeacherDataController();
            IEnumerable <Teacher> Teachers   = controller.TeacherInfo(SearchKey);

            return(View(Teachers));
        }
        public ActionResult Ajax_Update(int id)
        {
            TeacherDataController controller = new TeacherDataController();
            Teacher SelectedTeacher          = controller.FindTeacher(id);

            return(View(SelectedTeacher));
        }
        //GET : /Teacher/DeleteConfirm/{id}
        public ActionResult DeleteConfirm(int id)
        {
            TeacherDataController controller = new TeacherDataController();
            Teacher NewTeacher = controller.FindTeacher(id);


            return(View(NewTeacher));
        }
        public ActionResult Update(int id, string TeacherFname, string TeacherLname, string EmployeeNumber, string Salary)
        {
            Teacher TeacherInfo = new Teacher();

            TeacherInfo.TeacherFname   = TeacherFname;
            TeacherInfo.TeacherLname   = TeacherLname;
            TeacherInfo.EmployeeNumber = EmployeeNumber;
            TeacherInfo.Salary         = Salary;

            TeacherDataController controller = new TeacherDataController();

            controller.UpdateTeacher(id, TeacherInfo);

            return(RedirectToAction("Show/" + id));
        }
        public ActionResult Create(string TeacherFname, string TeacherLname, string EmployeeNumber, string Salary)
        {
            //Identify that this method is running
            //Identify the inputs provided from the form

            Debug.WriteLine("Accessed the Create Method to add Teacher!");
            Debug.WriteLine(TeacherFname);
            Debug.WriteLine(TeacherLname);
            Debug.WriteLine(EmployeeNumber);
            Debug.WriteLine(Salary);

            Teacher NewTeacher = new Teacher();

            NewTeacher.TeacherFname   = TeacherFname;
            NewTeacher.TeacherLname   = TeacherLname;
            NewTeacher.EmployeeNumber = EmployeeNumber;
            NewTeacher.Salary         = Salary;

            TeacherDataController controller = new TeacherDataController();

            controller.AddTeacher(NewTeacher);

            return(RedirectToAction("List"));
        }