public ActionResult AddDiscipline(mst_discipline mst)
        {
            mst_disciplineMain mstMain = new mst_disciplineMain();

            mstMain.AddDiscipline(mst);

            return(RedirectToAction("AllDisciplineList"));
        }
        public ActionResult EditDiscipline(mst_discipline mst)
        {
            mst_disciplineMain stdMain = new mst_disciplineMain();

            stdMain.EditDiscipline(mst);

            return(RedirectToAction("AllDisciplineList"));
        }
Ejemplo n.º 3
0
        public ActionResult studentList(mst_discipline_grades mst)
        {
            mst_discipline_gradesMain           mstMain = new mst_discipline_gradesMain();
            IEnumerable <mst_discipline_grades> grades;

            mst_disciplineMain subjectMain = new mst_disciplineMain();
            mst_discipline     subject     = new mst_discipline();

            List <mst_discipline_grades> list = new List <mst_discipline_grades>();

            grades = mstMain.FindDisciplineGrades(mst.class_id, mst.section_id, mst.discipline_id, mst.term_id);

            subject = subjectMain.FindDiscipline(mst.discipline_id);

            if (grades.Count() > 0)
            {
                foreach (var i in grades)
                {
                    list.Add(new mst_discipline_grades {
                        grade = i.grade, class_id = i.class_id, term_id = mst.term_id, section_id = i.section_id, roll_no = i.roll_no, sr_num = i.sr_num, std_name = i.std_name, discipline_id = mst.discipline_id, discipline_name = subject.discipline_name, user_id = Int32.Parse(Request.Cookies["loginUserId"].Value.ToString())
                    });
                }
            }
            else
            {
                var student_list = mstMain.student_list_for_Discipline_Grades(mst.class_id, mst.section_id);



                foreach (var i in student_list)
                {
                    list.Add(new mst_discipline_grades {
                        class_id = i.class_id, term_id = mst.term_id, section_id = i.section_id, roll_no = i.roll_no, sr_num = i.sr_num, std_name = i.std_name, discipline_id = mst.discipline_id, discipline_name = subject.discipline_name, user_id = Int32.Parse(Request.Cookies["loginUserId"].Value.ToString())
                    });
                }
            }

            return(View(list));
        }