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());
        }
Пример #2
0
        public ActionResult AddRemarks()
        {
            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");

            ViewData["class_id"] = list;


            mst_termMain mst_term = new mst_termMain();

            var term_list = mst_term.AllTermList();

            IEnumerable <SelectListItem> list1 = new SelectList(term_list, "term_id", "term_name");

            ViewData["term_id"] = list1;

            return(View());
        }
Пример #3
0
        public ActionResult report_card(int section_id, int class_id, string session)
        {
            repReport_cardMain report_card = new repReport_cardMain();

            report_card.pdfReportCard(class_id, section_id, session);

            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");

            ViewData["class_id"] = list;
            DDsession_name();
            return(View());
        }
Пример #4
0
        public ActionResult studentList(teacher_exam_remark mst)
        {
            if (mst.term_id == 0 || mst.section_id == 0)
            {
                ModelState.AddModelError(String.Empty, "Check for required field.");

                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> list3 = new SelectList(class_list, "class_id", "class_name");
                ViewData["class_id"] = list3;


                mst_termMain mst_term = new mst_termMain();

                var term_list = mst_term.AllTermList();

                IEnumerable <SelectListItem> list1 = new SelectList(term_list, "term_id", "term_name");
                ViewData["term_id"] = list1;

                return(View("AddRemarks"));
            }

            teacher_exam_remarkMain           main = new teacher_exam_remarkMain();
            List <teacher_exam_remark>        list = new List <teacher_exam_remark>();
            IEnumerable <teacher_exam_remark> remark;

            remark = main.FindRemarks(mst.class_id, mst.section_id, mst.term_id);

            if (remark.Count() > 0)
            {
                foreach (var i in remark)
                {
                    list.Add(new teacher_exam_remark {
                        remark = i.remark, class_id = i.class_id, term_id = mst.term_id, section_id = i.section_id, roll_no = i.roll_no, sr_number = i.sr_number, std_name = i.std_name, user_id = Int32.Parse(Request.Cookies["loginUserId"].Value.ToString())
                    });
                }
            }
            else
            {
                var std_list = main.student_list_for_remark(mst.class_id, mst.section_id);

                foreach (var i in std_list)
                {
                    list.Add(new teacher_exam_remark {
                        class_id = i.class_id, term_id = mst.term_id, section_id = i.section_id, roll_no = i.roll_no, sr_number = i.sr_number, std_name = i.std_name, user_id = Int32.Parse(Request.Cookies["loginUserId"].Value.ToString())
                    });
                }
            }
            return(View(list));
        }