public ActionResult Create(string Classcode, string Classname, DateTime Startdate, DateTime Finishdate, int Teacherid)
        {
            //Identify that this method is running
            //Identify the inputs provided from the form

            Debug.WriteLine("Accessed the Create Method to add Class!");
            Debug.WriteLine(Classname);
            Debug.WriteLine(Classcode);
            Debug.WriteLine(Startdate);
            Debug.WriteLine(Finishdate);

            Class NewClass = new Class();

            NewClass.Classcode  = Classcode;
            NewClass.Classname  = Classname;
            NewClass.Startdate  = Startdate;
            NewClass.Finishdate = Finishdate;
            NewClass.Teacherid  = Teacherid;

            ClassDataController controller = new ClassDataController();

            controller.AddClass(NewClass);

            return(RedirectToAction("List"));
        }
        public ActionResult Delete(int id)
        {
            ClassDataController controller = new ClassDataController();

            controller.DeleteClass(id);
            return(RedirectToAction("List"));
        }
        //GET : /Class/List
        public ActionResult List(string SearchKey = null)
        {
            ClassDataController controller = new ClassDataController();
            IEnumerable <Class> Classes    = controller.ClassInfo(SearchKey);

            return(View(Classes));
        }
        public ActionResult Ajax_Update(int id)
        {
            ClassDataController controller = new ClassDataController();
            Class SelectedClass            = controller.FindClass(id);

            return(View(SelectedClass));
        }
        //GET : /Class/DeleteConfirm/{id}
        public ActionResult DeleteConfirm(int id)
        {
            ClassDataController controller = new ClassDataController();
            Class NewClass = controller.FindClass(id);


            return(View(NewClass));
        }
        public ActionResult Update(int id, string Classcode, string Classname, DateTime Startdate, DateTime Finishdate, int Teacherid)
        {
            Class ClassInfo = new Class();

            ClassInfo.Classcode  = Classcode;
            ClassInfo.Classname  = Classname;
            ClassInfo.Startdate  = Startdate;
            ClassInfo.Finishdate = Finishdate;
            ClassInfo.Teacherid  = Teacherid;

            ClassDataController controller = new ClassDataController();

            controller.Update(id, ClassInfo);

            return(RedirectToAction("Show/" + id));
        }