Beispiel #1
0
        public ActionResult CourseBatchEdit(bool IsEditMode = false)
        {
            ViewData.Model     = repoCourse.All();
            ViewBag.IsEditMode = IsEditMode;

            return(View());
        }
Beispiel #2
0
        public ActionResult CoursesBatchEdit(bool isEditMode = false)
        {
            ViewData.Model = repoCourse.All();

            ViewBag.isEditMode = isEditMode;

            //ViewBag.DepartmentList = repoDepart.All().Select(p => new { p.DepartmentID, p.Name }).ToList();


            return(View());
        }
        public void AllTest()
        {
            DbContextHelper.Init(typeof(CourseDbContext), GlobalSettings.DATABASE.ConnectionString, 8);

            CourseRepository repo = new CourseRepository();
            var result = repo.All();

            Assert.AreEqual(2, result.Count());
        }
        public ActionResult Index()
        {
            // var data = db.Course.ToList();

            var data = repo.All();

            var item = repo.Find(1);

            var agit = repo.Get所有Git課程();

            return(View(data));
        }
Beispiel #5
0
        public ActionResult Index(int pageNo = 1, int pageSize = 1)
        {
            var course = repo.All().OrderBy(p => p.CourseID).ToPagedList(pageNo, pageSize);

            return(View(course));
        }
Beispiel #6
0
        public ActionResult Index()
        {
            var course = repo.All();

            return(View(course.ToList()));
        }
Beispiel #7
0
        public ActionResult CoursesUnderDetails(int id)
        {
            var data = repoCourse.All().Where(predicate => predicate.DepartmentID.Equals(id));

            return(PartialView(data));
        }
        public ActionResult Index(int pageNo = 1, int pageSize = 3)
        {
            var course = repo.All().ToPagedList(pageNo, pageSize);

            return(View(course));
        }
Beispiel #9
0
        // GET: Courses
        public ActionResult Index()
        {
            var course = repo.All().Include(c => c.Department);

            return(View(course.ToList()));
        }
        public ActionResult CoursesUnderDetails(int id)
        {
            var data = repoCourse.All().Where(p => p.DepartmentID == id);

            return(PartialView(data));
        }