示例#1
0
        private void GetListOperation()
        {
            switch (view.entity)
            {
            case Entity.Junction:
                List <Junction> junctions = junctionDAO.GetList();
                view.PrintJunctions(junctions);
                break;

            case Entity.Pupil:
                List <Pupil> pupils = pupilDAO.GetList();
                view.PrintPupils(pupils);
                break;

            case Entity.Teacher:
                List <Teacher> teachers = teacherDAO.GetList();
                view.PrintTeachers(teachers);
                break;
            }
        }
        public JsonResult GetList()
        {
            var lst = dao.GetList();

            return(Json(new { data = lst }, JsonRequestBehavior.AllowGet));
        }