コード例 #1
0
        public ActionResult EditCoScholastic(mst_co_scholastic mst)
        {
            mst_co_scholasticMain stdMain = new mst_co_scholasticMain();

            stdMain.EditCoScholastic(mst);

            return(RedirectToAction("AllCoScholasticList"));
        }
コード例 #2
0
        public ActionResult AddCoScholastic(mst_co_scholastic mst)
        {
            mst_co_scholasticMain mstMain = new mst_co_scholasticMain();

            mstMain.AddCoScholastic(mst);

            return(RedirectToAction("AllCoScholasticList"));
        }
コード例 #3
0
        public ActionResult studentList(mst_coscholastic_grades mst)
        {
            mst_coscholastic_gradesMain           mstMain = new mst_coscholastic_gradesMain();
            IEnumerable <mst_coscholastic_grades> grades;

            mst_co_scholasticMain subjectMain = new mst_co_scholasticMain();
            mst_co_scholastic     subject     = new mst_co_scholastic();

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

            grades = mstMain.FindCoscholasticGrades(mst.class_id, mst.section_id, mst.co_scholastic_id);

            subject = subjectMain.FindCoScholastic(mst.co_scholastic_id);

            if (grades.Count() > 0)
            {
                foreach (var i in grades)
                {
                    list.Add(new mst_coscholastic_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, co_scholastic_id = mst.co_scholastic_id, co_scholastic_name = subject.co_scholastic_name, user_id = Int32.Parse(Request.Cookies["loginUserId"].Value.ToString())
                    });
                }
            }
            else
            {
                var student_list = mstMain.student_list_for_Coscholastic_Grades(mst.class_id, mst.section_id);



                foreach (var i in student_list)
                {
                    list.Add(new mst_coscholastic_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, co_scholastic_id = mst.co_scholastic_id, co_scholastic_name = subject.co_scholastic_name, user_id = Int32.Parse(Request.Cookies["loginUserId"].Value.ToString())
                    });
                }
            }



            return(View(list));
        }