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;
        }
        public ActionResult EditEmp(emp_detail emp)
        {
            if (ModelState.IsValid)
            {
                emp_detailMain empMain = new emp_detailMain();

                empMain.EditEmp(emp);

                return(RedirectToAction("EmpList"));
            }
            return(View());
        }
Exemplo n.º 4
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));
            }
        }
Exemplo n.º 5
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());
        }
        public ActionResult DetailEmp(int user_id)
        {
            emp_detailMain empMain = new emp_detailMain();

            return(View(empMain.FindEmployee(user_id)));
        }
        public ActionResult EmpList()
        {
            emp_detailMain emp = new emp_detailMain();

            return(View(emp.AllEmpList()));
        }