public ActionResult AddClassDiscipline(mst_class_discipline mst)
        {
            try
            {
                mst_class_disciplineMain main = new mst_class_disciplineMain();

                main.AddClassDiscipline(mst);

                return(RedirectToAction("AllClassDisciplineList"));
            }
            catch
            {
                mst_classMain      mstClass      = new mst_classMain();
                mst_disciplineMain mstdescipline = new mst_disciplineMain();

                mst_sessionMain sess = new mst_sessionMain();

                var class_list = mstClass.AllClassList(sess.findFinal_Session());

                var discipline_list = mstdescipline.AllDisciplineList();

                IEnumerable <SelectListItem> list  = new SelectList(class_list, "class_id", "class_name");
                IEnumerable <SelectListItem> list1 = new SelectList(discipline_list, "discipline_id", "discipline_name");


                ViewData["class_id"]      = list;
                ViewData["discipline_id"] = list1;

                ModelState.AddModelError(String.Empty, "Discipline Area Already Assigned");

                return(View(mst));
            }
        }
        public ActionResult AddClassDiscipline()
        {
            mst_classMain      mstClass      = new mst_classMain();
            mst_disciplineMain mstdiscipline = new mst_disciplineMain();

            mst_sessionMain sess = new mst_sessionMain();

            var class_list = mstClass.AllClassList(sess.findFinal_Session());

            var discipline_list = mstdiscipline.AllDisciplineList();

            IEnumerable <SelectListItem> list  = new SelectList(class_list, "class_id", "class_name");
            IEnumerable <SelectListItem> list1 = new SelectList(discipline_list, "discipline_id", "discipline_name");


            ViewData["class_id"]      = list;
            ViewData["discipline_id"] = list1;

            return(View());
        }
        public ActionResult AllDisciplineList()
        {
            mst_disciplineMain stdMain = new mst_disciplineMain();

            return(View(stdMain.AllDisciplineList()));
        }