public ActionResult studentList(mst_exam_marks mst)
        {
            mst_subjectMain       subjectMain = new mst_subjectMain();
            mst_subject           subject     = new mst_subject();
            List <mst_exam_marks> list        = new List <mst_exam_marks>();

            mst_examMain examMain = new mst_examMain();
            mst_exam     exam     = new mst_exam();


            mst_exam_marksMain mstMain = new mst_exam_marksMain();

            //IEnumerable<mst_exam_marks> marks = mstMain.find_marks(mst.exam_id, mst.subject_id, mst.class_id, mst.section_id);

            //if (marks.Count() > 0)
            //{
            var student_list = mstMain.student_list_for_marks_update(mst.subject_id, mst.class_id, mst.section_id, mst.exam_id);

            exam = examMain.FindExam(mst.exam_id);

            ViewData["MaxMarks"] = exam.max_no;

            subject = subjectMain.FindSubject(mst.subject_id);

            foreach (var i in student_list)
            {
                list.Add(new mst_exam_marks {
                    present = i.present, marks = i.marks, class_id = i.class_id, exam_id = mst.exam_id, exam_name = exam.exam_name, marks_assigned_user_id = mst.marks_assigned_user_id, section_id = i.section_id, roll_no = i.roll_no, sr_num = i.sr_num, std_name = i.std_name, subject_id = mst.subject_id, subject_name = subject.subject_name, user_id = Int32.Parse(Request.Cookies["loginUserId"].Value.ToString())
                });
            }
            //}
            //else
            //{
            //    var student_list = mstMain.student_list_for_marks(mst.class_id, mst.section_id);
            //    exam = examMain.FindExam(mst.exam_id);

            //    ViewData["MaxMarks"] = exam.max_no;

            //    subject = subjectMain.FindSubject(mst.subject_id);

            //    foreach (var i in student_list)
            //    {
            //        list.Add(new mst_exam_marks { class_id = i.class_id, exam_id = mst.exam_id, exam_name = exam.exam_name, marks_assigned_user_id = mst.marks_assigned_user_id, section_id = i.section_id, roll_no = i.roll_no, sr_num = i.sr_num, std_name = i.std_name, subject_id = mst.subject_id, subject_name = subject.subject_name, user_id = Int32.Parse(Request.Cookies["loginUserId"].Value.ToString()), present = true });
            //    }
            //}



            return(View(list));
        }
        public ActionResult DeleteExam(int id)
        {
            mst_examMain stdMain = new mst_examMain();

            return(View(stdMain.FindExam(id)));
        }
        public ActionResult EditExam(int?id)
        {
            mst_examMain stdMain = new mst_examMain();

            return(View(stdMain.FindExam(id)));
        }