public ActionResult addExamMarks()
        {
            mst_classMain mstClass = new mst_classMain();

            bool flag;

            if (User.IsInRole("superadmin") || User.IsInRole("principal"))
            {
                flag = true;
            }
            else
            {
                flag = false;
            }

            var class_list = mstClass.AllClassListByTeacher(Int32.Parse(Request.Cookies["loginUserId"].Value.ToString()), flag);


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

            emp_detailMain empMain = new emp_detailMain();

            var emp_list = empMain.DDFacultyList();

            IEnumerable <SelectListItem> list1 = new SelectList(emp_list, "user_id", "user_name");

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

            return(View());
        }
        public void DDFacultyList()
        {
            emp_detailMain emp = new emp_detailMain();

            var user_id = emp.DDFacultyList();

            IEnumerable <SelectListItem> list1 = new SelectList(user_id, "user_id", "user_name");

            ViewData["user_id"] = list1;
        }
Beispiel #3
0
        public ActionResult AddSubjectTeacher(mst_class_subject_teacher mst)
        {
            try
            {
                mst_class_subject_teacherMain main = new mst_class_subject_teacherMain();

                main.AddSubjectTeacher(mst);

                return(RedirectToAction("AllSubjectTeacher"));
            }
            catch
            {
                mst_classMain mstClass = new mst_classMain();

                emp_detailMain mstFaculty = new emp_detailMain();

                mst_sessionMain sess = new mst_sessionMain();

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



                var emp_list = mstFaculty.DDFacultyList();

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

                IEnumerable <SelectListItem> list2 = new SelectList(emp_list, "user_id", "user_name");


                ViewData["class_id"] = list;

                ViewData["subject_teacher_id"] = list2;

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

                return(View(mst));
            }
        }
Beispiel #4
0
        public ActionResult AddSubjectTeacher()
        {
            mst_classMain mstClass = new mst_classMain();

            emp_detailMain mstFaculty = new emp_detailMain();

            mst_sessionMain sess = new mst_sessionMain();

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

            var emp_list = mstFaculty.DDFacultyList();

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

            IEnumerable <SelectListItem> list2 = new SelectList(emp_list, "user_id", "user_name");


            ViewData["class_id"] = list;

            ViewData["subject_teacher_id"] = list2;

            return(View());
        }